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 Craig, > Since last talking with you, I've learned that FORTRAN-90 > supports dynamic memory allocation. Here's how my F90 book > demonstrates the syntax for allocatable arrays: > > REAL, DIMENSION(:,:), ALLOCATABLE::A > > Read (*,*) idim, jdim ! Read in array dimensions > c ! from user input. > ALLOCATE ( A(idim,jdim) ) ! Allocate heap space. > > Do j = 1, jdim > Do i = 1, idim > A(i,j) = ... ! Do something with the array. > End Do > End Do > > DEALLOCATE ( A ) ! Array no longer needed; > c ! recover storage. > > So, F90 seems to have aquired a lot of the functionality of C. > > I wonder if there are plans for support of F90 by NetCDF? Yes, that's on our list. Version 3 of netCDF will probably include a new Fortran interface (in addition to support for the current interface) that has longer names and a Fortran-90 interface block to catch type errors at compile time. But we'll have to support the Fortran 77 interface for as long as programs still use it. --Russ