I extract temperature data from the netcdf4 file using python I used these code but it returns only null values.
from netCDF4 import Dataset
nc = Dataset("GLDAS_NOAH025_3H.A20170102.0000.021.nc4","r")
for temp in nc.variables['AvgSurfT_inst'] :
print (temp)
Output:
[[[-- -- -- ..., -- -- --]
[-- -- -- ..., -- -- --]
[-- -- -- ..., -- -- --]
...,
[-- -- -- ..., -- -- --]
[-- -- -- ..., -- -- --]
[-- -- -- ..., -- -- --]]]