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.
Lynton, > Finally, (Russ), I asked your oppinion about possibilities for > improving the API of the user-defined type. I note that there was > an email alluding to this (see attached). Any opinions you have would > be of interest. The email you attached was about use of the Fortran API for writing data of a compound user-defined type. I generally agreed with David Pierce that a beginning Fortran user would find the Fortran API for writing compound data difficult to use, mostly because it requires member-at-a-time writes, explicit specification of offsets, and use of character data type, as it says in the documentation: In Fortran a character buffer must be used for the compound data. The user must read the data from within that buffer in the same way that the C compiler which compiled netCDF would store the structure. The use of compound types introduces challenges and portability issues for Fortran users. We intend to improve this situation when we update the Fortran API to make use of the Fortran 2003 standard for C interoperability and make use of Fortran derived types. I'm not sure that changes to the C++ API to handle compound types would be very relevant to the Fortran API, but I could be wrong. --Russ --Russ Russ Rew UCAR Unidata Program address@hidden http://www.unidata.ucar.edu Ticket Details =================== Ticket ID: JNH-860762 Department: Support netCDF Priority: Critical Status: Closed