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, > > You are just about correct. In Fortran I need to use 64-bit ints and floats > to ensure that the code generates stable solutions. When I compile the > netCDF code, I believe that I need to specify the same 64-bit interfaces > otherwise subroutines/functions will not be called correctly. However, > there is no way to specify the size of the int in C in AIX (or other > compilers to my knowledge). It is, by default, 32 bits. > > The only solution that I have been able to think of so far is to define the > Fortran to C function call interfaces so that when Fortran calls with a > 64-bit integer, the interface casts that to a 32-bit integer before > invoking the C code. It seems to me that this might be possible in > ncfortran.h and it would be nice to do this using some automatic edit. Any > suggestions? > > Regards, > Peter > Aaaaaaaaahhhhhhhhh! To understand ncfortran.h is to taste madness. But let me see if I understand your problem. You want to calculate with 64-bit integers, but write 32-bit integers? If so, then you can do that without any code modification... Ed Ticket Details =================== Ticket ID: DKO-246585 Department: Support netCDF Priority: Normal Status: Open