[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Support #ZTO-391659]: Invalid dimension id or name



Peter,

I've heard of using double precision instead of floats in Fortran
applications for numerical stability, but not 8-byte integers.
Lots of people run models at NCAR specifying -r8 -i4 and call
netCDF Fortran functions with 8-byte reals that correspond to
doubles in the netCDF interface compiled with -r4 -i4, and that
works.

The netCDF-3 interface only has primitive integer types for integers
of one, two, or four bytes.  It uses an XDR representation for
four-byte integers on disk to store signed integers between -2**32 and
2**32-1.  If eight-byte integers are really required in the netCDF-3
file, they will have to be represented in some other way than using
the primitive types netCDF-3 supports.  The netCDF-4 interface
supports eight-byte integers (C type "long long"), but the netCDF-4
software is still only in beta release.

I also could not find a way to tell the Intel C or C++ compiler that
the "int" type is supposed to be eight bytes, but I think that would be
required if you want to use -i8 to compile the netCDF-3 Fortran interface
that calls the netCDF-3 C interface.  If you could compile the C library
to use eight-byte ints, you would still have to make sure only four-bytes
worth of the ints were used for data, since otherwise the data values
would be truncated.

NetCDF has been ported to Cray and NEC platforms with eight-byte integers,
but the C and Fortran compilers support eight-byte integers natively on
those platforms.

Sorry I can't be of more help, but I don't know how to build a ifort netCDF-3
interface using the -i8 flag ...

--Russ


Russ Rew                                         UCAR Unidata Program
address@hidden                     http://www.unidata.ucar.edu



Ticket Details
===================
Ticket ID: ZTO-391659
Department: Support netCDF
Priority: Normal
Status: Closed