[Thread Prev][Thread Next][Index]

Re: bad flag gets reset



Kaduk, Dr J. wrote:

Hi,
just came across this today as well. Seems that the missing value flag
is indeed reset whenever you do a calculation or define a new variable.
You can specify the missing value flag by including the /bad option in the variable definition:
let/bad=1.0000000E+20 xxx=.....
'hope that helps
cheers,
Joerg

________________________________

From: owner-ferret_users@pmel.noaa.gov on behalf of Steve Knox
Sent: Thu 7/1/2004 17:23
To: ferret_users@noaa.gov
Subject: bad flag gets reset


Hi,
I'm computing the following and it appears that the missing vlaue defined in my netcdf file is getting
reset when I compute the ration of @var/@ave. The missingvalue is 1.0000000E+20 but when I compute @var/@ave the bad flag is set to -9.9999998E+33 (= -0.1000E+35)
I would have expected the missing value to remain the same, ie 1.0000000E+20.
Any ideas?
Here's the Netcdf header:

obs.globe.lan.1901-2000.pre.annual {
dimensions:
lon = 720 ;
lat = 360 ;
time = UNLIMITED ; // (100 currently)
variables:
float lon(lon) ;
lon:units = "degrees_east" ;
lon:valid_min = -180.f ;
lon:valid_max = 180.f ;
lon:title = "Longitude" ;
float lat(lat) ;
lat:units = "degrees_north" ;
lat:valid_min = -90.f ;
lat:valid_max = 90.f ;
lat:title = "Latitude" ;
float time(time) ;
time:units = "years since 1900-01-01" ;
time:title = "Time" ;
time:long_name = "Time axis" ;
time:time_origin = " 1900-01-15 00:00:00" ;
float pre(time, lat, lon) ;
pre:units = "mm/month" ;
pre:long_name = "Precipitation" ;
pre:missing_value = 1.e+20f
yes? set region/i=1:1/j=1:1 !look at a grid cell that I know is missing
yes? list/l=1:1/format=(e15.6) pre[l=@ave]
VARIABLE : Precipitation (mm/month)
FILENAME : obs.globe.lan.1901-2000.pre.annual.nc
BAD FLAG : 1.0000000E+20
LONGITUDE: 179.8W(-179.8)
LATITUDE : 89.8S
TIME : 02-JUL-1900 14:54 to 02-JUL-1901 20:43 (averaged)
0.100000E+21 (OK)
yes? list/l=1:1/format=(e12.4) pre[l=@var]
VARIABLE : Variance of Precipitation ((mm/month)^2)
FILENAME : obs.globe.lan.1901-2000.pre.annual.nc
BAD FLAG : 1.0000000E+20
LONGITUDE: 179.8W(-179.8)
LATITUDE : 89.8S
TIME : 02-JUL-1900 14:54 to 02-JUL-1901 20:43 (variance)
0.1000E+21 (OK)
yes? list/l=1:1/format=(e12.4) pre[l=@var]/pre[l=@ave]
VARIABLE : PRE[L=@VAR]/PRE[L=@AVE]
FILENAME : obs.globe.lan.1901-2000.pre.annual.nc
BAD FLAG : -9.9999998E+33 (aka -0.1000E+35)
LONGITUDE: 179.8W(-179.8)
LATITUDE : 89.8S
TIME : 02-JUL-1900 14:54 to 02-JUL-1901 20:43
-0.1000E+35 (NOT OK)



Thanks for your suggestion! It seems to work. This is what I did:
yes? let/bad=1.0E+20 *ratio*=pre[D=1,l=@var]/pre[D=1,l=@ave]
yes? list/t="15-jan-1946":"15-dec-1995"/... *ratio*


I guess the point is that in a calculation, the variables in the calculation don't necessarily have the *same* missing value so Ferret supplies a new one for the result.


[Thread Prev][Thread Next][Index]

Dept of Commerce / NOAA / OAR / PMEL / TMAP

Contact Us | Privacy Policy | Disclaimer | Accessibility Statement