Project

General

Profile

cdo info says miss=0 but there are 224 missing values

Added by Michelle Irizarry over 3 years ago

Hi there!

I am using cdo info on the attached file and it is saying that there are 0 missing values on each timeslice, whereas opening the file in R shows 224 missing values on each timeslice.

cdo info prec.rcp45.EC-EARTH.HIRHAM5.day.NAM-44i.mbcn-Daymet.nc.nc4

I am using CDO version 1.9.9rc1 in Ubuntu

I need cdo to correctly identify missing values so that I can fill them with setmisstonn or setmisstodis.

Thanks for any help.
--Michelle


Replies (2)

RE: cdo info says miss=0 but there are 224 missing values - Added by Ralf Mueller over 3 years ago

hi Michelle!

your input uses CF-conform attributes to declare the missing value:

float prec(time, lat, lon) ;
                prec:_FillValue = 1.e+20f ;
                prec:missing_value = 1.e+20f ;

Unfortunately the data does NOT use this value, but 'NaN'. Hence CDO does not recognize the NaNs as missing value. When you tell CDO that the missing value is nan, it can correctly interpret the data field
cdo -infov -setmissval,nan prec.rcp45.EC-EARTH.RCA4.day.NAM-44i.mbcn-Daymet.nc.nc4
cdo(1) setmissval: Process started
Warning (cdfScanVarAttr): NetCDF: Variable not found - time_bnds
Warning (cdfInqContents): Coordinates variable time can't be assigned!
Warning (cdfInqHistoryString): History attribute with type NC_STRING unsupported!
    -1 :       Date     Time   Level Gridsize    Miss :     Minimum        Mean     Maximum : Parameter name
     1 : 2006-01-01 12:00:00       0      345     224 :      0.0000      20.081      35.970 : prec          
     2 : 2006-01-02 12:00:00       0      345     224 :      0.0000      3.7081      34.592 : prec          
     3 : 2006-01-03 12:00:00       0      345     224 :      0.0000     0.27496      5.1793 : prec          
     4 : 2006-01-04 12:00:00       0      345     224 :      0.0000     0.24814      12.570 : prec          
     5 : 2006-01-05 12:00:00       0      345     224 :      0.0000     0.32385      4.5415 : prec          
     6 : 2006-01-06 12:00:00       0      345     224 :      0.0000    0.014308     0.62445 : prec          
     7 : 2006-01-07 12:00:00       0      345     224 :      0.0000      6.5022      32.465 : prec          
     8 : 2006-01-08 12:00:00       0      345     224 :      0.0000     0.40284      6.2324 : prec          
     9 : 2006-01-09 12:00:00       0      345     224 :      0.0000    0.056713      1.8952 : prec          
    10 : 2006-01-10 12:00:00       0      345     224 :      0.0000     0.12273      2.8154 : prec          
....

RE: cdo info says miss=0 but there are 224 missing values - Added by Michelle Irizarry over 3 years ago

Oh! This really helps! Thanks so much! I was wondering why it was not working properly!

    (1-2/2)