Hi, On 10/17/2012 8:43 PM, Russ Fiedler
wrote:
Ryo, It looks to be related to the new E and F axes. Defining refp to be on the same grid as salt and temp let refp = 0*salt works with V6.82. Russ It turns out that this is something we're seeing for this particular grid because of the addition of the E and F axes, but it comes from the methods that Ferret has always used for figuring out the grid of an _expression_. What happens when Ferret is getting the grid of an _expression_ is that we work through all the different items in the _expression_, like salt, temp, refp, 0, and figure out what their grids are. The 0 in let den1 = RHO_UN(salt,temp,0)is just a constant so its "grid" is normal to all axes in all grids. When we reconcile the grid of "0" with the grids of "temp" and "salt" the resulting grid for den1 has the XYZT axes of salt and temp, and normal axes in the E and F directions. The grid of "refp" however, is the abstract grid. That makes it possible to reconcile it with any other grid, but it is not the same as the normal grid. When we reconcile the grid of "refp" with the grids of "temp" and "salt" the resulting grid for the _expression_ let den2 = RHO_UN(salt,temp,refp)is a grid with the XYZT axes of salt and temp, and abstract in E and F. Ferret still doesn't have full info on the grid of den2, so it decides it needs to evaluate salt, temp, and refp before it can give back the information that the length of the T axis is 12. We're getting the error message because the full XYZT grid of SALT doesn't fit into the amount of memory currently allocated. The same sequence of events would have happened in 4D Ferret, if the original grids of SALT and TEMP were 3d, because then the 4th dimension of the grid would be an abstract axis when working with den2. Do the same example using levitus_climatology, and ask for the length of the X axis. Using 4D Ferret, we'll use "set mode diagnostic" which shows the grids Ferret is creating as it goes along. > ferret_v672 Now try den2, with variables salt, temp, and refp. The grid has an ABSTRACT time axis, and so we get into the same situation. yes? say `den2,return=iend` On Thu, 2012-10-18 at 12:55 +1100, Ryo Furue wrote:Ferret users, Has anybody seen this behavior? Is this a bug? Basically, "return=lend" tries to allocate a lot of memory in some cases. yes? set data bug.nc yes? let refp = 0 yes? let den1 = RHO_UN(salt,temp,0) !! Good yes? let den2 = RHO_UN(salt,temp,refp) !! Bad yes? say `den1,return=lend` !-> MESSAGE/CONTINUE 2 2 yes? say `den2,return=lend` **ERROR: request exceeds memory setting: 10 Mwords were requested. [ . . . remaining error messages elided . . .] The dataset bug.nc contains salt(i,j,k,l) and temp(i,j,k,l) with l = 1:2. I'm attaching the results of "show grid" below. If you are interested and you cannot reproduce this error, I'll send the dataset to you. I'm currently using FERRET v6.81 Linux 2.6.32-279.1.1.el6.x86_64 32-bit - 07/23/12 The same script didn't cause this error some versions ago. Regards, Ryo -------------------------------- yes? show grid den1 GRID GCF1 name axis # pts start end LONGITUDE_T LONGITUDE 564mr 104.17E(104.17) 68.167W(291.83) LATITUDE_T LATITUDE 168 r 25.833S 29.833N DEPTH_T DEPTH (m) 51 i- 2.5 5745 TIME1 TIME 2 r 21-JAN-2031 00:00 01-FEB-2031 00:00 normal E normal F yes? show grid den2 GRID (G002) name axis # pts start end LONGITUDE_T LONGITUDE 564mr 104.17E(104.17) 68.167W(291.83) LATITUDE_T LATITUDE 168 r 25.833S 29.833N DEPTH_T DEPTH (m) 51 i- 2.5 5745 TIME1 TIME 2 r 21-JAN-2031 00:00 01-FEB-2031 00:00 ABSTRACT E 9999999 r 1 9999999 ABSTRACT F 9999999 r 1 9999999 |