[Thread Prev][Thread Next][Index]

Re: [ferret_users] Axis def from samplel() - too many variables to store in memory



Hi Paulo,
Thanks for sending the example script and data file, and the results of your Ferret run. However I cannot replicate this, and I don't see anything wrong with your script, except one thing which I'll show below.  I see you are running Ferret v6.07, but when I try it with that version (and also with older and newer Ferret executables), I don't see the error that you're reporting.

Now, when I run your script I see this:
def ax/t="15-jul-2005 00:00":"05-sep-2005 00:00":10unit=min t10m
 
let tv   = t[gt=t10m]
 
def ax/t=1:100:1 tsamp
def gr/t=tsamp gsamp
 
file/var=lsamp,-,-,-/grid=gsamp too_many_vars_test.txt
 
let tvarsamp = samplel(tv,lsamp)
 
def ax/t/from_data/t0="`tv,ret=t0`"/unit=`tv,ret=tunits` ax_samp = tvarsamp
 !-> def ax/t/from_data/t0="15-JAN-1901"/unit=HOURS ax_samp = tvarsamp
 *** NOTE: Axis has repeated values -- micro-adjusting ...
 **ERROR: improper grid or axis definition: unrepairable repeated axis coords
def ax/t/from_data/t0="15-JAN-1901"/unit=HOURS ax_samp = tvarsamp
Command file, command group, or REPEAT execution aborted
Here is what's going on here. The default origin when you do a DEFINE AXIS/T=  is 1-jan-1900, which makes the time coordinates for your axis quite large: minutes since 1-jan-1900. Therefore, the variable tv =  t[gt=t10m] has values of around 5.5E+07, with the variation of 10 minutes per time step in the last two digits of the numbers. Ferret can handle values with this much precision when they define axes, because coordinate axes are stored in double precision. But as soon as you use them as the values of a variable, in this case the variable tvarsamp, they are converted to single precision and you lose precision in the last few digits.

Since you're defining the time axis in year 2005, you might try your script with a different time origin, such as
def ax/t="15-jul-2005 00:00":"05-sep-2005 00:00":10/t0=1-jan-2005/unit=min t10m
 
The only other thing I can think of is that this is some interaction of Ferret with your environment or perhaps a problem with the way Ferret is installed. You might try upgrading to the latest Ferret release, running the full Ferret install procedure, and see if that helps.

Paulo B. Oliveira wrote:
Hi, 

I'm trying to define a time axis from a set of discrete time steps
(samples) stored on a text file. Everything works fine for a short
(~100) samples but for 150 steps the execution is aborted with the error
message:
**ERROR: too many variables to store in memory

Any hints on ways to do this ? 
Thanks,

Paulo.
------------------------------------------------------------------

yes? go too_many_vars_test.jnl
 ! NOAA/PMEL TMAP
 ! FERRET v6.07
 ! Linux(g77) 2.4.21-32 - 08/29/07
 !  8-Jun-09 14:01
 
def ax/t="15-jul-2005 00:00":"05-sep-2005 00:00":10/unit=min t10m
 
let tv   = t[gt=t10m]
 
def ax/t=1:150:1 tsamp
Replacing definition of axis TSAMP
def gr/t=tsamp gsamp
 
file/var=lsamp,-,-,-/grid=gsamp too_many_vars_test.txt
 
let tvarsamp = samplel(tv,lsamp)
 
def ax/t/from_data/t0="`tv,ret=t0`"/unit=`tv,ret=tunits` ax_samp =
tvarsamp
 !-> def ax/t/from_data/t0="15-JAN-1901"/unit=MIN ax_samp = tvarsamp
 **ERROR: too many variables to store in memory
def ax/t/from_data/t0="15-JAN-1901"/unit=MIN ax_samp = tvarsamp
Command file, command group, or REPEAT execution aborted

  

[Thread Prev][Thread Next][Index]

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

Privacy Policy | Disclaimer | Accessibility Statement