[Thread Prev][Thread Next][Index]

Looping over multiple files



Hi Ferret Users:

I am a new user of ferret. I'd like to process multiple files (read in the file names, regrid to
new grid, write out new files) by using a command similar to
"do" loops in Fortran. I searched for the mail archive but couldn't find a solution for my problem.
I did find a similar question asked by someone under title 'repeat with "anonymous" index' in
1999, but there wasn't any answers.

Here is what I am trying to do

"use climatological_axes
repeat/j=64:69:1 (use "uflx.sfc.gauss.19`j`.nc"; let uflx_avg=uflx[GT=month_reg@MOD]; save/file="MONTHLY/uflx.sfc.gauss.mon.19`j`.nc" uflx_avg) "

The names of the files were created properly, but index "j" is hard-coded as the dimension j.
So, ferret assumes it's an index of j. If I change "j" to "m", ferret has an error
"unknown command qualifier: m=64:69:1"

Perhaps it's a bad idea to loop the files using "repeat". I wonder if someone knows
a better way to process multiple files.

Thanks for your help,

Zhen



--
This message has been scanned for viruses and dangerous
content by MailScanner, and is believed to be clean.


[Thread Prev][Thread Next][Index]

Dept of Commerce / NOAA / OAR / PMEL / TMAP

Contact Us | Privacy Policy | Disclaimer | Accessibility Statement