[Thread Prev][Thread Next][Index]

Re: [ferret_users] Two questions regarding repeat command

To access data for all of the months in a single loop, we need to put a 0 in front of the month for months 1 through 9. Define a symbol with the month number, and redefine it with the extra 0 if the month is less than 10. This same symbol can be used to name the output postscript file.

Note that PPL CLSPLT is used after finishing the plot commands (whatever they are) to close the plot so it is ready for conversion to postscript with Fprint. Another way to handle this would be to name the metafiles with a command set mode metafile metafile($imon).plt, and then convert them to postscript after exiting Ferret.

repeat/range=1:12:1/name=m \ (define symbol imon = `m`; \
if `m lt 10` then define symbol imon = 0`m`; \
use "http://path/month($imon)_combined.hdf"; \
set mode meta; plot variable; ppl clsplt;\
sp Fprint -o "/DATA/month($imon)_combined_sst.ps" metafile.plt;\

C. Shaji wrote:
Hello all,
I have two questions on the usage of repeat command.

1) I want to access 12 monthly HDF data files.
The following works fine for me for the first 01 to 09 files, and then 10
to 12 files.

repeat/range=1:5:1/name=m \ !months 1,2,3,4,5.

Can someone suggest me what additional info I should need to access all 12
files 01,02,..,09,10,11,12 using the repeat command?

2) Inside the loop I also generate the plots and want to save the figures
as "psotscript" files.

The following is working for me outside the loop, but within the loop
shows error.

Fprint -o "/DATA/month0`m`_combined_sst.ps" metafile.plt !to create ps file.

Can someone suggest me the correct usage?

Thanks in advance.

C. Shaji.

[Thread Prev][Thread Next][Index]

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

Privacy Policy | Disclaimer | Accessibility Statement