[Thread Prev][Thread Next][Index]

Re: [ferret_users] invalid command: grave accent doesnt evaluate to scalar



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]
yes? let deeper_50 = if dep gt 50 then dep
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_50
or define a true mask,
yes? let dep_50_mask = if dep gt 50 then 1
and 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_mask
You may be able to do what you want without resorting to loops. 

Ansley

On 2/10/2016 3:53 AM, Venu wrote:
Hi,

I am trying to run jnl file by using shell script. The following block showing the error "invalid command: grave accent doesnt evaluate to scalar dep ge 50".

repeat/k=1:`zulim` (let dep_min=pres[d=1,z=@min];let dep=pres[d=1,z=@max];if `dep ge 50` then (list/file=argo.txt/append/nolab 2001,12,17,latitude[d=1],longitude[d=1],sst_a[d=2,x=longitude[d=1],y=latitude[d=1],t=17-Dec-2001@itp],sla[d=3,x=longitude[d=1],y=latitude[d=1],t=17-Dec-2001@itp],temp[z=`dep_min`,d=1],psal[z=`dep_min`,d=1],1024.5*4000.5*temp[d=1,z=0:50@din]*1E-08,temp[d=1,z=50],1024.5*4000.5*temp[d=4,x=longitude[d=1],y=latitude[d=1],t=17-Dec-2001@itp,z=0:50@din]*1E-08,temp[z=50,d=4,x=longitude[d=1],y=latitude[d=1],l=12]) endif)

Please help me in resolving the issue.


Thanks & Regards....!!

Venu
-----------

Mobile:+91-8712404538
           +91-9573547538


"Now or Never...."


[Thread Prev][Thread Next][Index]
Contact Us
Dept of Commerce / NOAA / OAR / PMEL / Ferret

Privacy Policy | Disclaimer | Accessibility Statement