[Thread Prev][Thread Next][Index]

Re: [ferret_users] repeat/range error



Hi Zibiao,
What version of Ferret are you running? The REPEAT/RANGE qualifier was added to Ferret at version 5.6, so if you are using an earlier version this qualifier isn't in Ferret. If you're using Ferret on a machine where we don't have more recent versions available, then the loop could likely be written as a REPEAT/K= which should work fine especially if your data does not depend on K. You will not be able to do the nested loops using the same index (k).


Zibiao Zhang wrote:
Hi All,
I have a ferret loop program as following:

let year_start = 2005
let year_end = 2006
let mon_start = 1
let mon_end = 12

repeat/range = 'year_start':'year_end':1/Name=yr
	(define symbol yy = 'yr';
	let m1 = if '($yy) EQ year_start' then mon_start else 1
	let m2 = if '($yy) EQ year_end' then mon_end else 12

	repeat/range='m1':'m2':1/name=mo
		(define symbol mm='mo';
		let mo = if '($mm) LT 10' then "0($mm)" else "($mm)"
		let outname = "($yy)" + mo + "15t.nc"
		let inname="archv." + "($yy)" + mo + "1500_3zt.nc"

		set data 'inname'
		list/file='outname'/clobber/i=200:450/j=800:1050/format="CDF" temperature
		can data 'inname'
	);\
)

When I ran it on windows based ferret, I got weired error message:
repeat/range = 'year_start':'year_end':1/Name=yr
**ERROR: unknown command qualifier: range= 'year_start':'year_end':1

Anybody knows what is going on?

THanks in advance.
Zibiao


--

~> ~> ~> ~> ~> ~> ~> ~> ~> ~> ~>
Ansley Manke, NOAA/PMEL   ansley.b.manke@xxxxxxxx
7600 Sand Point Way NE, Seattle WA
Phone 206-526-6246,  FAX 206-526-6744




[Thread Prev][Thread Next][Index]

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

Privacy Policy | Disclaimer | Accessibility Statement