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 Magali, > Two variables in a netcdf file that I am parsing are described like this : > > double lon_rho(eta_rho=288, xi_rho=263); > :long_name = "longitude of RHO-points"; > :units = "degree_east"; > :_CoordinateAxisType = "Lon"; > double lat_rho(eta_rho=288, xi_rho=263); > :long_name = "latitude of RHO-points"; > :units = "degree_north"; > :_CoordinateAxisType = "Lat"; > > > I'm trying to retrieve the value of the attribute "_CoordinateAxisType" of > this variable, but it does not work. > I'm using the 4.1 C version of the library. > > Does the version 4.2 permits to do that ? Or is this not possible to do so > using the C library, as I saw that it was recognized in the Java library ? The "_CoordinateAxisType" variable attribute is not a real attribute in the data file, it's a "virtual" or "synthesized" attribute that's created by the Java software as it's reading and analyzing the metadata. The netCDF C software doesn't see the attribute and doesn't create it from the metadata, even in version 4.2. Is there a good reason you need this attribute? If you are reading the data and metadata with software that follows the CF metadata conventions, it will know that lon_rho and lat_rho are longitude and latitude coordinates, because the units attributes are what CF expects to specify those coordinate axes. --Russ Russ Rew UCAR Unidata Program address@hidden http://www.unidata.ucar.edu Ticket Details =================== Ticket ID: ERT-660455 Department: Support netCDF Priority: Normal Status: Closed