[ncl-talk] issue with ncl_convert2nc

David Brown dbrown at ucar.edu
Fri Aug 11 16:28:53 MDT 2017


Hi Laura,

Dave Stepaniak is correct. The backslash is not really part of the
name. If you look at the same file with ncl_filedump you will not see
the backslash. Here is an email from Russ Rew a while back that
explains the story with variable/attribute/dimension names in NetCDF.
https://www.unidata.ucar.edu/support/help/MailArchives/netcdf/msg10684.html

Note the paragraph near the end:

"Note that the CDL notation has to escape some characters in names, for
example leading numeric characters, so that a variable named "5DegAvg"
would appear in CDL as "\5DegAvg"."

I think the reason for this is to help make the output of ncdump
usable as input for ncgen.

A related note also from Russ Rew in another message:

"A bug in netCDF 3.6.3 and 4.0 disallowed names like '2t', <i.e. names
that start with numbers> but that bug
was fixed in release 4.0.1 and subsequent releases, including the
current 4.1.1."


 -dave

On Fri, Aug 11, 2017 at 3:38 PM, Laura Fowler <laura at ucar.edu> wrote:
> Hi:
>
> I also forgot to mention that I am using ncl 6.4.0 . The file
> ei.oper.an.sfc.regn128sc.2015112900 is in the directory
> /glade/p/work/laura/DATA/ERA-INTERIM/MPAS.PacificOCean/fromRDA/2015
>
> file_grb points to ei.oper.an.sfc.regn128sc.2015112900 and file.nc is
> the output upon using ncl_convert2nc. After contacting Dave Stepaniak,
> David suggested that it may be because the filed name starts with a
> number and not with a letter?
>
> Thanks,
> Laura
>
>
>
> On Fri, Aug 11, 2017 at 11:31 AM, Laura Fowler <laura at ucar.edu> wrote:
>> Hi:
>>
>> I am using ncl_convert2nc to convert an grib file from ERA-Interim
>> data (ei.oper.an.sfc.regn128sc.2015112900). Looking at the header of
>> the netCDF file, it looks like there are a back slash in front of the
>> attributes for the variables 10U_GDS4_SFC, 10V_GDS4_SFC, 2T_GDS4_SFC,
>> 2D_GDS4_SFC, but I did not see that any of the data were corrupted.
>> Can someone tell me why there are some back slash in front of those
>> variables and not in front of others?
>>
>> Thanks,
>> Laura
>>
>>
>> --
>> !-------------------------------------------------------------------------------------------------------------
>> Laura D. Fowler
>> Mesoscale and Microscale Meteorology Division (MMM)
>> National Center for Atmospheric Research
>> P.O. Box 3000, Boulder CO 80307-3000
>>
>> e-mail: laura at ucar.edu
>> phone: 303-497-1628
>>
>> !-------------------------------------------------------------------------------------------------------------
>
>
>
> --
> !-------------------------------------------------------------------------------------------------------------
> Laura D. Fowler
> Mesoscale and Microscale Meteorology Division (MMM)
> National Center for Atmospheric Research
> P.O. Box 3000, Boulder CO 80307-3000
>
> e-mail: laura at ucar.edu
> phone: 303-497-1628
>
> !-------------------------------------------------------------------------------------------------------------
> _______________________________________________
> ncl-talk mailing list
> ncl-talk at ucar.edu
> List instructions, subscriber options, unsubscribe:
> http://mailman.ucar.edu/mailman/listinfo/ncl-talk


More information about the ncl-talk mailing list