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

Re: Updated/improved version of "gennet"



> From: address@hidden (Barry Schwartz)

Hi Barry,

> Got a new version of gennet for you. This one does a few more things
> that have been suggested to me over the years. It generates code
> that now does some "safe guarding" for the user. The problem
> with the old version was that if say, for example, you used
> gennet to give you FORTRAN code to read sao data and that sao
> data CHANGED, the old code had variable ids wired to what they
> were when you FIRST ran gennet so essentially if the data changed
> you could get hosed. So the new version interrogates the data file
> for the variable ids using variable names (this is still not fool
> prof but if say, for example, variables are ADDED to the original
> sao cdl, you'd at least get the proper variable ids for the old ones).
> In addition, the generated code also creates a data array of the long names
> and checks the current file being read to see if the number of variables
> and their names have changed since the program was generated, and if they
> did, it at least writes out a remark telling the user to rerun gennet.
> I also added code in the generated program that asks the user
> to input the name of the file to read (it was hardwired with the
> name of the input data file to gennet) which makes this more general.
> And, I added a call to ncclos that was needed.
> 
> Anyway, here it is; I think it works but if you hear of anyone who
> has problems with it, let me know. If i have time, I'm going to write
> a generic netCDF write routine (I'm formulating ideas on how it
> would be set up). I get a chance to have fun with this stuff between
> projects (rare but times do come up).

Thanks!  I'll install the new version in our netcdf/contrib/ directory
tomorrow and announce it in the netCDF "What's New" page at 

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

--Russ