[Thread Prev][Thread Next][Index]

Re: [ferret_users] How get NetCDF attribute values for mapping sst with Ferret



Hi Jacques,
The syntax you need is varname.attname  so in your case:

  LET sstmin = sea_surface_temperature.min
  LET sstmax = sea_surface_temperature.max

  shade/lev=(`sstmin`,`sstmax`,1) sea_surface_temperature

Putting values in grave-accents forces them to be evaluated as the command is parsed, so the levels qualifier gets the numeric value of the variables.

The documentation on access to netCDF attributes is in Chapter 3, section 1 of the documentation. Scroll down or use browser search to look for "access to attributes" in http://ferret.pmel.noaa.gov/Ferret/documentation/users-guide/variables-xpressions/VARIABLES

We're still working on a conversion of the documentation from an earlier format - the internal links to index entries and so forth will work better in the future!

Ansley

Jacques Stum wrote:
Hello Ferret users,

I'm a new Ferret user. I'm a little bit lost in the documentation. My problem is the following : I have a NetCdf variable (sea_surface_temperature) which has two attributes:
sea_surface_temperature:min
sea_surface_temperature:max
which give the real physical min and max values of sst for my particular file (e.g., min=275K, max=300K)

I would like to map my sst variable every 1K between these min and max values : shade/levels=(sea_surface_temperature:min,sea_surface_temperature:max,1) "sea_surface_temperature"

My question is : how within my Ferret script do I get the values of sea_surface_temperature:min and sea_surface_temperature:max, and how do I specify the shade/levels instruction ?

Thank you for your help,

Jacques



[Thread Prev][Thread Next][Index]

Contact Us
Dept of Commerce / NOAA / OAR / PMEL / TMAP

Privacy Policy | Disclaimer | Accessibility Statement