[Thread Prev][Thread Next][Index]

Re: Automate ferret



Hi Rolando;

For this type of problem, I've used a shell script that uses ncks in the NCO routines, rather than ferret. John Hunter just mentioned these in a reply to a question by Yun Li. The web site is http://nco.sourceforge.net/nco.html. Refer to the manual sections for the exact syntax.

Below is my script for reference. It copies a bunch of 2D variables, then the top and bottom levels of some 3D variables to a new file. It generates lots of little files, but you could easily add a line that concatinates the little files together with ncrcat, or just use a ferret descriptor file.



#!/bin/csh

foreach FILE ( `ls -1 nep3*.nc` )
set NEWF=slice_$FILE
echo Copying variables from $FILE to $NEWF

ncks -v ocean_time,Hsbl,zeta,ubar,vbar,sustr,svstr -O $FILE $NEWF
ncks -v u,v -F -d s_rho,1 -A $FILE $NEWF
ncrename -v u,ubot -v v,vbot -O $NEWF
ncks -v temp,salt,u,v -F -d s_rho,30 -A $FILE $NEWF
ncrename -v temp,ttop -v salt,stop -v u,utop -v v,vtop -O $NEWF
end



On Fri, 21 Jan 2005, Rolando S. Balotro wrote:

Hello All

I have tons of *.nc files to process.
I need to open them individually and pick a data from a
selected data point.

Is there a way to automate this?
For instance open ferret, load the data, extract the data,
close the data, load another data set, extract and so on.

thanks so many in advance
roland



Dear all,

How to draw a thick line thicker than "thick=3" in a "plot/vs..." command?
Just like "dark" in "contour" command.

Thanks,
Jian

****************************************
Jian Ma

M. S. in Physical Oceanography
The First Institute of Oceanography
State Oceanic Administration
P. R. China

No. 6 Xian-Xia-Ling Road, Qingdao 266061
Tel: 86-532-8967401
Fax: 86-532-8967400
URL: www.fio.org.cn
****************************************

--
Rolando S. Balotro
University of Miami
Rosenstiel School of Marine and Atmospheric Science (RSMAS)
Division of Meteorology and Physical Oceanography
4600 Rickenbacker Causeway Miami, FL 33149
Tel. Number: (1)-305-361-4933
Email: rbalotro@rsmas.miami.edu




*********************
Elizabeth L. Dobbins
Research Scientist
JISAO/PMEL
phone: (206) 526-4581

"Various forms of jiggery-pokery were used to suit horses to courses." -- Michael Burleigh

[Thread Prev][Thread Next][Index]

Dept of Commerce / NOAA / OAR / PMEL / TMAP

Contact Us | Privacy Policy | Disclaimer | Accessibility Statement