Project

General

Profile

Can't copy the netcdf file into grb due to NaN

Added by Chetan Gurung 5 months ago

Hi everyone,
I am new to cdo tool. I want to convert the python edited GLDAS nc data into grb format doing: cdo -f grb copy GLDAS_2128_soil.nc tempo.grb
But i got the error:
cdo copy: 1%encodeBMS_float : Missing value = NaN is unsupported!
encodeBDS_float : Minimum value out of range: nan!

Error (cgribexEncode): Problem during GRIB encode (errno = 707)!

So, can anyone help me, what is the meaning of this error? How can i correct it?

Thank you very much for your time.

Best,
Chetan


Replies (1)

RE: Can't copy the netcdf file into grb due to NaN - Added by Karin Meier-Fleischer 5 months ago

NaNs are not allowed in GRIB files. You can change the NaNs to another value outside the data range, like -9999.9 for example.

cdo -f grb -setmissval,-9999.9 -setmissval,nan GLDAS_2128_soil.nc GLDAS_2128_soil.grb
    (1-1/1)