[gradsusr] bug in converting hPa to mb

Jennifer M Adams jadams21 at gmu.edu
Tue Jun 4 07:29:52 EDT 2019


Hi, Geert — 
I used the ‘xdfopen’ command with an entry to override the Z axis metadata:

dset ^erai_z500_daily.nc
zdef lev 1 levels 500

—Jennifer

> On May 31, 2019, at 12:56 PM, Geert Jan van Oldenborgh <gjvo at me.com> wrote:
> 
> 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://secure-web.cisco.com/1rM4vKVv7oNfnQZUWREsFef-S12JDSjhUpH58EtKOzXYc1PcAwzZQbYq2Zrwfll-t5QUjuv4azTcesATaC86eB2pn422r3PR-TV91DFBxp8NpAkCSauYZ7YBbsmvwKII4FSGN7pIsMCcu4smEsaf9OciXobbCM1t9rXakv_3gf3zNr6LlgTsiJaAbcjDHuNjhl__r3ND9-eeUy7NxNbRyo7o8Z56NHciyha2ch2Jdw4A_3zAprP5vr-nPkoVhB9Uq_FrRzF6hRJyFqIXoBOmMJFT0XsxfSmgWvFMy1rWYDg-dF98Fkh2hn0RSilEHSXIuYclG_-97sepMkeeN6FV4Bu3poQ01vpPtGpZe8ukNrl81N4BlavTPbu0eeUJSgn3p/http%3A%2F%2Fcode.zmaw.de%2Fprojects%2Fcdi%29" ;
> 		: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://secure-web.cisco.com/1IqRGM0DU_G4n5VogBQHeEcvld2iyRnp_-fwlNoinSH_IDEKHuBOpTvcTkgoV7MbP4dljR6OdmaZbPIN_pdFFcXgCNNtsPUSqpGxRYP9cqEtGaAaKdCilBKx_gZPz9Gjz8_hL5V2ss7eEMSIjJUuz0yo2fDvnlw0SjL0Ad4sGvRxFde_92QZJToQrw7nImSLHqwWhufjxVIjVO3o43m1EAgwUNodcaxKX8WIfDjEDRnAwr0WzHqrqTacdEkxS0Cl7-Mn70UJqlEo12pDKyWdf7l8i6RPAjMbyfKP0JhXdYE96vKPV4PBS08hdC1i4lWf_ajcK0X_S_bI_ncQaLCyq0ABWGMWcCFzu2Rf8RvfGaRGI9donGlu-XlAjdoTRjB9-/http%3A%2F%2Fcode.zmaw.de%2Fprojects%2Fcdo%29" ;
> 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 ;
> }
> 
> 
> _______________________________________________
> gradsusr mailing list
> gradsusr at gradsusr.org
> http://secure-web.cisco.com/1iWciCTH6NS7i4AYOKpv7Iq40qjFU3KoxfXzoSHPlcKQYV0MvceD8vFvFW39D3wovziGOoT2HygC6j_8q_jCVIKgZlga3-4QoN0jNiVudlxzYZK3lpAxdUf7MK3g9XQtGi7uKo0thdFWPCP-V8zGKRpXPU017EwHrcdyAOZuIBROmLxGjnsy_u6A1tHCmA8mhN3asy6usntAPKJ7jB0ArmFwsnWEDhtHssGyeT8cm0J_ZQKsnfvwdEmjPq2HvxfcZxBfXKr7EZLlgIdLTW7qyzPYBlcEPtFoDTTQ-bjqpbdKtCjUsfIFUpoS-klb2JZFeIzc4pykl-_2q2-SEtS4q1VwyhZL-HVkgnPZ6PnEb4kWdK3k-JYjBxHQJ7JL79dzU/http%3A%2F%2Fgradsusr.org%2Fmailman%2Flistinfo%2Fgradsusr
> 

--
Jennifer Miletta Adams
Center for Ocean-Land-Atmosphere Studies (COLA)
George Mason University






More information about the gradsusr mailing list