[gradsusr] bug in converting hPa to mb

Geert Jan van Oldenborgh gjvo at me.com
Fri May 31 12:56:36 EDT 2019


I use GrADS as the plotting package of climexp.knmi.nl. Recently I moved to a new server and a new version of GrADS. This gives problems with plotting fields that have a non-trivial level value in heir z axis. An example is shown below on my macOS system. Does anybody know a fix or workaround (better than converting all files to mb)?

Greetings,
	Geert Jan van Oldenborgh

[gatotkaca] [18:49] ~/NINO/ERA-interim% grads

Grid Analysis and Display System (GrADS) Version 2.2.1
Copyright (C) 1988-2018 by George Mason University
GrADS comes with ABSOLUTELY NO WARRANTY
See file COPYRIGHT for more information

Config: v2.2.1 little-endian readline grib2 netcdf hdf4-sds hdf5 opendap-grids geotiff shapefile
Issue 'q config' and 'q gxconfig' commands for more detailed configuration information
GX Package Initialization: Size = 11 8.5 
Hoi Geert Jan
ga-> sdfopen erai_z500_daily.nc 
Scanning self-describing file:  erai_z500_daily.nc
SDF file erai_z500_daily.nc is open as file 1
LON set to 0 360 
LAT set to -89.4628 89.4628 
LEV set to 500.99 500.99 
Time values set: 1979:1:1:12 1979:1:1:12 
E set to 1 1 
Notice: Z coordinate pressure values have been converted from Pa to mb
ga-> q file
File 1 : 
  Descriptor: erai_z500_daily.nc
  Binary: erai_z500_daily.nc
  Type = Gridded
  Xsize = 512  Ysize = 256  Zsize = 1  Tsize = 13514  Esize = 1
  Number of Variables = 1
     z500  1  t,z,y,x  z500
ga-> q dims
Default file number is: 1 
X is varying   Lon = 0 to 360   X = 1 to 513
Y is varying   Lat = -89.4628 to 89.4628   Y = 1 to 256
Z is fixed     Lev = 500.99  Z = -49498
T is fixed     Time = 12Z01JAN1979  T = 1
E is fixed     Ens = 1  E = 1
ga-> d z500
Data Request Error: Invalid grid coordinates
  World coordinates convert to non-integer  grid coordinates
    Variable = z500  Dimension = 2 
  Error ocurred at column 1
DISPLAY error:  Invalid expression 
  Expression = z500

The netcdf file looks like this (and can be retrieved from climexp.knmi.nl/ERA-interim/erai_z500_daily.nc

netcdf erai_z500_daily {
dimensions:
	lon = 512 ;
	lat = 256 ;
	lev = 1 ;
	time = UNLIMITED ; // (13514 currently)
variables:
	double lon(lon) ;
		lon:standard_name = "longitude" ;
		lon:long_name = "longitude" ;
		lon:units = "degrees_east" ;
		lon:axis = "X" ;
	double lat(lat) ;
		lat:standard_name = "latitude" ;
		lat:long_name = "latitude" ;
		lat:units = "degrees_north" ;
		lat:axis = "Y" ;
	double lev(lev) ;
		lev:standard_name = "air_pressure" ;
		lev:long_name = "pressure" ;
		lev:units = "Pa" ;
		lev:positive = "down" ;
		lev:axis = "Z" ;
	double time(time) ;
		time:standard_name = "time" ;
		time:units = "hours since 1979-01-01 00:00:00" ;
		time:calendar = "proleptic_gregorian" ;
	float z500(time, lev, lat, lon) ;
		z500:code = 129 ;
		z500:table = 128 ;
		z500:grid_type = "gaussian" ;

// global attributes:
		:CDI = "Climate Data Interface version 1.6.5.1 (http://code.zmaw.de/projects/cdi)" ;
		:history = "Mon Apr 04 16:03:19 2016: cdo -r -R -b 32 -f nc4 -z zip copy z5001979.nc z5001980.nc z5001981.nc z5001982.nc z5001983.nc z5001984.nc z5001985.nc z5001986.nc z5001987.nc z5001988.nc z5001989.nc z5001990.nc z5001991.nc z5001992.nc z5001993.nc z5001994.nc z5001995.nc z5001996.nc z5001997.nc z5001998.nc z5001999.nc z5002000.nc z5002001.nc z5002002.nc z5002003.nc z5002004.nc z5002005.nc z5002006.nc z5002007.nc z5002008.nc z5002009.nc z5002010.nc z5002011.nc z5002012.nc z5002013.nc z5002014.nc z5002015.nc erai_z500_daily.nc\nTue Apr 08 21:24:40 2014: cdo -r -R -b 32 -f nc4 -z zip -shifttime,-6hour aap.nc z5001979.nc\nTue Apr 08 21:24:26 2014: cdo -r -R -b 32 -f nc4 -z zip -setname,z500 -daymean z5001979.grib aap.nc" ;
		:institution = "European Centre for Medium-Range Weather Forecasts" ;
		:Conventions = "CF-1.0" ;
		:CDO = "Climate Data Operators version 1.6.5.1 (http://code.zmaw.de/projects/cdo)" ;
data:

 lon = 0, 0.703125, 1.40625, 2.109375, 2.8125, 3.515625, 4.21875, 4.921875, 
    ...5, 359.296875 ;

 lat = 89.4628215685774, 88.7669513528422, 88.0669716474306, 87.366063433082, 
    ..., -89.4628215685774 ;

 lev = 50000 ;

 time = 12, 36, 60, 84, 108, 132, 156, 180, 204, 228, 252, 276, 300, 324, 
    ..., 324324 ;
}




More information about the gradsusr mailing list