[ncl-talk] copying resources from one set to another --> ?

Guido Cioni guidocioni at gmail.com
Tue Nov 7 10:07:15 MST 2017


Barry,
I honestly don't understand the problem.
Why would just copying the resource over not work? :) 

if you set

res=True 
res at ...
res at ....

and then assign 

res2=res

res2 will be True and have all the resources that you define for res.

Am I missing something? 

If you instead want to set "just one resource" why not just assign it without having to copy the ones that you do not want to use? 



> On 7. Nov 2017, at 18:04, Barry Lynn <barry.h.lynn at gmail.com> wrote:
> 
> Hi:
> 
> Thank you, but not the attributes, but the resources.
> 
> I have "subroutines" that define resources for a variable.
> 
> However, before using one of them (the appropriate one), I want to set the variable equal to other resources first.
> 
> For instance:
> 
> zdr_res = opts_xy
> 
> Then add to opts_xy the resources in res1, for instance.
> 
> undef("set_res1_list")
> 
> function set_res1_list()
> 
> begin
> 
>   res                = True ; I assume this would need to be commented out.
> 
> various resources...
> 
> end
> 
> 
> On Tue, Nov 7, 2017 at 6:48 PM, Adam Phillips <asphilli at ucar.edu <mailto:asphilli at ucar.edu>> wrote:
> Hi Barry,
> If all you want to do is to copy attributes from one array to another, I think copy_VarAtts would work:
> https://www.ncl.ucar.edu/Document/Functions/Contributed/copy_VarAtts.shtml <https://www.ncl.ucar.edu/Document/Functions/Contributed/copy_VarAtts.shtml>
> Adam
> 
> On Tue, Nov 7, 2017 at 4:56 AM, Barry Lynn <barry.h.lynn at gmail.com <mailto:barry.h.lynn at gmail.com>> wrote:
> Hello:
> 
> I can't seem to find how to do this.
> 
> I have this ncl line:
> 
> opts_zdr = set_res2_list()
> 
> I also have opts_xy.
> 
> When making vertical cross sections I need to set opts_zdr = opts_xy
> 
> and then add in the resources of res2_lis.
> 
> I am not sure how to add them in, rather than "set" them.
> 
> Thanks,
> 
> 
> 
> Barry
> 
> 
> 
> 
> 
> 
> 
> 
> -- 
> Barry H. Lynn, Ph.D
> Senior Lecturer,
> The Institute of the Earth Science, 
> The Hebrew University of Jerusalem, 
> Givat Ram, Jerusalem 91904, Israel 
> Tel: 972 547 231 170
> Fax: (972)-25662581
> 
> C.E.O, Weather It Is, LTD
> Weather and Climate Focus
> http://weather-it-is.com <http://weather-it-is.com/>
> Jerusalem, Israel
> Local: 02 930 9525
> Cell: 054 7 231 170
> Int-IS: x972 2 930 9525
> US 914 432 3108 <tel:(914)%20432-3108>
> 
> _______________________________________________
> ncl-talk mailing list
> ncl-talk at ucar.edu <mailto:ncl-talk at ucar.edu>
> List instructions, subscriber options, unsubscribe:
> http://mailman.ucar.edu/mailman/listinfo/ncl-talk <http://mailman.ucar.edu/mailman/listinfo/ncl-talk>
> 
> 
> 
> 
> -- 
> Adam Phillips 
> Associate Scientist,  Climate and Global Dynamics Laboratory, NCAR
> www.cgd.ucar.edu/staff/asphilli/ <http://www.cgd.ucar.edu/staff/asphilli/>   303-497-1726 <tel:(303)%20497-1726>
> 
>  <http://www.cgd.ucar.edu/staff/asphilli>
> 
> 
> -- 
> Barry H. Lynn, Ph.D
> Senior Lecturer,
> The Institute of the Earth Science, 
> The Hebrew University of Jerusalem, 
> Givat Ram, Jerusalem 91904, Israel 
> Tel: 972 547 231 170
> Fax: (972)-25662581
> 
> C.E.O, Weather It Is, LTD
> Weather and Climate Focus
> http://weather-it-is.com <http://weather-it-is.com/>
> Jerusalem, Israel
> Local: 02 930 9525
> Cell: 054 7 231 170
> Int-IS: x972 2 930 9525
> US 914 432 3108
> _______________________________________________
> ncl-talk mailing list
> ncl-talk at ucar.edu
> List instructions, subscriber options, unsubscribe:
> http://mailman.ucar.edu/mailman/listinfo/ncl-talk


Guido Cioni
http://guidocioni.altervista <http://guidocioni.altervista/>.org

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.ucar.edu/pipermail/ncl-talk/attachments/20171107/6c98ad2f/attachment.html>


More information about the ncl-talk mailing list