[netcdfgroup] F90-generating gennet.f?

Does anyone have a version of gennet.f (see

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

), i.e. that outputs netCDF-reading Fortran 90? (Unlike the current
version, which outputs F77.) Why I ask:

Problem: I need to convert vanilla NetCDF from some global emissions
inventories to I/O-API-formatted NetCDF

http://www.baronams.com/products/ioapi/
http://www.cmaq-model.org/cmaqwiki/index.php?title=CMAQ_version_5.0_%28February_2010_release%29_OGD&#Input.2FOutput_Applications_Programming_Interface_.28I.2FO_API.29

(aka, IOAPI). Unfortunately, to do this reliably, at present I must do
this in Fortran. More unfortunately, my Fortran chops are quite weak:
I managed to both get a degree and work in software development this
whole millenium without writing more than a few LOC of any dialect of
Fortran. So I'm learning Fortran while attempting to solve the above
problem by adapting and combining

1 a mix of F77 and F90 code that both writes IOAPI, and reads and
  processes netCDF (from

ftp://ftp.unc.edu/pub/cmas/TOOLS/ncf2ioapi.tar.gz

  ), unfortunately

* for an application that is enough different from my own to be
  occasionally confusing

* not written for pedagogy, unlike ...

2 gennet.f (see

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

  ), F77 code that reads an arbitrary netCDF file (with a few
  constraints) and writes F77 code to read that same netCDF file.
  It may seem "meta," but is quite understandable, even for this
  novice--in fact, I would recommend adding gennet.f (or something
  like it) to

http://www.unidata.ucar.edu/software/netcdf/examples/programs/

  because it outputs code relatively specific to one's netCDF.

(For more details, esp code, see

https://github.com/TomRoche/ioapi-hack-R/tree/master/fortran-examples

and scroll down to "fortran-examples/README.txt". For an example of
gennet.f F77 output, see

https://github.com/TomRoche/ioapi-hack-R/blob/master/fortran-examples/read_IC_BC.f

) The main problem I have found so far with gennet.f is that it does not
generate F90. (Another problem is that it doesn't seem to handle
attributes. Given my relative lack of experience with netCDF, and
absolute lack of experience with Fortran, I could very well be missing
features and problems with gennet.f, but note that the bugs described @

http://woce.nodc.noaa.gov/woce_v3/wocedata_1/cmdac/primer/app4.htm
http://www.unidata.ucar.edu/support/help/MailArchives/netcdf/msg09423.html

seem to have been squashed.) Given that

* I need to write IOAPI

* the only source I have that writes IOAPI is F90

* F90 is sufficiently {different from, better than} F77

* I am time-constrained: I don't seem to have time to learn
  one dialect of Fortran, much less two

it would seem much easier for me to combine a clearly-written F90
netCDF reader with the not-so-clearly-written F90 IOAPI writer that I
have (i.e.,

https://github.com/TomRoche/ioapi-hack-R/blob/master/fortran-examples/NCF2IOAPI_Edgar4.F

). Am I missing something, or getting something wrong? If so, please
let me know. If not: I'm looking for code that

* like gennet.f, outputs a "reader" for an arbitrary, runtime-input
  netCDF file

* unlike gennet.f, outputs F90

TIA, Tom Roche <Tom_Roche@xxxxxxxxx>



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