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

Re: netCDF questions



John and Wendy,

> Thanks for your rapid and helpful reply to our netCDF questions. 
> And, in future, we will direct any questions to support, however, since 
> you are now somewhat familiar with our dilemma we will hound you 
> with one further elaboration.

No problem.

> We are mulling over the possibility of modifying the ncgen parser
> to recognize any set of characters between square brackets as
> a valid variable identier (e.g. [Foo bar] or [Foo (bar)]). To do this
> we would modify ncgen.l, adding something like:
> 
>   [\[].+[\]]      {
>               if ((yylval = lookup(yytext)) == NULL) {
>                       yylval = install(yytext);
>                         }
>                   return (IDENT);
> 
> and modify ncgen.y, adding code to "varspec:" to strip off the
> square brackets before storing the identifier. Any opinions, 
> thoughts, or comments? 

This sounds feasible.  Without trying it, I can't think of any problems you
would encounter, other than having to maintain a separate version of ncgen
that would have to be kept up-to-date with our ncgen bug fixes and changes.
We do have some ncgen bug fixes included in the upcoming release 2.4, but no
major enhancements.

> Is the mailing list still address@hidden as
> described in the 2.3 manual?

Yes.  But the way you subscribe to it has changed.  To subscribe or
unsubscribe, see the WWW document

    http://www.unidata.ucar.edu/packages/netcdf/mailing-lists.html

or question 22 of the netCDF FAQ at 

    http://www.unidata.ucar.edu/packages/netcdf/faq.html

> Thanks for looking into nc2text and text2nc for us. Since more
> and more of our data are being stored in database formats it
> is easiest for us to dump these data out in CDL format and
> then use an ncgen-like utility for getting them into netCDF.

Harvey Davies' nc2text utility apparently has the same restrictions as
ncgen, requiring variables to begin with a letter and contain only
alphanumeric characters, "_", or "-".  There may be other third-party netCDF
software that has similar restrictions, but I don't know for sure.

--Russ
______________________________________________________________________________

Russ Rew                                           UCAR Unidata Program
address@hidden                              http://www.unidata.ucar.edu