[gradsusr] [EXTERNAL] [BULK] netcdf group variable

Adams, Jennifer M. (GSFC-619.0)[ADNET SYSTEMS INC] jennifer.m.adams at nasa.gov
Mon Nov 20 14:52:58 EST 2023


It should work if you change:
dtype netcdf
to
dtype hdf5_grid

The HDF5 interface does support groups, and netcdf4 is really an hdf5 file under the hood.
--Jennifer

--
Jennifer Miletta Adams
Senior Scientific Software Developer
Goddard Earth Sciences Data and Information Services Center (GES DISC)
NASA/GSFC, Code 619
Building 32, Room S159



From: gradsusr <gradsusr-bounces at gradsusr.org> on behalf of M.Mahakur <mmahakur at tropmet.res.in>
Date: Monday, November 20, 2023 at 2:43 PM
To: GrADS Users Forum <gradsusr at gradsusr.org>
Subject: [EXTERNAL] [BULK] [gradsusr] netcdf group variable
CAUTION: This email originated from outside of NASA.  Please take care when clicking links or opening attachments.  Use the "Report Message" button to report suspicious messages to the NASA SOC.


Dear All,

I like to display the variable "value" from the attached small netcdf file. I feel the pressure level variable is in the group 'IWC/PressureGrid'. For this I created the ctl :

dset MLS-Aura_L3DB-IWC_v04-24-c01_2022d365.nc
title MLS IWC
dtype netcdf
undef -999.99
xdef 72 linear -177.5   5.0
ydef 45 linear -88.0    4.0
zdef 29 levels 1000, 825.4042, 681.2921, 562.3413, 464.1589, 383.1187, 316.2278, 261.0157, 215.4435, 177.8279, 146.7799, 121.1528, 100, 82.54042, 68.1292, 56.23413, 46.41589, 38.31187, 31.62278, 26.10157, 21.54435, 17.78279, 14.67799, 12.11528, 10, 1, 0.1, 0.01, 0.001
tdef 1 linear 1DEC2022 1dy
vars 1
/IWC/PressureGrid/value=>val 29 t,z,x,y IWC (mg/m3)
endvars

But, it does not works. It seems it does not matches with the variable!

ga-> d val
Error: Variable /IWC/PressureGrid/value not in netcdf file
Data Request Error:  Error for variable 'val'
  Error ocurred at column 1
DISPLAY error:  Invalid expression
  Expression = val

i am using Grads 2.0.a9. A portion from the ncdump is:

=========================

group: IWC\ PressureGrid {
  dimensions:
        lat = 45 ;
        lon = 72 ;
        lev = 29 ;
        time = 1 ;
        nv = 2 ;
  variables:

....
...

float value(time, lev, lon, lat) ;
                string value:long_name = "Average Value of Cloud Ice" ;
                string value:units = "mg/m!U3!N" ;
                value:_FillValue = -999.99f ;
                string value:comments = "The average value in a bin" ;
============================

Please suggest, where to modify in the ctl.

Thanks and Regards,

Mahakur

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://gradsusr.org/pipermail/gradsusr/attachments/20231120/d23d413a/attachment.html>


More information about the gradsusr mailing list