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

[netCDF #QYC-628947]: NF90_GET_VAR not working with user defined type variable

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.


  • Subject: [netCDF #QYC-628947]: NF90_GET_VAR not working with user defined type variable
  • Date: Thu, 14 Apr 2016 10:20:38 -0600

Hello,

In order to read data stored in a compound type, you must use 
`NF90_INQ_COMPOUND` to learn about the compound data structure.  The user guide 
for netCDF-Fortran NF90 may be found here:

* 
http://www.unidata.ucar.edu/software/netcdf/documentation/historic/netcdf-f90/Compound-Types.html#Compound-Types

I hope this helps,

-Ward

> Dear Lady or Sir
> 
> I would appreciate if you could tell me how to read data from nc files
> with netCDF-4 format using F90.
> 
> The Fortran library function NF90_GET_VAR works well with integer or
> real arrays, but it can not compile if I want to read a compound user
> defined type variable
> 
> (as for example, sst on a MODIS nc file with netcdf-4 format).
> 
> Please let me know what may your services suggest as an alternative to
> that F90 library function ?
> 
> I thank you for the kindness of your attention.
> 
> Kind regards
> 
> Arlindo Arriaga, PhD
> Meteorology UW-Madison 1991
> 
> 
> 

Ticket Details
===================
Ticket ID: QYC-628947
Department: Support netCDF
Priority: Normal
Status: Closed