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.
Philipp, Tom's busy and asked me to help you. Basically, your problem (as far as the netCDF library is concerned) is that your program is attempting to define two, distinct dimensions as the unlimited (or record) dimension. This means that the Fortran-77 routine INTEGER FUNCTION NF_DEF_DIM (INTEGER NCID, CHARACTER*(*) NAME, INTEGER LEN, INTEGER dimid) is being called twice for the same netCDF dataset with LEN equal to NF_UNLIMITED (i.e. 0) both times. Can you execute your program in a debugger? If so, then I suggest that you set a breakpoint at the above call in your program, look at the value of LEN each time, and see why it's being called with LEN equal to 0 the second time. Regards, Steve Emmerson <http://www.unidata.ucar.edu>