LATS4D
Lisa Murphy
lmurphy at ATMOS.UMD.EDU
Mon Feb 11 17:30:43 EST 2008
Hello Grads users,
I'm having issues with the lats4d.gs script. I have a simulation from NCARs
Community Atmosphere Model. My files are netcdf and I'm trying to convert
to GRIB. I modified the lats4d.gs script so that it puts in the correct
grib parameter values (idc), title, and units in the following statement,
which is in lats4d.gs:
record = name '| ' idc ' |' title ' | ' units ' | ' dattype ' | ' levtype '
| ' scale_factor ' | ' precision
I used values from the ncep parameter table found here:
http://dss.ucar.edu/docs/formats/grib/gribdoc/
and changed the ncar center information in the lats4d.gs script to have the
following:
process: 0
center: 7
subcenter: 1
and I also used the option: -center ncar
when invoking the lats4d script.
rc=write(fname,'ncar | 0 | 7 | 1',append)
It looks like it is successful and I can open up the new grib file in GrADS
and view all of the data. However, if I try to open the file in NCL and
look at the data it gives me a bunch of errors. It tells me that there is
an unknown grib parameter number:
1, center 7, table version 128 grib record 7), using default variable name
(VAR_1)
and,
the Gaussian latitude coordinate array is partially or wholly undefined.
The reason I'm posting here and not NCLs user board is because I think it's
an error with the lats4d.gs script. For example when I use the wgrib
command to view the information in the file it gives me:
rec 169:2751264:date 0002120106 HGT kpds5=7 kpds6=100 kpds7=4 levels=(0,4)
grid=255 4 mb anl:
HGT=Geopotential height [gpm]
timerange 0 P1 0 P2 0 TimeU 1 nx 128 ny 64 GDS grid 4 num_in_ave 0 missing 0
center 7 subcenter 1 process 0 Table 128 scan: WE:NS winds(N/S)
gaussian: lat -87.864000 to 87.864000
long 0.000000 to 357.188000 by 2.813000, (128 x 64) scan 2 mode
128 bdsgrid 1
min/max data 33488.4 38216.8 num bits 16 BDS_Ref 33488.4 DecScale 0
BinScale -3
How does the GrADS lats4d script specify the table number (in my case it
sets it to 128) but according to NCARs grib website it looks like it should
be either Table 3 or Table 180, and the grid number (in my case it sets it
to 4). My data is on a Gaussian T42 grid (128X64).
So basically I'm just confused about how this script works and how it write
the netCDF data to the new grib file. NCL tells me:
Invalid value for Gaussian LatLon grid in GDS octets 26-27;
I know that
26-27 N - number of parallels between a pole and the equator
but where do I specify this??
Thank you for your time and any help you can provide!!!
Lisa
More information about the gradsusr
mailing list