[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

20040226: NetCDF 3.5 variable names



Paul,

>Date: Thu, 26 Feb 2004 11:04:05 +0100
>From: =?ISO-8859-1?Q?Paul_R=E9gis?= <address@hidden>
>Organization: ONERA
>To: Steve Emmerson <address@hidden>
>Subject: Re: 20040225: NetCDF 3.5 variable names
> Keywords: 200402250844.i1P8iWrV006661 netCDF variable names

The above message contained the following:

> I mean that, when a cdl file containing such a variable name is given
> as an input to ncgen, I get the following error :<br>
> ncgen : point.cdl line 11 : parse error<br>
> The file point.cdl is included herewith<br>

Odd.  No error occurs when I create a netCDF file from your CDL using
version 3.5.0 of the netCDF package:

    $ /upc/netcdf/bin/ncdump -v 2>&1 | tail -1
    netcdf library version 3.5.0 of Mar 26 2001 09:30:17 $
    $ /upc/netcdf/bin/ncgen -o tmp/point.nc tmp/point.cdl
    $ /upc/netcdf/bin/ncdump -h tmp/point.nc | head -15
    netcdf point {
    dimensions:
            StringLength = 4 ;
            RecNbr = 1 ;
            Dim0003 = 3 ;
    variables:
            byte MyByte-1-TEST-(Dim0003) ;
                    MyByte-1-TEST-:long_name = "MyByte-1" ;
            short MyShort.50-TEST-(Dim0003) ;
                    MyShort.50-TEST-:long_name = "MyShort.50" ;
            int MyInt-TEST-(Dim0003) ;
                    MyInt-TEST-:long_name = "MyInt" ;
            float MyFloat-TEST-(Dim0003) ;
                    MyFloat-TEST-:long_name = "MyFloat" ;
            double MyDouble-TEST-(Dim0003) ;
    $ head -15 tmp/point.cdl
    netcdf point {

      dimensions:
        StringLength = 4;
        RecNbr = 1;
        Dim0003 = 3;

      variables:
        byte MyByte-1-TEST-(Dim0003);
              MyByte-1-TEST-:long_name = "MyByte-1";
        short MyShort.50-TEST-(Dim0003);
              MyShort.50-TEST-:long_name = "MyShort.50";
        int MyInt-TEST-(Dim0003);
              MyInt-TEST-:long_name = "MyInt";
        float MyFloat-TEST-(Dim0003);

The same correct behavior occurs with version 3.5.1 of the netCDF
package (the latest release).

What version of the netCDF package are you using?  Look at the file
VERSION in the top-level source directory.

> -----------------------------------------------------------------------
> Paul REGIS                                     ONERA                    
> Tel: (33) 04.79.20.20.75                       Centre de Modane Avrieux 
> Portable: 06.71.34.94.99
> Fax: (33) 04.79.20.21.68                       BP 25                    
> mailto: <a class="moz-txt-link-abbreviated" 
> href="mailto:address@hidden";>address@hidden</a>                    73500 
> MODANE - France
> <a class="moz-txt-link-freetext" 
> href="http://www.onera.fr";>http://www.onera.fr</a>    
> -----------------------------------------------------------------------
...
> netcdf point {
> 
>   dimensions:
>     StringLength = 4;
>     RecNbr = 1;
>     Dim0003 = 3;
> 
>   variables:
>     byte MyByte-1-TEST-(Dim0003);
>           MyByte-1-TEST-:long_name = "MyByte-1";
>     short MyShort.50-TEST-(Dim0003);
>           MyShort.50-TEST-:long_name = "MyShort.50";
>     int MyInt-TEST-(Dim0003);
>           MyInt-TEST-:long_name = "MyInt";
>     float MyFloat-TEST-(Dim0003);
>           MyFloat-TEST-:long_name = "MyFloat";
>     double MyDouble-TEST-(Dim0003);
>           MyDouble-TEST-:long_name = "MyDouble";
>     char MyChar-TEST-(Dim0003);
>           MyChar-TEST-:long_name = "MyChar";
> 
>     char RecordNames(RecNbr, StringLength);
>     int RecordStart(RecNbr);
>     int RecordEnd(RecNbr);
>     int RecordCounts(RecNbr);
>     int RecordOrder(Dim0003);
> 
>     int SERIES(Dim0003);
>     int RUN(Dim0003);
>     int POLAR(Dim0003);
>     int DPN(Dim0003);
> 
>     :Version = 105 ;
>     :CreationDate = "12-JAN-04" ;
>     :Provider = "ONERA" ;
>     :Title = "Validation test" ;
>     :RecordConcept = "FULL";
> 
>   data:
>     MyByte-1-TEST- = -128, 0, 127;
>     MyShort.50-TEST- = -32768, 0, 32767;
>     MyInt-TEST- = 2147483648, 0, 2147483647;
> 
>     MyFloat-TEST- = -3.40282346638528860e+38, -1.40129846432481707e-45, 
> 3.40282346638528860e+38;
>     MyDouble-TEST- = -1.79769313486231570E+308, -4.94065645841246544E-324, 
> 1.79769313486231570E+308;
> 
>     MyChar-TEST- = '!', 'p', '~';
> 
>     RecordNames = "TEST";
>     RecordStart = 1;
>     RecordEnd = 6;
>     RecordCounts = 3;
>     RecordOrder = 1, 1, 1;
> 
>     SERIES = -1, -1, -1;
>     RUN = 1000, 1000, 1000;
>     POLAR = 100, 101, 102;
>     DPN = 1, 2, 3;
> }

Regards,
Steve Emmerson