Due to the current gap in continued funding from the U.S. National Science Foundation (NSF), the NSF Unidata Program Center has temporarily paused most operations. See NSF Unidata Pause in Most Operations for details.
Dear all,I found the thread "Compound type and Fortran90" in the 2013 mailing list archive, where it is said that you cannot write an entire fortran90 derived type into a compound type. But it is also said that you can write the individual components ... unfortunately, there is no example for this.
Here is my case: type foo INTEGER :: a INTEGER :: b REAL :: c end type foo TYPE(foo), DIMENSION(ndim) :: datafield ... nf90_def_compound(ncid, 2*INTSIZE + REALSIZE, "triple", typeid) nf90_insert_compound(ncid, typeid, "a", 0, NF90_INT) nf90_insert_compound(ncid, typeid, "b", INTSIZE, NF90_INT) nf90_insert_compound(ncid, typeid, "c", 2*INTSIZE, NF90_FLOAT) nf90_def_var(ncid, "data", typeid, dimid, varid) nf90_put_var(ncid, varid, datafield) ! this is not possible ...What is the right way to put my data from the derived type array datafield into the netcdf compound type?
Cheers, Hendryk
Attachment:
smime.p7s
Description: S/MIME Cryptographic Signature
netcdfgroup
archives: