NOTICE: This version of the NSF Unidata web site (archive.unidata.ucar.edu) is no longer being updated.
Current content can be found at unidata.ucar.edu.
To learn about what's going on, see About the Archive Site.
rob, you should not have to store the exact dimension of the data you are retrieving as a fortran parameter. the netcdf file contains the size of the array you want to retrieve, so first you figure out the size with ncvinq() (which gives you the dimension ids--- take these and find out the dimension sizes with ncdinq(), multiply these together and you get the variable size), then you call ncvgt() with the correct size (assuming you want the whole array; you can also specify a hyperslab). this method allows you to dynamically allocate the array space needed (in fortran 90 or C), or to specify the maximum allowable size as a parameter statement (fortran 77). this latter option sounds like the one you should try first, you can't go wrong by just figuring out the variable sizes using ncdump(1) and choosing the maximum size as the value for your parameter statement that allocates the memory. either way, you should be able to retrieve your arm data from multiple different-size files without recompiling your program. charlie -- Charlie Zender Tel: (303) 497-1612 NCAR/CGD/CMS Rm ML-320 FAX: (303) 497-1324 P.O. Box 3000 zender@xxxxxxxxxxxxx Boulder CO 80307-3000 http://www.cgd.ucar.edu/cms/zender
netcdfgroup
archives: