[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[netCDF #HZO-280115]: How to retrieve the liste of Name variable
- Subject: [netCDF #HZO-280115]: How to retrieve the liste of Name variable
- Date: Mon, 07 Aug 2017 10:40:03 -0600
Hello Christophe,
NetCDF files contain variables, dimensions and attributes (at the minimum. They
may also contain groups depending on if you are using netCDF3 or netCDF4). As
such, I'm not sure what you mean by 'the first column'. If you are trying to
get a list of all the variables, you can first get a list of the variable IDs
using `nc_inq_varids()`. You can then iterate over the list of variable Is,
calling `nc_inq_varname()` on each one to get the associated variable name.
If you mean instead that you have a variable named 'name' and the data
contained within are the various variable names into an array of the
appropriate type using `nc_get_vara()`.
You can find the documentation on these functions at
http://www.unidata.ucar.edu/software/netcdf/docs, and if you have further
questions please don't hesitate to contact us!
-Ward
> Full Name: Christophe
> Email Address: address@hidden
> Organization: ixBlue
> Package Version:
> Operating System:
> Hardware:
> Description of problem:
>
> Hello,
>
> I have a NetCDF file .nC. The first column is called name : It is the
> name of variable.
>
> How to get the list of the name of the variable ?
>
> I am developping in C.
>
> Thx,
>
>
Ticket Details
===================
Ticket ID: HZO-280115
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.