Page 1 of 1

read netcdf (python): time replaced by default fill values

PostPosted: Thu Nov 11, 2021 9:23 am
by severinf

I downloaded a file from HiTIDE (L2 SMAP RSS data). There are no fill values for the variable "time". When I read the file with Panoply or ncdump, i can see the time values (0 outside the swath and large values in the swath). When I read the netCDF in python:

import netCDF4
fid = netCDF4.Dataset(filename)
dataset = fid.variables['time']

All the non zero values are replaced by a default fill value:

In [58]: dataset
<class 'netCDF4._netCDF4.Variable'>
float64 time(subset_index, ydim_grid, xdim_grid, look)
long_name: Time of observation
standard_name: time
Axis: T
units: seconds since 2000-1-1 0:0:0 0
scale_factor: 1.0
add_offset: 0.0
coordinates: Auxiliary Coordinate variables
calendar: standard
unlimited dimensions:
current shape = (72, 78, 1560, 2)
filling on, default _FillValue of 9.969209968386869e+36 used

Is there a way to solve this issue?
Thank you!

Re: read netcdf (python): time replaced by default fill valu

PostPosted: Wed Nov 17, 2021 1:29 pm
by yjiang168
Hi Severine,

Thanks for the inquiry. The SMAP RSS Level 2 dataset uses zero which is default value for the filled value of time, and we will suggest the data provider to change to -9999.0 in the next version if possible.
Best Regards,