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.
Eunjoo, I'm not a Fortran-90 expert, but I don't see anything wrong with your program except that the "start" argument doesn't seem to have a type declared for it. If the netCDF package built and tested OK, then it's very unlikely that the problem lies with the netCDF library (the tests are pretty exhaustive). Are you sure that the file contains valid data and that your "slpValue" variable is correctly dimensioned? Did you use any compiler options that would alter the default type of a "real"? Regards, Steve Emmerson <http://www.unidata.ucar.edu> > To: address@hidden > From: Eunjoo Jung <address@hidden> > Subject: netcdf on DEC-alpha > Organization: UNSW > Keywords: 200107250706.f6P75x127879 netCDF DEC Alpha OSF/1 F90 > > Hello, > > > I have a trouble reading NCEP data written in netcdf format. > I am using NetCDF libraries for fortran 90 and I am using DEC-alpha > machine under OSF1. > I didn't get any error message installing netcdf libraries and compiling > and linking my program. but I've got wrong values. > here is my program. > ---- > program main > use netcdf > > implicit none > integer :: i,j > integer :: ncId, slpVarId, status > real :: slpValue(144,73) > > status = nf90_open("slp.2001.nc", nf90_Write, ncid) > status = nf90_inq_varid(ncid, "slp", slpVarId) > status = nf90_get_var(ncid, slpVarId, slpValue, start = (/ 1, 1, > 1 /) ) > > ..... > > stop > end program > ---- > can you give a suggestion where I have to look into. > Thank you for your cooperation in advance. > > regards, > Eunjoo Jung