[Thread Prev][Thread Next][Index]

Re: [ferret_users] missing value not detected in double-precision ferret



Hi Russ,

yes, I pointed out in my earlier email that I had made a mistake.

After my correction it turned out that declaring '_FillValue' solves the issue while declaring 'missing_value' does not.

Sorry for the confusion about that.

Best wishes,
Hella



On 11/06/13 02:49, Russ Fiedler wrote:

Hi Hella,

In your third example you tried to use the attribute "missing" to denote
the missing value. You really need to call this either "missing_value"
or "_FillValue" and Ferret will pick this up (along with other software
that recognises CF standard files).

Adding the missing value attribute with nco may or may not be a quick
task. If there isn't sufficient space in the definition part of the file
nco may have to make a temporary copy of each file. Still, in the long
term it will probably be worth it to have CF compliant files.

Russ

On Mon, 2013-06-10 at 23:13 +0200, Hella Riede wrote:
Dear ferret list,

there is a problem reading our climate model netcdf files with the new
ferret double precision version. I boiled it down to a set of small
files in the attachment.

'-1E+34' is not recognized as 'missing value' (see 'ex_float'). To save
space, all variables except dimensional variables in our climate model
output are defined as "float" = "single precision".

When a netcdf file is read into double-precision ferret, the entry
'-1E+34' in a float (single precision) variable is not recognized as
'missing value' anymore, but has a numerical value of
-9.999999790214768E+33 (prec=16). The bad values are thus not masked,
which is inconvenient for plotting or analysis.

yes? list press
                  VARIABLE : pressure (Pa)
                  FILENAME : ex_float.nc
                  SUBSET   : 3 points (TIME)
      01-JAN-2000 00:20:00 / 1:  1.000E+04
      01-JAN-2000 00:40:00 / 2: -1.000E+34
      01-JAN-2000 01:00:00 / 3:  1.000E+05

The workaround 'set var/bad=-9.999999790214768E+33
<variable>' is inconvenient as well.

Interestingly, when listing the bad value of the variable, the bad-value
masking seems to work:

yes? list `press,ret=bad`
      !-> list -1.E+34
                  VARIABLE : constant
             ....

In 'ex_double' (attachment), I exchanged 'float' to 'double' by hand for
all variables. The value '-1E+34' is then recognized correctly:

yes? list press
                  VARIABLE : pressure (Pa)
                  FILENAME : ex_traj2.nc
                  SUBSET   : 3 points (TIME)
      01-JAN-2000 00:20:00 / 1:   10000.
      01-JAN-2000 00:40:00 / 2:     ....
      01-JAN-2000 01:00:00 / 3:  100020.

The explicit definition of a missing value in the netCDF file does not
solve the issue (attachment: ex_float_missing).

Please help us with backwards compatibility as we cannot go into several
terabyte of climate data output to change "float" to "double" in the
variable definitions.


Thanks a lot in advance,
Hella


[Thread Prev][Thread Next][Index]
Contact Us
Dept of Commerce / NOAA / OAR / PMEL / Ferret

Privacy Policy | Disclaimer | Accessibility Statement