[Thread Prev][Thread Next][Index]

RE: plotting global attributes



Claire,

This is one of those things that I wish Ferret could do easily too. Here is my work around. I think I got it from the ferret_users archive if you want
more information on it. I found the syntax a bit finicky. In my example, I need to get some map info from a WRF file so that I can rotate the wind
components. The name of the data file is passed as the script argument and then assigned to a symbol name as shown here. This works great
except when using descriptor files for the data set. Then, you have to track the actual filename being used by the descriptor. Here is the
relevant part of the code:

def sym datafile "$1"
sp echo def sym mapproj \"\`ncdump -h ($datafile) | grep MAP_PROJ | tr -d :MAP_PROJ\ = | tr -d f\\;\`\" > rotateuv.tmp.jnl
sp echo def sym cenlon \"\`ncdump -h ($datafile) | grep CEN_LON | tr -d :CEN_LON\ = | tr -d f\\;\`\" >> rotateuv.tmp.jnl
sp echo def sym cenlat \"\`ncdump -h ($datafile) | grep CEN_LAT | grep -v MOAD_CEN_LAT | tr -d :CEN_LAT\ = | tr -d f\\;\`\" >> rotateuv.tmp.jnl
go rotateuv.tmp.jnl
sp rm rotateuv.tmp.jnl

Hope this helps.

-Bill
_______________________________________
William I. Gustafson Jr., Ph.D.
Pacific Northwest National Laboratory
P.O. Box 999, MSIN K9-30
Richland, WA 99352, USA
Voice & Msg: (509)372-6110
FAX: (509)372-6168
http://www.pnl.gov/atmos_sciences



[Thread Prev][Thread Next][Index]

Dept of Commerce / NOAA / OAR / PMEL / TMAP

Contact Us | Privacy Policy | Disclaimer | Accessibility Statement