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.
Hi Julia, The Fortran 90 functions work in a loop the same way that they work outside of a loop, so there are no special examples to illustrate their use in a loop. However, I see from your pseudo code that you are not checking the return value of the netCDF functions you are calling. All of the nf90_ functions return a value, they are not subroutines. If you check the return value, you may find out what is not working. If the return value is not equal to nf90_noerr, then you can print an error message by using the nf90_strerror function, as demonstrated in the Fortran 90 examples on http://www.unidata.ucar.edu/software/netcdf/examples/programs Also, I know you were only sending pseudo code, but did you declare "x" to be an integer?: --Russ Russ Rew UCAR Unidata Program address@hidden http://www.unidata.ucar.edu Ticket Details =================== Ticket ID: BGF-473127 Department: Support netCDF Priority: Normal Status: Closed