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

[netCDF #EHY-348053]: Retrieving dimension values from netCDF file using fortran library



Hi David,

> How does one retrieve the dimension values from a NetCDF file using the
> Fortran (or C) library interface.  The netCDF Fortran 90 Interface guide
> (http://www.unidata.ucar.edu/software/netcdf/docs/netcdf-f90.pdf)
> describes a function NF90_INQUIRE_DIMENSION but this only appears to
> return the name and the length of the dimension.

Right, a dimension only has a name and a length.  The associated coordinate
variable, which has the same name as the dimension, has the coordinate
values, in the simple case when there is a 1D coordinate variable.

> The R ncdf library manual
> (http://cirrus.ucsd.edu/~pierce/ncdf/ncdf-manual.pdf) has methods
> dim.def.ncdf for creating dimensions that have values.  I am looking to
> read these values in a Fortran program accessing this file.

You should be able to read the values from the associated variable using
the nf_get_var_TYPE or nf90_get_var interfaces, depending on whether
you're using F77 or F90.

--Russ

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



Ticket Details
===================
Ticket ID: EHY-348053
Department: Support netCDF
Priority: Normal
Status: Closed


NOTE: All email exchanges with Unidata User Support are recorded in the Unidata inquiry tracking system and then made publicly available through the web. If you do not want to have your interactions made available in this way, you must let us know in each email you send to us.