[Thread Prev][Thread Next][Index]

Re: CF conventions



Hi Mike,
Yes, we have a project right now to develop Ferret capability to access and control netCDF attributes. For any variable, we will be able to add, delete, or modify attributes, and control which are written to output files. This will also include control of global attributes like history. Some attributes have special meaning to Ferret, like units or _FillValue. Changing these will change how the associated variables are used by Ferret. Other attributes, probably including standard_name, will simply be written to output netCDF files as part of the variable specification. The new access to attributes will also mean that you'll be able to get the value of the standard name and use it in scripts, say for creating labels or determining what kind of computation to do.

In the meantime, you can add any attribute to a file you've written by using Ferret's spawn command to invoke the NCO attribute-editing operator ncatted. For example:

yes? let a = {1,2,3,4}
yes? save/clobber/file=x.nc a
yes? sp ncatted -O -h -a standard_name,A,a,c,"sea_water_salinity" x.nc
yes? sp ncdump x.nc

And here's how to add text to the global history attribute, using the \n editing specifier to put the addition on a new line.

yes? sp ncatted -O -h -a history,global,a,c,"\nNew line in the global history attribute" x.nc

The NCO operators are documented at http://nco.sourceforge.net/nco.html

Ansley

McCann, Mike wrote:

Hello Ferreters,

Is there a capability or are there plans to support the Climate Forecast netCDF convention for the CF standard_name attribute in Ferret?
I'd like to be able to do something like this:

SET VAR/TITLE="Salinity"/UNITS=""/STANDARD_NAME="sea_water_salinity" SALINITY

-Mike

--
Mike McCann Software Engineer
Monterey Bay Aquarium Research Institute
7700 Sandholdt Road
Moss Landing, CA 95039-9644
Voice: 831.775.1769 Fax: 831.775.1736 http://www.mbari.org








[Thread Prev][Thread Next][Index]

Dept of Commerce / NOAA / OAR / PMEL / TMAP

Contact Us | Privacy Policy | Disclaimer | Accessibility Statement