On 1/28/11 2:09 PM, Martin Hoecker-Martinez wrote:
I'm using NetCDF to store data from a spectral fluid model and I would
like to store the variables in wave number space. Is there a
suggested means of storing FORTRAN complex variables in NetCDF files?
There is no native complex external data type in NetCDF and I hoped
that someone had thought about this problem and would have a more
efficient solution than I can come up with.
Thanks for your time,
Martin: Netcdf has no complex data type, so you either have to save the
real and imaginary parts in separate variables, or create a compound
variable (similar to a C struct or a fortran derived type) with the real
and imaginary parts as components. The latter requires using some of
the new features of the netcdf-4 library, so if you go that route the
data will only be readable by the netcdf-4 API.
-Jeff