[Thread Prev][Thread Next][Index]

RE: [ferret_users] if-then, evaluation and transformation problem



Hello Marco,

I would read this as follows: the result from myvar,return=isReady is just one value/point that depends on myvar. The transformation however, happens in the first instance at every point of myvar - so I think, ferret tries to apply a array evaluation on a scalar condition.
I think the example if 1 then say `myvar[i=@ngd]` is different, as 1 does not depend on myvar.

But I am not definitively sure.

Best wishes,
Joerg
 

________________________________________
From: owner-ferret_users@xxxxxxxx [owner-ferret_users@xxxxxxxx] on behalf of Marco van Hulten [marco.van-hulten@xxxxxxxxxxxx]
Sent: 25 October 2015 20:11
To: ferret_users@xxxxxxxx
Subject: [ferret_users] if-then, evaluation and transformation problem

Hello Ferret users,

I don't understand the following behaviour:

yes? say `myvar[i=@ngd]`
50
yes? if 1 then say `myvar[i=@ngd]`
50
yes? if `myvar,return=isReady` then say yes
yes
yes? if `myvar,return=isReady` then say `myvar[i=@ngd]`
 **ERROR: illegal use of transformation: MASK_2D[Y=0.5:27.5@NGD,D=9] applied to point
MESSAGE/CONTINUE `myvar[i=@ngd]`
Command file, command group, or REPEAT execution aborted
yes?

There does not appear to be a problem in returning the expression, nor
is there a problem in using the condition, but there is a problem in
returning this expression using this condition.

I do not know if it is related, but in a loop this code results in a
Ferret crash:

STOP IS_DO_GC_FCN cs_type(res_cx) is neither ptype_string nor ptype_float

Thanks for any suggestions.

Marco

--
Laboratoire des Sciences du Climat et l'Environnement (LSCE)
Tel: +33 1 6908 3876
http://www.lsce.ipsl.fr/Pisp/marco.van-hulten/


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

Privacy Policy | Disclaimer | Accessibility Statement