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 Pankaj, > I am looking for urgent help in reading 4-D netcdf data. I have > tried to read my data using UNIDATA various fortran codes and > c-program but after successful compilation, "variable not found stop > 2" message is delivered on executing although UNIDATA sample netcdf > files are duly read using these fortran codes. For netcdfread_4D.f90, you are using the wrong variable names for what's actually in the netCDF file you're reading. Try: ! character (len = *), parameter :: LAT_NAME = "latitude" character (len = *), parameter :: LAT_NAME = "TLAT" ! character (len = *), parameter :: LON_NAME = "longitude" character (len = *), parameter :: LON_NAME = "TLONG" For the second program, netcdfread_4D.f90, the same problem occurs, since there is no variable in the file named "data". If you want to read values of the variable named "BSI", try: ! character (len = *), parameter :: VAR_NAME='data' character (len = *), parameter :: VAR_NAME='BSI' --Russ Russ Rew UCAR Unidata Program address@hidden http://www.unidata.ucar.edu Ticket Details =================== Ticket ID: VZH-911645 Department: Support netCDF Priority: Normal Status: Closed