[ncl-talk] get_res_value_keep function

Alan Brammer abrammer at albany.edu
Mon Feb 15 12:18:27 MST 2016


There was a similar question I found in the archives, response from Mary below.  https://www.ncl.ucar.edu/Support/talk_archives/2009/1643.html

“
"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 

“

get_res_value() deletes the obtained attribute, while get_res_value_keep() does not.   



Alan. 





##############################
Alan Brammer,
Post-Doc Researcher

Department of Atmospheric and Environmental Sciences,
University at Albany, State University of New York, Albany, NY, 12222
abrammer at albany.edu
##############################

> On 14 Feb 2016, at 23:25, Lijun Diao <ljdiao at gmail.com> wrote:
> 
> Hi, ncl talk forum:
>  
> When I was reading shapefile_utils.ncl, I came across get_res_value_keep function. I could not find explanation of such function. Where can I find some info about this function of its usage or meaning?
>  
> thanks,
>  
> -----------------------------------------------------------------------------
> Lijun Diao
> ldiao at uh.edu
> Research Assistant
> Department of Earth & Atmospheric Sciences
> University of Houston
> 4800 Calhoun RD., Bldg. S&R1-312
> Houston, TX 77204-5007
> _______________________________________________
> ncl-talk mailing list
> ncl-talk at ucar.edu
> List instructions, subscriber options, unsubscribe:
> http://mailman.ucar.edu/mailman/listinfo/ncl-talk

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mailman.ucar.edu/pipermail/ncl-talk/attachments/20160215/95623c0a/attachment.html 


More information about the ncl-talk mailing list