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 John, > > I'm not an expert on the Fortran or C interface, and your questions > would be better answered by asking the Unidata folks directly. The > support address for netCDF questions is > address@hidden, and I've CC'ed that address here. > > They have a bunch of email addresses set up, which you can review at: > > http://www.unidata.ucar.edu/support/topics.jsp > > Good luck, > > --Mary > > On Fri, 1 Feb 2008, John Hubbert wrote: > > > Mary; > > > > I've been reading over the documentation on the unidata website, in > > particular > > the fortran 90 examples. > > > > In each example code the variables are of equal dimension. For the > > data I would like to read there are one dimensional and 2 dimensional > > arrays. In the examples codes they setup the variables as follows: > > > > ! We are reading 2D data, a 6 x 12 lat-lon grid. > > integer, parameter :: NDIMS = 2 > > integer, parameter :: NLATS = 6, NLONS = 12 > > character (len = *), parameter :: LAT_NAME = "latitude" > > character (len = *), parameter :: LON_NAME = "longitude" > > integer :: lat_dimid, lon_dimid > > > > ! We will read surface temperature and pressure fields. > > character (len = *), parameter :: PRES_NAME = "pressure" > > character (len = *), parameter :: TEMP_NAME = "temperature" > > integer :: pres_varid, temp_varid > > integer :: dimids(NDIMS) > > > > > > So, I will need to use a NDIMS1= 1and a NDIMS2=2? How will > > having variables of different dimension alter the query calls? > > The first dimension length of NDIMS2 is the same as NDIM1 if > > that makes any difference. > > > > Thanks, > > John > > > > Howdy John! Yes, you have it right. You don't have to use the same dimensions for every variable. When doing a get of the variable, it is up to you to use the right start and count arrays, and to have enough space allocated to hold the data you are asking for. Does this answer your questions? Thanks! Ed Ticket Details =================== Ticket ID: DPQ-378783 Department: Support netCDF Priority: Normal Status: Closed