Could not retrieve add offset

Jennifer M. Adams jma at COLA.IGES.ORG
Sat May 20 16:14:58 EDT 2006


Dear Paul, et al.,
OK, so you could read this file with sdfopen and do it the way Hoop
suggests. But if templating with sdfopen often leads to core dumps on
your operating system, then it's perfectly reasonable to do it with a
'dtype netcdf' descriptor. User's choice. My greater concern is why
the 'dtype netcdf' interface isn't retrieving the 'add_offset' or the
'missing_value' attributes properly for you.

I downloaded a NetCDF file from CDC -- daily means of SLP for 1999
with the identical ncdump output -- and used your descriptor file
with this data set and it read the slp data on my mac without any
problems at all:

ga-> open /data/netcdf/rean/slp.ctl
Scanning description file:  /data/netcdf/rean/slp.ctl
Data file /data/netcdf/rean/slp.%y4.nc is open as file 1
LON set to 0 360
LAT set to -90 90
LEV set to 1 1
Time values set: 1999:1:1:0 1999:1:1:0
ga-> q file
File 1 : NCEP Reanalysis Daily Averages
   Descriptor: /data/netcdf/rean/slp.ctl
   Binary: /data/netcdf/rean/slp.%y4.nc
   Type = Gridded
   Xsize = 144  Ysize = 73  Zsize = 1  Tsize = 731
   Number of Variables = 1
     slp 0 -103 mean Daily Sea Level Pressure [Pa]
ga-> d slp
Contouring: 97000 to 105000 interval 1000
ga->


The attributes of this file are exactly the same, so ... why doesn't
it work for you???

On May 18, 2006, at 8:42 PM, Willis, Paul ENV:EX wrote:
> Running GrADS 1.9b4 on linux.
Which executable are you using:  gradsnc, gradshdf, or gradsdods?
Which linux: RH7.1, RH9, or RHE3?

  Jennifer

>
>
> Thanks in advance for any guidance.
>
> -paul
> *********************
>
>
> ga-> q dim
>
> Default file number is: 1
>
> X is varying   Lon = 0 to 360   X = 1 to 145
>
> Y is varying   Lat = -90 to 90   Y = 0.999999 to 73
>
> Z is fixed     Lev = 1  Z = 1
>
> T is fixed     Time = 00Z01JAN1999  T = 1
>
> ga-> d slp
> "  -- using -1e+15 insteade data type for "missing_value
> " not handled
> -- using -1e+15 instead
>
> Warning: Could not retrieve add offset data type -- setting add
> offset to
> 0.0
>
> Contouring: -20000 to -16500
>  interval 500
>
> *********************
> here is my descriptor file
> *********************
> dset /home/pfwillis/2006/Grads/circulation/Climate/data/slp_daily.%
> y4.nc
> dtype netcdf
> options yrev template
> undef -1e15 missing_value
> unpack scale_factor add_offset
> title NCEP Reanalysis Daily Averages
> xdef 144 linear 0 2.5
> ydef 73 linear -90 2.5
> zdef   1 linear 1 1
> tdef 731 linear 00Z01jan1999 24hr
> vars 1
> slp 0 t,y,x mean Daily Sea Level Pressure [Pa]
> endvars
>
>
> *********************
> should an ncdump provide useful information on this, see below.
> *********************
>
>
> netcdf slp_daily.1999 {
> dimensions:
>  lon = 144 ;
>  lat = 73 ;
>  time = UNLIMITED ;
>  // (365 currently)
> variables:
>  float lat(lat) ;
>   lat:units = "degrees_north" ;
>
>   lat:actual_range = 90.f, -90.f ;
>   lat:long_name = "Latitude" ;
>
>  float lon(lon) ;
>   lon:units = "degrees_east" ;
>
>   lon:long_name = "Longitude" ;
>
>   lon:actual_range = 0.f, 357.5f ;
>  double time(time) ;
>
>   time:units = "hours since 1-1-1 00:00:0.0" ;
>
>   time:long_name = "Time" ;
>   time:actual_range = 17514144., 17522880. ;
>
>   time:delta_t = "0000-00-01 00:00:00" ;
>
> time:avg_period = "0000-00-01 00:00:00" ;
>  short slp(time, lat, lon) ;
>
> slp:long_name = "mean Daily Sea Level Pressure" ;
>
>   slp:valid_range = 87000.f, 115000.f ;
>
>   slp:actual_range = 92970.f, 110552.f ;
>
>   slp:units = "Pascals" ;
>
>   slp:add_offset = 119765.f ;
>
>   slp:scale_factor = 1.f ;
>
>   slp:missing_value = 32766s ;
>
>   slp:precision = 0s ;
>
>   slp:least_significant_digit = -1s ;
>
>  slp:GRIB_id = 2s ;
>
>   slp:GRIB_name = "PRMSL" ;
>
>   slp:var_desc = "Sea Level Pressure\n",
>    "P" ;
>
>   slp:dataset = "NCEP Reanalysis Daily Averages\n",
>    "AJ" ;
>
>   slp:level_desc = "Sea Level\n",
>    "I" ;
>
>   slp:statistic = "Mean\n",
>    "M" ;
>
>   slp:parent_stat = "Individual Obs\n",
>    "I" ;
>
>
> // global attributes:
>   :Conventions = "COARDS" ;
>
>   :title = "mean daily NMC reanalysis (1999)" ;
>
>   :base_date = 1999s, 1s, 1s ;
>
>   :history = "created 99/01/04 by Hoop (netCDF2.3)" ;
>
>   :description = "Data is from NMC initialized reanalysis\n",
>
>    "(4x/day).  It consists of most variables
> interpolated to\n",
>
>    "pressure surfaces from model (sigma) surfaces." ;
>
>   :platform = "Model" ;
>
>
> data:
>
>  lat = .......
>

Jennifer M. Adams
IGES/COLA
4041 Powder Mill Road, Suite 302
Beltsville, MD 20705
jma at cola.iges.org



More information about the gradsusr mailing list