[Thread Prev][Thread Next][Index]
Re: performance
Hi Brent,
On Sun, 28 Jan 2001, Brent A McDaniel wrote:
>
>
> Ferret Users,
>
> I'm wondering if there's a way to increase performance on the current
> calculation that I'm doing. I opened up the ncep daily data files from
> 1957-1999 and am calculating the climatology for them. Here's my
> procedure for that:
>
> yes? set memory/size=100
> Cached data cleared from memory
> yes? set data "/usr/local/ferret/extra/air.des"
> yes? DEFINE
> AXIS/T=0:365.2425/EDGES/NPOINTS=365/T0=1-JAN-0001/UNITS=DAYS/MODULO tdaily
> yes? let dailyclim=air[GT=tdaily@mod]
> yes? REPEAT/l=1:365 save/file="/data/ncep/dailyclim.nc"/append dailyclim
I don't think that repeating over the l index is the smartest thing to do
here. I think what is happening is that for each iteration ferret is
having to read in the data over all times and recalculate the climatology
each time over the whole globe. I bet that Ferret's cache is being flushed
all the time. Try setting SET MODE DIAGNOSTIC to see what ferret is doing.
I would try doing the calculations in a different order. Try doing a
latitude at a time. In this case you shouldn't have to reread any data.
If you do then it might be faster to use a double loop to do the
calculation point by point (or a block of points)
Say
REPEAT/j=1:180 save/jlimits=1:180/file="/data/ncep/dailyclim.nc"/append
dailyclim
or for blocks of 10 logitutudes at a particular latitude:
REPEAT/j=1:180 (repeat/i=1:351:10
save/jlimits=1:180/iilimits=1:360/i=`i`:`i+9`/
file="/data/ncep/dailyclim.nc"/append dailyclim)
Cheers,
Russ Fiedler
[Thread Prev][Thread Next][Index]
Dept of Commerce /
NOAA /
OAR /
PMEL /
TMAP
Contact Us | Privacy Policy | Disclaimer | Accessibility Statement