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.
Bruce, > It would be helpful to fans of netCDF in other branches of physics if netCDF > were to include complex*4 and complex*8 as a data type. Complex variables > have been very useful for a couple of centuries in applied math.. The complex data type was not originally included because C has no complex data type, and netCDF was intended to permit access of array-oriented data from either C or Fortran. If complex data types were added, accessing the data from C would require use of a non-primitive complex type. Also, adding a complex data type would cause problems for generic netCDF programs that assume any numeric value from a netCDF file can be stored in a double for arithmetic operations and comparisons. Operations requiring ordered values, such as finding the maximum value in an array, would not be meaningful for complex values. Currently an array of complex values can be represented as an array of floating-point values with an extra dimension of length 2 for the real and imaginary components. A convention for the name of a dimension that would only be used to represent real and imaginary components of complex values might suffice, since only one such dimension would be needed. Another conventional dimension could be used for polar representations ... Besides, how would complex values be used for the really important problems, like representing time :-) ? ______________________________________________________________________________ Russ Rew UCAR Unidata Program russ@xxxxxxxxxxxxxxxx http://www.unidata.ucar.edu
netcdfgroup
archives: