Project

General

Profile

Problems with changing missing values

Added by Francis Rayder about 11 years ago

I have an .nc file with sea surface temperatures. All the land boxes have missing values. I would like to set all the missing values to 10 degrees celsius, so I use the command:

cdo setmisstoc,10 input.nc output.nc

However, this does not work. In the output.nc file, all the formerly missing values are now -999,9.

Why are they not set to 10 as they should be? What am I doing wrong?


Replies (4)

RE: Problems with changing missing values - Added by Uwe Schulzweida about 11 years ago

Normally this CDO operator runs without problems. Therefore this problem is most probably related to your netCDF file. Could you please attach an example file?

RE: Problems with changing missing values - Added by Francis Rayder about 11 years ago

The file in question is the sea surface temperature file available from the Pliocene Model Intercomparison Project. I am attaching it.

For some reason, the command cdo setmisstoc,10 to set the missing values to 10 does not work on it for me. The missing values are changed to -999,9 instead.

RE: Problems with changing missing values - Added by Uwe Schulzweida about 11 years ago

Thanks! Your attached file does not contain missing value information. The attribute missing_value or _FillValue is missing.
You can add these attributes with the NCO tool ncatted or with the CDO operator "setmissval". Here is an example:

cdo setmisstoc,10 -setmissval,-999 PRISM3_SST_v1.1.nc result.nc

    (1-4/4)