Re: error reading grib data

From: David Brown <dbrown_at_nyahnyahspammersnyahnyah>
Date: Wed Dec 09 2009 - 15:34:06 MST

Hi Yan Mi,

NCL was reading the file correctly but it was not generating the
Gaussian latitude coordinates (stored in variable g4_lat_2) properly.
This was because there are incorrect out-of-range values in the GRIB
file for the min and max latitude values. These are stored in the
variable attributes 'La1' and 'La2'. NCL was confused by the incorrect
values, but I have fixed the problem now. However, since there are
still incorrect values for La1 and La2, NCL still generates a warning.
However, the warning is not fatal and the the lat coordinate values
are created correctly. I have run grib2ctl on the file and verified
that NCL is generating the same lat values as grib2ctl does. If you
let us know what kind of system you are using we can supply you with a
new version of NCL containing the fix. Just send Mary Haley the
results of running
  uname -a
at the shell prompt.

In the meantime, if you are in a hurry, you could get the latitude
values you need by copying them directly into your script from the ctl
file you generated. Or since it is a small number of values you could
just paste this into your code:

g4_lat_2 = (/ 81.65, 70.83, 59.95, 49.06, 38.16, 27.26, \
    16.36, 5.452, -5.452, -16.36, -27.26, -38.16, \
   -49.06, -59.95, -70.83, -81.65 /)

Then for example, you could do:

f = addfile("levelsECHAM64010_a10_100001.grb","r")
t = f->T_GDS4_ISBL_10
t&g4_lat_2 = (/ g4_lat_2 /)


On Dec 3, 2009, at 6:46 PM, 蜜严 wrote:

> dear sir,
> I'm learning NCL now, and I run into problem when reading one data,
> named 'levelsECHAM64010_a10_1000001', no suffix or extension. The
> data provider said it's a grib data. But one error appeard when
> using 'ncl_convert2nc', that is 'file 'levelsECHAM64010_a10_1000001'
> not readable, does not contain recognized data, or doesn't exist,
> skipping.'
> Would you please tell me how I can convert this data to a netCDF
> data? I can attach this file if necessary. Thank you!
> With best regards!
> YAN Mi
> _______________________________________________
> ncl-talk mailing list
> List instructions, subscriber options, unsubscribe:

ncl-talk mailing list
List instructions, subscriber options, unsubscribe:
Received on Wed Dec 9 15:34:11 2009

This archive was generated by hypermail 2.1.8 : Thu Dec 10 2009 - 11:30:59 MST