[Thread Prev][Thread Next][Index]

Re: [ferret_users] Problems saving a file



Hi Gaby,
Leaving aside for the moment the size of your dataset, the right way to create the daily average for your data is to define the daily time axis and use a regridding operation.  I don't think you want the axis to be a /modulo axis (unless you are averaging data from more than one year into a modulo time axis in 2002?)
define axis/t="1-jan-2002":"03-apr-2002":1/unit=day tdiario
let ave_T =temp[gt=tdiario@ave]
  
Now, can you do the calculation for each depth?  I think so. We can loop over K.  As long as we define the entire K axis on the first write using the KLIMITS qualifier, then we can append to the dataset in K.  (See "append, slab to NetCDF" in the Ferret Users Guide index).
set mem/size=200
save/clobber/file=day_data.nc/KLIMITS=1:47/K=1 ave_T

repeat/K=2:47 (save/APPEND/file=day_data.nc/K=`k` ave_T)
Ansley


gcolorad@xxxxxxxxx wrote:350`
Hi all:

I'm trying to calculate the dialy mean for a time series (dt = 4hours) but
my problem is when I want to save the data, I can plot it but when i save
it ferret says ERROR: request exceeds memory setting: 276735264 words were
requested, but is too much anyway... My data is in a big grid 92 x 311 x
47 x 350,

I'm calculating the mean by two way

let temp31 = temp[l=90:648:6@ave]  , with this I'm saving it in parts,
because here is where the error appears, the problem is that it produce
many files...

save/file=GC_lmd1_avg.nc/l=1/clobber temp31[k=1:24,l=`l`]
repeat/l=2:93 save/file=GC_lmd1_avg.nc/app

save/file=GC_lmd2_avg.nc/l=1/clobber temp31[k=25:47,l=`l`]
repeat/l=2:93 save/file=GC_lmd5_avg.nc/app temp31[l=`l`,k=25:47]

and

define axis/t="1-jan-2002":"03-apr-2002":1/unit=day/modulo tdiario
let ave_T =temp[gt=tdiario@mod]

save/file=lmd_1.nc/l=1/clobber ave_T[l=`l`]
repeat/l=2:93 save/file=lmd_1.nc/app ave_T[l=`l`]    !here there is no
error but take a long time, 8 hours aprox by time step


Someone know a more efficient methods to do this??, thanks

Gaby

  

[Thread Prev][Thread Next][Index]

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

Privacy Policy | Disclaimer | Accessibility Statement