On Wed, 29 Jul 2009, Xuguang Wang wrote:
> Hi,
>
> I am using wrf_user_ll_to_ij where the 4th argument is opts_args:logical,
> which will be fed into the first argument of get_res_value. Please see
> below for how they are related. Could anyone tell me how to set the first
> argument of get_res_value?
>
Xuguang,
"get_res_value" is an internal routine that is not meant
in general for users.
What it does is looks at logical variable to see if it is True *and*
if the given attribute is attached to it. If it is, then it returns
that attribute's value. If not, then what's returned is the third
argument of "get_res_value".
So:
useT = get_res_value(opts,"useTime",0)
is the equivalent of:
if(opts.and.isatt(opts,"useTime")) then
useT = opts_at_useTime
else
useT = 0
end if
--Mary
> Thanks.
> Xuguang
>
> function wrf_user_ll_to_ij( nc_file:file, longitude:numeric,
> latitude:numeric, \
> opts_args:logical )
>
> begin
>
> opts = opts_args
> useT = get_res_value(opts,"useTime",0)
> returnI= get_res_value(opts,"returnInt",True)
>
_______________________________________________
ncl-talk mailing list
List instructions, subscriber options, unsubscribe:
http://mailman.ucar.edu/mailman/listinfo/ncl-talk
Received on Wed Jul 29 2009 - 12:13:41 MDT
This archive was generated by hypermail 2.2.0 : Fri Jul 31 2009 - 14:51:03 MDT