Hi, As Akshay says, the `dep GE 50` can be evaluated only if dep is a scalar. So if the grid of variable pres has a range in x, y, t, etc, you need to restrict those other dimensions before you can evaluate if `dep ge 50` I see that you are looping over K, and then applying transformations in the Z direction. Look at this loop: yes? repeat/k=1:`zulim` (let dep_min=pres[d=1,z=@min])At each iteration of this loop, the Z=@MIN will be applied only at the single grid point indicated by K, so it would return the variable pressure at that value of K, not the minimum over any range. I am guessing that this is not what you intended. For finding the locations where the max pressure is greater than 50, you could use IF to define masks and masked variables. See http://ferret.pmel.noaa.gov/Ferret/documentation/users-guide/variables-xpressions/XPRESSIONS#_VPID_181. For instance, yes? let dep = pres[d=1,z=@max]If the grid has a range of x and y, then this will show the values of dep where it takes on values larger than 50 yes? shade deeper_50or define a true mask, yes? let dep_50_mask = if dep gt 50 then 1and multiply other variables by this mask. So, for instance, " psal where dep is greater than 50" is this: yes? let psal_50_mask = psal* dep_50_maskYou may be able to do what you want without resorting to loops. Ansley On 2/10/2016 3:53 AM, Venu wrote:
|