This archive contains answers to questions sent to Unidata support through mid-2025. Note that the archive is no longer being updated. We provide the archive for reference; many of the answers presented here remain technically correct, even if somewhat outdated. For the most up-to-date information on the use of NSF Unidata software and data services, please consult the Software Documentation first.
>To: address@hidden >From: Tony Craig <address@hidden> >Subject: Re: 20030715: subject >Organization: >Keywords: 200307302000.h6UK0GLd000675, Fortran-90 interface Hi Tony, > I'm trying to get some opinions on f90 netcdf. We are thinking > about migrating to it in our large climate models. Our concerns are > > - is it fully supported on any platform we might want to use > (IBM, SGI, SUN, pc linux flavors, HP/CPQ, Cray, NEC, etc) No, there's a problem with the f90 interface on platforms such as the Cray where the Fortran 9x compiler doesn't support 1-byte and 2-byte integers, for example. Here's a more complete description of the problem, a workaround, and the intended fix for netCDF, which we haven't implemented yet: http://www.unidata.ucar.edu/cgi-bin/msgout?/glimpse/netcdf/4665 We still need to automate the manual steps described there, or maybe just create a version of netcdf_overloads.f90 that has OneByteInt and TwoByteInt deleted just for Crays and require a manual step to use it instead of the distributed netcdf_overloads.f90. Also, we have implemented some fixes to the f90 interface that haven't yet been tested on some of the platforms you list, because we don't have access to all of those platforms (HP/CPQ?, NEC). Our latest 3.5.1-beta11 release is available, but a production release is still waiting on a couple of significant fixes before we go into testing mode where we spend a week testing it on everything we can get our hands on. > - is it robust Other than the above Cray problem, we have had very few support questions on the f90 interface, mostly dealing with the lack of a standard for whether f90 compilers should use ".mod" or ".MOD" for the extension of module files it generates. It seems to be robust. It's only a veneer over the f77 interface, which is quite well-tested, so that may explain why no one reports bugs. Also credit Robert Pincus, the author, with a great job implementing the f90 interface. The F90 User's Guide is also more up-to-date than our C and Fortran 77 User's Guides. > - is it likely to be available on platforms we might run on, > or is usually only the f77 version availble. By default, the netCDF configure script tries to find an f90 compiler and build the f90 interface if the compiler is available. So it should be available on platforms where the compiler was on the executable path of the person who built it, other than problems such as for the Cray, described above. > I assume we can build f90 netcdf on any platform we need it > on, but we really prefer that it just be available on all > platforms we might want. In your experience, is everyone > building both f77 and f90 versions of netcdf these days. Yes, those that have f90 compilers. The problem is platforms such as Linux, where there is nothing like g77 that does f90 yet. Instead you have to pay for a Portland Group or other commercial compiler. So lots of Linux systems don't have the f90 interface. If there were a GNU equivalent to g77 for Fortran-90, this problem would go away. > Whatever feedback you can provide would be great. Hope this helps. --Russ