Due to the current gap in continued funding from the U.S. National Science Foundation (NSF), the NSF Unidata Program Center has temporarily paused most operations. See NSF Unidata Pause in Most Operations for details.

[netcdfgroup] ncgen Gives Error with Dimension Named "string"

Since its inception (~1992), our code has had a netCDF "dimension"
named "string".  This has never caused a problem in writing (classic)
netCDF files via the Fortran interface.

However, if I run ncdump on one of these files, followed by ncgen:

ncdump -p 7,17 bk_ncsx.nc > bk_ncsx.cdl
ncgen -o test_ncsx.nc bk_ncsx.cdl
ncgen: bk_ncsx.cdl line 4: syntax error, unexpected '='

Where line 4 contains:

string = 300 ;

If I change "string" to anything else, ncgen succeeds.  Moreover,
ncgen3 accepts the use of "string" as is; in fact, we have been using
ncgen3 as a workaround for some time.

As I understand it, there are no reserved names for dimensions or
variables in the netCDF specification; this is consistent with our
ability to write these netCDF files via the Fortran interface.  So, is
there a problem with ncgen here?

Thanks,
Daren Stotler


-- 
_______________________________________________________________
Daren Stotler
Senior Physicist
http://w3.pppl.gov/~dstotler
609-243-2063
Princeton Plasma Physics Laboratory
MS 27
P.O. Box 451
Princeton, NJ 08543


  • 2020 messages navigation, sorted by:
    1. Thread
    2. Subject
    3. Author
    4. Date
    5. ↑ Table Of Contents
  • Search the netcdfgroup archives: