[ncl-talk] Trying to understand code in NCL example documentation...

Srishti Dasarathy srdasara at ucsd.edu
Thu Apr 25 12:10:18 MDT 2019


Hi Adam,

Thank you so much for this! 

To make sure my understanding is correct, ‘ depol!0 = “ hgt “ ' was used to name the left dimension hgt, and ‘ depol!1 = “ xcoord “ ‘  was used to name the right dimension xcoord. 

‘ depol&hgt = hgt ' and ‘ depol&xcoord ' was then used to assign the hgt and xcoord arrays to the above named dimensions, respectively. 

I’m a little confused beyond this point. 

So, the dimensions of depol are depol(hgt, xcoord)? Does the array of values within depol match the values of hgt and xcoord?

Earlier in the script, there is also a function ‘ hgt!0 = “hgt” ' — was this naming the first (and only) dimension of hgt as hgt? 

I look forward to the clarification, and thanks again! 

Best wishes,
Srishti

> On Apr 25, 2019, at 9:36 AM, Adam Phillips <asphilli at ucar.edu> wrote:
> 
> Hi Srishti,
> That snippet of code is assigning coordinate variables (hgt and xcoord) to each dimension of the depol array. See page 11 of the NCL User's Guide here:
> http://www.ncl.ucar.edu/Document/Manuals/NCL_User_Guide/NCL_User_Guide_v1.1_Legal.pdf <http://www.ncl.ucar.edu/Document/Manuals/NCL_User_Guide/NCL_User_Guide_v1.1_Legal.pdf>
> Adam
> 
> On Thu, Apr 25, 2019 at 10:30 AM Srishti Dasarathy <srdasara at ucsd.edu <mailto:srdasara at ucsd.edu>> wrote:
> Dear NCL-talk community, 
> 
> I have a bit of an unusual question. I'm currently in the midst of transferring my code over to MATLAB for various reasons, but I'm having trouble understanding the syntax of certain sections pasted here <https://www.ncl.ucar.edu/Applications/calipso.shtml> under calipso_3.ncl. I was wondering if you can help me understand what is going on.  
> 
> I am trying to produce a similar imagine in MATLAB, but do not understand these lines completely even after looking at the documentation. 
> 
> The lines I'm struggling to understand are below: 
> ;----------------------------------------------
> ;  ASSIGN NEW DIMENSIONS AND ATTRIBUTES TO COORDINATE CALIPSO DATA WITH  ;  ALTITUDE
> ;----------------------------------------------
>    depol!0   = "hgt"
>    depol&hgt =  hgt
>    xcoord    = ispan(0,dimsizes(lat(:,0)) - 1,1)
>    depol!1   = "xcoord"
>    depol&xcoord = xcoord 
> 
> I understand that hgt is the array of altitude values, but I do not understand how depolorization is getting associated with either hgt or xcoord. 
> 
> If anyone has any guidance on understanding this code example so that I can logically transfer the syntax to MATLAB, I'd really appreciate it! 
> 
> Thank you,
> Srishti Dasarathy
> 
> -- 
> Srishti Dasarathy
> Graduate Student
> Integrative Oceanography Division
> Scripps Institution of Oceanography
> _______________________________________________
> 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
> 
>  <http://www.cgd.ucar.edu/staff/asphilli>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.ucar.edu/pipermail/ncl-talk/attachments/20190425/383afc92/attachment.html>


More information about the ncl-talk mailing list