[Thread Prev][Thread Next][Index]

Re: getting the grid name on the fly



Hi Brent,

Please see Ch3 Sec3.1. "Special calculations using embedded expressions" in
the users' guide.

The grid name for a variable is accessible using
    `xxx,return=grid`
where xxx can be VARNAME or  VARNAME[d=dset].
This syntax can be embedded into other Ferret commands.

    - steve

============================

Brent A McDaniel wrote:

> Hi Ferret Users,
>
> I currently am calculating the difference of many files and have a method
> that works but I'm thinking that there must be a cleaner way.  I'm
> calculating climatological anomalies (the climatology is stored in a file
> airclimsmooth91.nc) from many different annual data files (air.1957.nc
> etc).
>
> The current way that I do this is basically:
> !open many of the data files in question
> use air.1957.nc
> use air.1958.nc
> .
> .
> .
>
> show grid/all
> !I then write down all the grid names that correspond to the data file in
> question
> quit
>
> Then when I want to calculate the anomalies I use:
> use airclimsmooth91.nc
> !load the data file in question
> use air.1957.nc
> !regrid the climatology data to the current file
> let airanom=air[d=2]-dailyclim[d=1,gt=GKQ1@asn] !where GKQ1 is the grid
> name returned by show grid/all earlier
> repeat/k=1:17 save/klimits=1:17/file="/data/ncep/aanom.1957.nc"/append
> airanom[j=36:73,l=1:365]
>
> My question is...is there a way to get the grid names on the fly without
> first going through and finding the names of them without doing some
> sort of show grid/air or show grid/all?  I want to eventually
> automate this but currently the grid name is giving me troubles.
>
> Thanks as always.
>
> Brent
>
> --
> Brent A. McDaniel
>
> Dept of Earth and Atmospheric Sciences
> Georgia Institute of Technology
> Atlanta, Ga.  USA

--

                |  NOAA/PMEL               |  ph. (206) 526-6080
Steve Hankin    |  7600 Sand Point Way NE  |  FAX (206) 526-6744
                |  Seattle, WA 98115-0070  |  hankin@pmel.noaa.gov




[Thread Prev][Thread Next][Index]

Dept of Commerce / NOAA / OAR / PMEL / TMAP

Contact Us | Privacy Policy | Disclaimer | Accessibility Statement