[Thread Prev][Thread Next][Index]

Re: [ferret_users] Testing individual points within a loop



Hi Steve,

If what you are trying to do is plot the location of points where tlat
is between 20 and 21,  you  could do it without the repeat as follows:

yes? let slat = if (tlat gt 20) and (tlat lt 21) then tlat
yes?plot/vs/color=black/size=0.25/thick=2/i=1:50 jlon,slat

Regards,

James


-- 
James Caveen
Programmeur-Analyste
Université du Québec à Rimouski

Tel:   (418) 723-1986, poste 1295
Courriel: james_caveen@uqar.qc.ca

--- Begin Message ---
Ferret Clan:
   I am running into an error when I execute the code below.  I want to
loop through my data points and when one of them meets a certain
condition (if statement), plot that point and continue looping.  There is 
an error with how I use the variable "a" however, I believe I have the
proper parenthesis, or bracket listed.  

repeat/range=1:50:1/name=a (set data 1;IF `tlat[i=`a`] gt 20.0 and
tlat[i=`a`] lt 21.0` THEN
(plot/vs/size=0.25/color=black/thick=2/nolab/over
jlon[i=`a`],tlat[i=`a`]) ENDIF)
 
**ERROR: command syntax: tlat[i=
          unclosed quotation, parenthesis, or bracket

Thanks for any help.

Steve

*****************************************
Stephen R. Guimond
Graduate Research Assistant
Center for Ocean-Atmospheric Prediction Studies 
*****************************************



--- End Message ---

[Thread Prev][Thread Next][Index]

Dept of Commerce / NOAA / OAR / PMEL / TMAP

Contact Us | Privacy Policy | Disclaimer | Accessibility Statement