Project

General

Profile

How could I fill the missing values?

Added by Beata Szabo-Takacs over 8 years ago

I have a netcdf file which contains daily temperature data in 464 x 201 gridpoints from 01.01.1961 to 31.12.1961. In some days the data are missing in each grid points. The missing values are originaly denoted by NaN but they are changed by:

cdo –b F64 setmissval,-999 sample0.nc sample.nc

The cdo infon sample.nc operator gives the following result:

ta@beata-HP-Z420-Workstation:~/Documents/Bias_correction$ cdo infon sample2.nc
-1 : Date Time Level Gridsize Miss : Minimum Mean Maximum : Parameter name
1 : 1961-03-01 00:00:00 0 93264 93264 : nan : t
2 : 1961-03-02 00:00:00 0 93264 93264 : nan : t
3 : 1961-03-03 00:00:00 0 93264 93264 : nan : t
4 : 1961-03-04 00:00:00 0 93264 1452 : -25.038 3.1817 23.797 : t
5 : 1961-03-05 00:00:00 0 93264 1452 : -22.806 2.9417 22.780 : t
6 : 1961-03-06 00:00:00 0 93264 1452 : -20.421 2.3351 19.113 : t
When I convert the sample.nc to sample.grb2 by :
cdo –b F32 –f grb2 copy sample.nc sample.grb2

I get the following error message:

GRIB_API ERROR   :  unable to set double array codedValues (Unable to code a field without values)

I tried to fill these values by:

cdo fillmiss sample.grb2 sample2.grb2

but it does not solve this error. How could I fill these nan grid to avoid this error message? I would appreciated if someone heped me!


Replies (1)

RE: How could I fill the missing values? - Added by Ralf Mueller over 8 years ago

what about this?

cdo –b F32 –f grb2 -fillmiss sample.nc sample.grb2

if you upload some data, it's easier to help you ;-)

    (1-1/1)