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.
> Ed, > > In response to your questions: > > If I use Fortran flags that specify 32-bit integers then the netCDF > libraries build and pass the built-in tests. The application fails but > that's an application problem. If the Fortran flags specify 64-bit integers > then I can build the library but the tests fail as I have described in the > bug report. But with those 64-bit flags you are not really getting a working library, as the checks reveal. The real answer is to fix the application problem you mention so that it can work with netCDF. But OK, that's perhaps not feasible. But the alternatives are going to be plenty of work. How many netCDF functions do you use in this program? Many, or just a couple? Surely if the compiler lets you build with these flags, it also provides a way to call other fortran functions which were not compiled with those flags? > > The 4.0 release with support for 64-bit integers sounds interesting and I > will give it a go although I am running out of time on this project. The > application must read some netCDF files written with old library support > (3.6.1 or possibly older). NetCDF-4.0 is fully backward compatible and can read files created with any previous version of netCDF. The problem is not reading the file, but getting the integers into the 64-bit format your fortran code is expecting. > A colleague built the ncdump utility and was > able to read these files. I note that the utility is coded in C and > therefore the Fortran flags have no impact on integer size when building > the utility. Yes, exactly. The netCDF file is not writing 64-bit integers in any case (at least not until version 4.0). Can you find flags for the C compiler that will turn on 64 bit integers too? That should make everything work. > > I am not at all certain but I believe the files were written by an > application running on an SGI system and I believe this system has > compilers that use 64-bit integers by default. I believe that the netCDF > libraries were also built on this machine. Where this leaves me I do not > know. > > Does this help? > > Peter > Ticket Details =================== Ticket ID: DKO-246585 Department: Support netCDF Priority: Normal Status: Open