[gradsusr] (no subject)
Jeff Duda
jeffduda319 at gmail.com
Fri Nov 13 15:04:23 EST 2015
For the units section of a vars entry for netCDF files, you need to input
the dimension ordering in the netcdf file. This is easily obtained by the
order of the dimensions in the header entry for each array in the output
from ncdump. As you have shown, for q, the order is time, a vertical
dimension, then lat and lon. There are special one-character codes that you
need to use in a Grads control file. It's pretty straightforward:
t for time
z for vertical dimension
y for south-north dimension
x for west-east dimension
With that, it should make sense that what you want to put in place of '99'
is t,z,y,x. I don't know if spaces are a concern, but to be save, don't
include any.
Jeff Duda
On Fri, Nov 13, 2015 at 1:53 PM, Luis Blacutt <luis.blacutt at gmail.com>
wrote:
> Dear Grads users
>
> I have a problem generating a ctl file to read 11 years of data downloaded
> from ECWMF. I can read individually with sdfopen, however, when I tried to
> create a ctl file I think I have problems declaring the variable. My
> ctl file looks like this
>
> DSET ^q-%y4.nc
> UNDEF -999.99
> OPTIONS little_endian yrev zrev template
> DTYPE netcdf
> XDEF 111 linear 275.000000 0.500000
> YDEF 135 linear -55.000000 0.500000
> TDEF 16072 linear 00:00Z01jan1999 6hr
> zdef 11 levels 1000.000000 925.000000 850.000000 700.000000 500.000000
> 300.000000 250.000000 200.000000 100.000000 20.000000 10.000000
> vars 1
> q 11 99 Specific humidity [kg kg**-1]
> endvars
>
> I read that I can not use 99 for my variable definition, however I'm
> clueless about what to put in that line
>
> The ncdump -h from an individual netcdf file looks like this
> netcdf q-1999 {
> dimensions:
> longitude = 111 ;
> latitude = 135 ;
> level = 11 ;
> time = UNLIMITED ; // (1460 currently)
> variables:
> float longitude(longitude) ;
> longitude:units = "degrees_east" ;
> longitude:long_name = "longitude" ;
> float latitude(latitude) ;
> latitude:units = "degrees_north" ;
> latitude:long_name = "latitude" ;
> int level(level) ;
> level:units = "millibars" ;
> level:long_name = "pressure_level" ;
> int time(time) ;
> time:units = "hours since 1900-01-01 00:00:0.0" ;
> time:long_name = "time" ;
> time:calendar = "gregorian" ;
> short q(time, level, latitude, longitude) ;
> q:scale_factor = 3.60802682733904e-07 ;
> q:add_offset = 0.0118165291556829 ;
> q:_FillValue = -32767s ;
> q:missing_value = -32767s ;
> q:units = "kg kg**-1" ;
> q:long_name = "Specific humidity" ;
> q:standard_name = "specific_humidity" ;
>
> // global attributes:
> :Conventions = "CF-1.0" ;
> :history = "2015-11-03 16:49:08 GMT by grib_to_netcdf-1.13.1:
> grib_to_netcdf
> /data/data04/scratch/netcdf-atls20-a562cefde8a29a7288fa0b8b7f9413f7-AHRBQo.target
> -o
> /data/data04/scratch/netcdf-atls20-a562cefde8a29a7288fa0b8b7f9413f7-ZNlmj2.nc
> -utime" ;
> }
>
> Best regards
> Luis
>
> _______________________________________________
> gradsusr mailing list
> gradsusr at gradsusr.org
> http://gradsusr.org/mailman/listinfo/gradsusr
>
>
--
Jeff Duda
Graduate research assistant
University of Oklahoma School of Meteorology
Center for Analysis and Prediction of Storms
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://gradsusr.org/pipermail/gradsusr/attachments/20151113/61707338/attachment.html
More information about the gradsusr
mailing list