Re: A Quick Question of NCL (ncl_convert2nc), Thanks!

From: David Brown <dbrown_at_nyahnyahspammersnyahnyah>
Date: Mon, 1 Jun 2009 12:57:41 -0600

Hi Xiaoming,

Actually, the file you have is okay. The reason you are getting this
error message is because the GRIB file, as read by NCL, has several
variables whose names begin with digits, such as 5WAVH_3_ISBL_10,
5WAVH_3_ISBL_10, and 4LFTX_3_SFC_10. Presumably you are using NCL
5.0.0, which was built with NetCDF 4.0. NetCDF 4.0 changed previous
NetCDF behavior to disallow variables with names that begin with
digits, causing the error message that you received. However, the
most recent version of NetCDF restores the previous behavior and
again allows variable names to begin with a digit.

The solution for you is to upgrade your version of NCL to 5.1.0,
which is built with a newer version of NetCDF.
  -dave

On Jun 1, 2009, at 10:22 AM, Dennis Shea wrote:

> I am not sure what the problem is.
>
> We can do an 'ncl-filedump', 'ncl_convert2nc' and open
> the file in a regular NCL script. We have done this
> on a MAC and on several linux OSs. I am attaching
> a gzip'd dump of the file.
>
> If you downloaded the file via ftp and, inadvertently, used
> 'ascii' mode then you would get bogus characters.
>
>
>
>
>
>
>
> Xiaoming Sun wrote:
>> Thanks for your reply!
>> However, the command you suggested
>> ncl_convert2nc fnl_090101_18_00_c.grb
>> still does not work for me, at least.
>> I still get the same error message as following,
>> +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
>> +++++++++
>> fatal:NetCDF: Name contains illegal characters
>> fatal:FileAddVar: an error occurred while adding a variable to a
>> file, check to make sure data type is supported by the output format
>> fatal:Execute: Error occurred at or near line 333 in file /tmp/
>> tmp12547.nc
>> +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
>> +++++++++
>> This happens to me on any NCEP-FNL 1by1 degree data.
>> Although it looks like the naming of the variables in the GRIB
>> file may have some confliction with the key words either in NetCDF
>> or NCL,
>> I cannot figure out how to go through it.
>> Could you please download one of them from
>> http://dss.ucar.edu/datasets/ds083.2/
>> by clicking "Data Access" and try?
>> Thank you very much!
>> Best Regards,
>> Xiaoming
>> On Sun 05/31/09 7:36 PM , Dennis Shea <shea_at_ucar.edu> wrote:
>> The following works
>> %> ncl_convert2nc fnl_090101_18_00_c.grb
>> NCL will look for fnl_090101_18_00_c.grb and if it does not
>> find it, NCL will look for the fnl_090101_18_00_c file and
>> 'remember'
>> to treat it as a grib file.
>> Xiaoming Sun wrote:
>> > Dear Sir or Madam,
>> >
>> > Thank you in advance for reading this E-mail!
>> >
>> > I am trying to convert the NCEP-FNL Grib data into NetCDF
>> format
>> using
>> > the following command
>> > ++++++++++++++++++++++++++++++++
>> > ncl_convert2nc fnl_090101_18_00_c -e grb
>> > ++++++++++++++++++++++++++++++++
>> >
>> > However, I got the following error message
>> >
>> +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
>> +++++++++++++++++++++++++++++++
>> > fatal:NetCDF: Name contains illegal characters
>> > fatal:FileAddVar: an error occurred while adding a variable
>> to a
>> > file, check to make sure data type is supported by the
>> output format
>> > fatal:Execute: Error occurred at or near line 333 in file
>> > /tmp/tmp10772.ncl
>> >
>> +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
>> +++++++++++++++++++++++++++++++
>> >
>> > Could you please give some suggestions on going through
>> this problem?
>> > Thanks!
>> >
>> > The following is some information bout our system
>> > ++++++++++++++++++++++++++++++++++++++
>> > NCL: 5.1.0
>> > Grib Data Used: http://dss.ucar.edu/
>> <parse.php?redirect=http%3A%2F%2Fdss.ucar.edu%2F> [1] (1-
>> degree FNLs
>> [2]) at
>> > http://dss.ucar.edu/datasets/ds083.2/
>> <parse.php?redirect=http%3A%2F%2Fdss.ucar.edu%2Fdatasets%
>> 2Fds083.2%2F>
>> [3]
>> > Our System: Linux kubango.pratt.duke.edu 2.6.27.19-3.2-
>> default #1
>> > SMP 2009-02-25 15:40:44 +0100 x86_64 x86_64 x86_64 GNU/Linux
>> > ++++++++++++++++++++++++++++++++++++++
>> >
>> > Thank you in advance for your help!
>> >
>> > Best Regards,
>> >
>> > Xiaoming
>> > *************************************************
>> > Xiaoming Sun
>> > 2417 CIEMAS Bldg.
>> > Department of Civil and Environmental Engineering
>> > Pratt School of Engineering
>> > Duke University
>> > Durham, NC, 27708, USA
>> > Phone: 919-660-5559 Fax: 919-660-5219
>> > E-mail: xiaoming.sun_at_duke.edu
>> <javascript:top.opencompose('xiaoming.sun_at_duke.edu','','','1')>
>> > *************************************************
>> >
>> >
>> >
>>
>> ---------------------------------------------------------------------
>> ---
>> >
>> > _______________________________________________
>> > ncl-talk mailing list
>> > List instructions, subscriber options, unsubscribe:
>> > http://mailman.ucar.edu/mailman/listinfo/ncl-talk
>> <parse.php?redirect=http%3A%2F%2Fmailman.ucar.edu%2Fmailman%
>> 2Flistinfo%2Fncl-talk><dump.fnl_090101_18_00_c.grb.gz>
> _______________________________________________
> ncl-talk mailing list
> List instructions, subscriber options, unsubscribe:
> http://mailman.ucar.edu/mailman/listinfo/ncl-talk

_______________________________________________
ncl-talk mailing list
List instructions, subscriber options, unsubscribe:
http://mailman.ucar.edu/mailman/listinfo/ncl-talk
Received on Mon Jun 01 2009 - 12:57:41 MDT

This archive was generated by hypermail 2.2.0 : Mon Jun 08 2009 - 09:30:31 MDT