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.
>To: address@hidden >From: "jifengying" <address@hidden> >Subject: Re: 20021119: do me a favor >Organization: >Keywords: NF_INQ_DIMID Hi, > I meet a question . > After I see the netcdf file by ncdump, I saw the dimension of longitude,then I > used: > > stat=NF_INQ_DIMID(ncID,'longitude' dimid') > The result told that the dimension "longitude" does not exist. why, > Long for you answer. As shown in the netCDF Fortran Users Guide, you have to open the file first with NF_OPEN(): INCLUDE 'netcdf.inc' ... INTEGER stat, ncID, dimid ... stat = NF_OPEN('some-file.nc', NF_NOWRITE, ncID) IF (stat .NE. NF_NOERR) PRINT *, NF_STRERROR(stat) ... stat = NF_INQ_DIMID(ncID, 'longitude', dimid) IF (stat .NE. NF_NOERR) PRINT *, NF_STRERROR(stat) For future questions, please use the email address "address@hidden". That way, your question will be forwarded to someone who can answer it, even if I am away from my email. Thanks. --Russ _____________________________________________________________________ Russ Rew UCAR Unidata Program address@hidden http://www.unidata.ucar.edu