[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[netCDF #KFB-787515]: netcdf f90 code



Ben,

I don't have access to your data file (or blue ice either).

There is an example in the Fortran-90 netCDF Users Guide

  
http://www.unidata.ucar.edu/software/netcdf/docs/netcdf-f90.html#NF90_005fINQUIRE_005fDIMENSION

of how to read in dimension lengths in the Fortran-90 interface.  For
example, to read the length of the dimension named "latitude" into a
Fortran variable named "nlats", you would call

  nf90_inquire_dimension(ncid, lat_dimid, len = nlats)

Similarly, there is an example of reading the value of variable
attributes in the documentation here:

  
http://www.unidata.ucar.edu/software/netcdf/docs/netcdf-f90.html#NF90_005fGET_005fATT

To read in the value of the "units" attribute of the variable
"latitude" with its netCDF variable id in the Fortran variable
"lat_varid", you would call

  nf90_inquire_attribute(ncid, lat_varid, "units", lat_units)

assuming "lat_units" is a character variable large enough to hold all
the characters of the untis attribute.

--Russ

Russ Rew                                         UCAR Unidata Program
address@hidden                     http://www.unidata.ucar.edu



Ticket Details
===================
Ticket ID: KFB-787515
Department: Support netCDF
Priority: Normal
Status: Closed