NOTICE: This version of the NSF Unidata web site (archive.unidata.ucar.edu) is no longer being updated.
Current content can be found at unidata.ucar.edu.
To learn about what's going on, see About the Archive Site.
Netcdf Fortran developers, Using netcdf-4.2.1.1 and netcdf-4.2-fortran, currently Windows and Mac OSX. I use current Intel compilers everywhere. I haven't gotten around to Linux, but I will very soon. I have a couple of comments I would like to share about the fortran interface (both f77 and f90). [1] Use of "integer" rather than "integer*4" and "integer*8": By using integer for all arguments, the fortran interface is not consistent with the C interface. On the fortran side, I decide either "i4" or "i8" as the default size for integer. On the C side, all functions return "int", all ids and many parameters are also "int", ranges are typically given by "size_t" (which is almost never int on modern systems). I have no easy way to write both integer*4 and integer*8 data. Yes I know about the int64 variants in the nc4 interface, but the index and count variables that allow me to get a section of data will still be i4 if that happens to be the default. For better consistency, all C int parameters should be integer*4, all C size_t paramters should be integer*8, and data choices should correspond to typical fortran kind(1, 2, 4, 8). That may not match on all platforms, but it will cover the majority. I know people may not be happy with having to update their code, but at least it would be consistent moving forward. [2] To support i8 on Windows, I added support for "NF_INT_IS_C_LONGLONG" everywhere. I will be happy to share this code, but it is incomplete. I did not patch the f90 code because it is in such flux as you attempt to move to f03 support (in the 4.4 beta). [3] I hope you do not abandon the f77 branch. We still depend on it to build on older platforms such as IRIX (and older systems where we cannot update the compilers). I completely understand if you decide to remove it. I will continue to use it in older versions as necessary. Thanks, Roy Dennington Semichem, Inc.
netcdfgroup
archives: