<html><body><div style="color:#000; background-color:#fff; font-family:HelveticaNeue, Helvetica Neue, Helvetica, Arial, Lucida Grande, sans-serif;font-size:12pt"><div style="" class=""><br style=""></div><div style="" class=""><span style="" class="">Mary,</span></div><div class="" style="color:rgb(0, 0, 0);font-size:16px;font-family:HelveticaNeue, Helvetica Neue, Helvetica, Arial, Lucida Grande, sans-serif;background-color:transparent;font-style:normal;"><span style="" class="">Thank
 you very much for pointing me to the wrfgsn page. I tried the first two
 examples and they work perfectly. These will serve all my purposes and 
the way they are presented will give me a lot of learning examples. Thanks to all who looked at my post.<br></span></div><div class="" style="color:rgb(0, 0, 0);font-size:16px;font-family:HelveticaNeue, Helvetica Neue, Helvetica, Arial, Lucida Grande, sans-serif;background-color:transparent;font-style:normal;"><span style="" class="">I really appreciate your patience and efforts Mary. Thanks very much to all on ncl-talk.</span></div><div class="" style="color:rgb(0, 0, 0);font-size:16px;font-family:HelveticaNeue, Helvetica Neue, Helvetica, Arial, Lucida Grande, sans-serif;background-color:transparent;font-style:normal;"><span style="" class="">Zilore</span></div> <div class="qtdSeparateBR"><br><br></div><div style="display: block;" class="yahoo_quoted"> <div class="" style="font-family: HelveticaNeue, Helvetica Neue, Helvetica, Arial, Lucida Grande, sans-serif; font-size: 12pt;"> <div class="" style="font-family: HelveticaNeue, Helvetica Neue, Helvetica,
 Arial, Lucida Grande, sans-serif; font-size: 12pt;"> <div style="" class="" dir="ltr"> <font style="" class="" face="Arial" size="2"> On Monday, August 4, 2014 8:00 PM, "ncl-talk-request@ucar.edu" &lt;ncl-talk-request@ucar.edu&gt; wrote:<br style="" class=""> </font> </div>  <br style="" class=""><br style="" class=""> <div style="" class="">Send ncl-talk mailing list submissions to<br style="" class="">&nbsp;&nbsp;&nbsp; <a style="" class="" ymailto="mailto:ncl-talk@ucar.edu" href="mailto:ncl-talk@ucar.edu">ncl-talk@ucar.edu</a><br style="" class=""><br style="" class="">To subscribe or unsubscribe via the World Wide Web, visit<br style="" class="">&nbsp;&nbsp;&nbsp; <a style="" class="" href="http://mailman.ucar.edu/mailman/listinfo/ncl-talk" target="_blank">http://mailman.ucar.edu/mailman/listinfo/ncl-talk</a><br style="" class="">or, via email, send a message with subject or body 'help' to<br style="" class="">&nbsp;&nbsp;&nbsp; <a style="" class=""
 ymailto="mailto:ncl-talk-request@ucar.edu" href="mailto:ncl-talk-request@ucar.edu">ncl-talk-request@ucar.edu</a><br style="" class=""><br style="" class="">You can reach the person managing the list at<br style="" class="">&nbsp;&nbsp;&nbsp; <a style="" class="" ymailto="mailto:ncl-talk-owner@ucar.edu" href="mailto:ncl-talk-owner@ucar.edu">ncl-talk-owner@ucar.edu</a><br style="" class=""><br style="" class="">When replying, please edit your Subject line so it is more specific<br style="" class="">than "Re: Contents of ncl-talk digest..."<br style="" class=""><br style="" class=""><br style="" class="">Today's Topics:<br style="" class=""><br style="" class="">&nbsp;  1. Re: triple2grid (Dennis Shea)<br style="" class="">&nbsp;  2. Re: How to create two y axis with a common x axis in bar&nbsp;&nbsp;&nbsp; plot<br style="" class="">&nbsp; &nbsp; &nbsp; (Mary Haley)<br style="" class="">&nbsp;  3. Re: (no subject) (Dennis Shea)<br style="" class="">&nbsp; 
 4. Re: Running example scripts for beginners (Mary Haley)<br style="" class="">&nbsp;  5. Re: read separated files (Dennis Shea)<br style="" class="">&nbsp;  6. Using a loop to find values greater than 0 (calculate&nbsp;&nbsp;&nbsp; PDD)<br style="" class="">&nbsp; &nbsp; &nbsp; (Lauren Jean Vargo)<br style="" class="">&nbsp;  7. Re: Using a loop to find values greater than 0&nbsp;&nbsp;&nbsp; (calculate<br style="" class="">&nbsp; &nbsp; &nbsp; PDD) (Dennis Shea)<br style="" class="">&nbsp;  8. Re: Using a loop to find values greater than 0&nbsp;&nbsp;&nbsp; (calculate<br style="" class="">&nbsp; &nbsp; &nbsp; PDD) (Kyle Griffin)<br style="" class="">&nbsp;  9. Re: Strange white lines across plot (Mary Haley)<br style="" class="">&nbsp; 10. Re: Fwd: Masking a U.S. county from a netcdf file (Mary Haley)<br style="" class=""><br style="" class=""><br style="" class="">----------------------------------------------------------------------<br style=""
 class=""><br style="" class="">Message: 1<br style="" class="">Date: Mon, 4 Aug 2014 07:17:29 -0600<br style="" class="">From: Dennis Shea &lt;<a style="" class="" ymailto="mailto:shea@ucar.edu" href="mailto:shea@ucar.edu">shea@ucar.edu</a>&gt;<br style="" class="">Subject: Re: [ncl-talk] triple2grid<br style="" class="">To: Manisha Ganeshan &lt;<a style="" class="" ymailto="mailto:manisha.ganeshan86@gmail.com" href="mailto:manisha.ganeshan86@gmail.com">manisha.ganeshan86@gmail.com</a>&gt;<br style="" class="">Cc: NCL-talk &lt;<a style="" class="" ymailto="mailto:ncl-talk@ucar.edu" href="mailto:ncl-talk@ucar.edu">ncl-talk@ucar.edu</a>&gt;<br style="" class="">Message-ID:<br style="" class="">&nbsp;&nbsp;&nbsp; &lt;CAOF1d_4pLjOOnFbXb-7ju2BQbkXwbx=iCVsuVWjiUM=<a style="" class="" ymailto="mailto:wyR_Efw@mail.gmail.com" href="mailto:wyR_Efw@mail.gmail.com">wyR_Efw@mail.gmail.com</a>&gt;<br style="" class="">Content-Type: text/plain; charset="utf-8"<br
 style="" class=""><br style="" class="">Not that I am aware of. Sorry.<br style="" class=""><br style="" class=""><br style="" class="">On Fri, Aug 1, 2014 at 4:10 PM, Manisha Ganeshan &lt;<br style="" class=""><a style="" class="" ymailto="mailto:manisha.ganeshan86@gmail.com" href="mailto:manisha.ganeshan86@gmail.com">manisha.ganeshan86@gmail.com</a>&gt; wrote:<br style="" class=""><br style="" class="">&gt; Thanks, Dennis. Is there a function that calculates the mean or saves the<br style="" class="">&gt; total number of nearest neighbor source points for each grid point in the<br style="" class="">&gt; destination grid?<br style="" class="">&gt;<br style="" class="">&gt; Regards,<br style="" class="">&gt; Nisha<br style="" class="">&gt;<br style="" class="">&gt;<br style="" class="">&gt; On Fri, Aug 1, 2014 at 6:03 PM, Dennis Shea &lt;<a style="" class="" ymailto="mailto:shea@ucar.edu" href="mailto:shea@ucar.edu">shea@ucar.edu</a>&gt; wrote:<br
 style="" class="">&gt;<br style="" class="">&gt;&gt; It does not calculate the mean. New 'nearest neighbor' values overwrite<br style="" class="">&gt;&gt; previous values.<br style="" class="">&gt;&gt;<br style="" class="">&gt;&gt;<br style="" class="">&gt;&gt; On Fri, Aug 1, 2014 at 3:59 PM, Manisha Ganeshan &lt;<br style="" class="">&gt;&gt; <a style="" class="" ymailto="mailto:manisha.ganeshan86@gmail.com" href="mailto:manisha.ganeshan86@gmail.com">manisha.ganeshan86@gmail.com</a>&gt; wrote:<br style="" class="">&gt;&gt;<br style="" class="">&gt;&gt;&gt; Hello,<br style="" class="">&gt;&gt;&gt;<br style="" class="">&gt;&gt;&gt; I have a question about the *triple2grid* function. The description<br style="" class="">&gt;&gt;&gt; says that the function does not perform interpolation but instead assigns<br style="" class="">&gt;&gt;&gt; each unstructured (source) data point to the nearest grid point<br style="" class="">&gt;&gt;&gt; (destination). How
 does it treat multiple unstructured data points (source)<br style="" class="">&gt;&gt;&gt; that have a common nearest grid point (destination)? Does it calculate the<br style="" class="">&gt;&gt;&gt; mean value (after ignoring missing values)?<br style="" class="">&gt;&gt;&gt;<br style="" class="">&gt;&gt;&gt; Thanks,<br style="" class="">&gt;&gt;&gt; Nisha<br style="" class="">&gt;&gt;&gt;<br style="" class="">&gt;&gt;&gt; _______________________________________________<br style="" class="">&gt;&gt;&gt; ncl-talk mailing list<br style="" class="">&gt;&gt;&gt; List instructions, subscriber options, unsubscribe:<br style="" class="">&gt;&gt;&gt; <a style="" class="" href="http://mailman.ucar.edu/mailman/listinfo/ncl-talk" target="_blank">http://mailman.ucar.edu/mailman/listinfo/ncl-talk</a><br style="" class="">&gt;&gt;&gt;<br style="" class="">&gt;&gt;&gt;<br style="" class="">&gt;&gt;<br style="" class="">&gt;<br style="" class="">-------------- next
 part --------------<br style="" class="">An HTML attachment was scrubbed...<br style="" class="">URL: <a style="" class="" href="http://mailman.ucar.edu/pipermail/ncl-talk/attachments/20140804/81cbd948/attachment-0001.html" target="_blank">http://mailman.ucar.edu/pipermail/ncl-talk/attachments/20140804/81cbd948/attachment-0001.html </a><br style="" class=""><br style="" class="">------------------------------<br style="" class=""><br style="" class="">Message: 2<br style="" class="">Date: Mon, 4 Aug 2014 08:29:44 -0600<br style="" class="">From: Mary Haley &lt;<a style="" class="" ymailto="mailto:haley@ucar.edu" href="mailto:haley@ucar.edu">haley@ucar.edu</a>&gt;<br style="" class="">Subject: Re: [ncl-talk] How to create two y axis with a common x axis<br style="" class="">&nbsp;&nbsp;&nbsp; in bar&nbsp;&nbsp;&nbsp; plot<br style="" class="">To: Ipshita Majhi &lt;<a style="" class="" ymailto="mailto:ipmajhi@alaska.edu"
 href="mailto:ipmajhi@alaska.edu">ipmajhi@alaska.edu</a>&gt;<br style="" class="">Cc: NCL USERS &lt;<a style="" class="" ymailto="mailto:ncl-talk@ucar.edu" href="mailto:ncl-talk@ucar.edu">ncl-talk@ucar.edu</a>&gt;<br style="" class="">Message-ID:<br style="" class="">&nbsp;&nbsp;&nbsp; &lt;CACNN_CKd2OjK7wbauhLmC01QPRpsCMfMq2aYC1CDzqh=<a style="" class="" ymailto="mailto:UQeVog@mail.gmail.com" href="mailto:UQeVog@mail.gmail.com">UQeVog@mail.gmail.com</a>&gt;<br style="" class="">Content-Type: text/plain; charset="utf-8"<br style="" class=""><br style="" class="">Ipsita,<br style="" class=""><br style="" class="">In order to overlay a bunch of bar charts, it works best if you can shift<br style="" class="">each of the bars by a certain bar width, and then you can draw them<br style="" class="">side-by-side.&nbsp; I think you may have used part of bar_11.ncl on our bar<br style="" class="">examples page, and this is a good one to work with. However, you
 want to<br style="" class="">add some overlay code in there, which will make all the plots part of the<br style="" class="">same plot.<br style="" class=""><br style="" class="">The key is to draw each set of bars with a slightly shifted set of X<br style="" class="">values, so the bars are drawn next to each other.<br style="" class=""><br style="" class="">See the attached example and script.<br style="" class=""><br style="" class="">--Mary<br style="" class=""><br style="" class=""><br style="" class=""><br style="" class="">On Fri, Aug 1, 2014 at 4:27 PM, Ipshita Majhi &lt;<a style="" class="" ymailto="mailto:ipmajhi@alaska.edu" href="mailto:ipmajhi@alaska.edu">ipmajhi@alaska.edu</a>&gt; wrote:<br style="" class=""><br style="" class="">&gt; Hi,<br style="" class="">&gt; I want to plot trend values and monthly means in one plot. Both are an<br style="" class="">&gt; array of size 12 .<br style="" class="">&gt; The program gives no error but the
 plot are overlapping. I am not sure how<br style="" class="">&gt; to fix it. I realized that if I use the below mentioned method they overlap<br style="" class="">&gt; is there a way to have two y axis in bar plots. Since the trends are much<br style="" class="">&gt; smaller then avgs.<br style="" class="">&gt;<br style="" class="">&gt; ;*****************************************************<br style="" class="">&gt; ;Trend and monthly climatology together in one bar plot<br style="" class="">&gt; ;*******************************************************<br style="" class="">&gt;<br style="" class="">&gt;&nbsp; &nbsp; &nbsp; load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/gsn_code.ncl"<br style="" class="">&gt;&nbsp; &nbsp; &nbsp; load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/gsn_csm.ncl"<br style="" class="">&gt;<br style="" class="">&gt;&nbsp; &nbsp; &nbsp; months=(/1,2,3,4,5,6,7,8,9,10,11,12/)<br style="" class="">&gt;<br style="" class="">&gt;<br style=""
 class="">&gt; monthly_avg=asciiread("~/Documents/PhD_June_2015/NCL_Moonsoon/Data_output/Monthly_avg_air.txt",-1,<br style="" class="">&gt; "float")<br style="" class="">&gt;<br style="" class="">&gt; monthly_Trend=asciiread("~/Documents/PhD_June_2015/NCL_Moonsoon/Data_output/trend_air.txt",<br style="" class="">&gt; -1, "float")<br style="" class="">&gt;&nbsp; &nbsp; &nbsp; printVarSummary(monthly_avg)<br style="" class="">&gt;<br style="" class="">&gt;&nbsp; &nbsp; &nbsp; wks = gsn_open_wks("ps","Trend_Avg")<br style="" class="">&gt;<br style="" class="">&gt;<br style="" class="">&gt;&nbsp; &nbsp; &nbsp; sres = True<br style="" class="">&gt;&nbsp; &nbsp; &nbsp; <a style="" class="" ymailto="mailto:sres@vpWidthF" href="mailto:sres@vpWidthF">sres@vpWidthF</a> = 0.7<br style="" class="">&gt;&nbsp; &nbsp; &nbsp; <a style="" class="" ymailto="mailto:sres@vpHeightF" href="mailto:sres@vpHeightF">sres@vpHeightF</a> = 0.5<br style="" class="">&gt;&nbsp; &nbsp;
 &nbsp; <a style="" class="" ymailto="mailto:sres@gsnDraw" href="mailto:sres@gsnDraw">sres@gsnDraw</a> = True<br style="" class="">&gt;&nbsp; &nbsp; &nbsp; <a style="" class="" ymailto="mailto:sres@gsnFrame" href="mailto:sres@gsnFrame">sres@gsnFrame</a> = False<br style="" class="">&gt;&nbsp; &nbsp; &nbsp; <a style="" class="" ymailto="mailto:sres@gsnXYBarChart" href="mailto:sres@gsnXYBarChart">sres@gsnXYBarChart</a> = True<br style="" class="">&gt;&nbsp; &nbsp; &nbsp; <a style="" class="" ymailto="mailto:sres@gsnXYBarChartBarWidth" href="mailto:sres@gsnXYBarChartBarWidth">sres@gsnXYBarChartBarWidth</a> = 0.15&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;  ; change bar widths<br style="" class="">&gt;&nbsp; &nbsp; &nbsp; <a style="" class="" ymailto="mailto:sres@tmXBMode" href="mailto:sres@tmXBMode">sres@tmXBMode</a>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; = "Explicit"&nbsp; &nbsp; &nbsp; &nbsp;  ; explicit labels<br style="" class="">&gt;&nbsp; &nbsp; &nbsp; <a style=""
 class="" ymailto="mailto:sres@tmXBValues" href="mailto:sres@tmXBValues">sres@tmXBValues</a>&nbsp; &nbsp; &nbsp; &nbsp; = (/1,2,3,4,5,6,7,8,9,10,11,12/)<br style="" class="">&gt;&nbsp; &nbsp; &nbsp; <a style="" class="" ymailto="mailto:sres@tmXBLabels" href="mailto:sres@tmXBLabels">sres@tmXBLabels</a> =<br style="" class="">&gt; (/"Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"/)<br style="" class="">&gt;&nbsp; &nbsp; &nbsp; <a style="" class="" ymailto="mailto:sres@tmXBLabelFontHeightF" href="mailto:sres@tmXBLabelFontHeightF">sres@tmXBLabelFontHeightF</a> = 0.0205<br style="" class="">&gt;&nbsp; &nbsp; &nbsp; <a style="" class="" ymailto="mailto:sres@tmXTLabelFontHeightF" href="mailto:sres@tmXTLabelFontHeightF">sres@tmXTLabelFontHeightF</a> = 0.0205<br style="" class="">&gt;&nbsp; &nbsp; &nbsp; <a style="" class="" ymailto="mailto:sres@tmYLLabelFontHeightF" href="mailto:sres@tmYLLabelFontHeightF">sres@tmYLLabelFontHeightF</a> =
 0.0225<br style="" class="">&gt;&nbsp; &nbsp; &nbsp; <a style="" class="" ymailto="mailto:sres@tiMainFontHeightF" href="mailto:sres@tiMainFontHeightF">sres@tiMainFontHeightF</a> = 0.025<br style="" class="">&gt;&nbsp; &nbsp; &nbsp; <a style="" class="" ymailto="mailto:sres@tiMainFont" href="mailto:sres@tiMainFont">sres@tiMainFont</a> = "helvetica"<br style="" class="">&gt;&nbsp; &nbsp; &nbsp; <a style="" class="" ymailto="mailto:sres@tiMainString" href="mailto:sres@tiMainString">sres@tiMainString</a> = "All India Rainfall Climatology and Trend<br style="" class="">&gt; 1880-2012"<br style="" class="">&gt;&nbsp; &nbsp; &nbsp; <a style="" class="" ymailto="mailto:sres@tiYAxisString" href="mailto:sres@tiYAxisString">sres@tiYAxisString</a> = "(mm)"<br style="" class="">&gt;<br style="" class="">&gt;&nbsp; &nbsp; &nbsp; plot1 = gsn_csm_xy (wks,months,monthly_avg,sres)<br style="" class="">&gt;&nbsp; &nbsp; &nbsp; <a style="" class=""
 ymailto="mailto:sres@gsnXYBarChartColors" href="mailto:sres@gsnXYBarChartColors">sres@gsnXYBarChartColors</a> = (/"red"/)&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ;<br style="" class="">&gt; seperately, not<br style="" class="">&gt;&nbsp; &nbsp; &nbsp; plot2 = gsn_csm_xy(wks,months,monthly_Trend,sres)<br style="" class="">&gt;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ; advancing the frame<br style="" class="">&gt;&nbsp; &nbsp; &nbsp; <a style="" class="" ymailto="mailto:sres@gsnXYBarChartColors" href="mailto:sres@gsnXYBarChartColors">sres@gsnXYBarChartColors</a> = (/"blue"/)&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ; but<br style="" class="">&gt; tweaking where<br style="" class="">&gt;<br style="" class="">&gt;<br style="" class="">&gt; _______________________________________________<br style="" class="">&gt; ncl-talk mailing list<br style="" class="">&gt; List instructions,
 subscriber options, unsubscribe:<br style="" class="">&gt; <a style="" class="" href="http://mailman.ucar.edu/mailman/listinfo/ncl-talk" target="_blank">http://mailman.ucar.edu/mailman/listinfo/ncl-talk</a><br style="" class="">&gt;<br style="" class="">&gt;<br style="" class="">-------------- next part --------------<br style="" class="">An HTML attachment was scrubbed...<br style="" class="">URL: <a style="" class="" href="http://mailman.ucar.edu/pipermail/ncl-talk/attachments/20140804/b04f1178/attachment-0001.html" target="_blank">http://mailman.ucar.edu/pipermail/ncl-talk/attachments/20140804/b04f1178/attachment-0001.html </a><br style="" class="">-------------- next part --------------<br style="" class="">A non-text attachment was scrubbed...<br style="" class="">Name: bar.png<br style="" class="">Type: image/png<br style="" class="">Size: 42598 bytes<br style="" class="">Desc: not available<br style="" class="">Url : <a style="" class=""
 href="http://mailman.ucar.edu/pipermail/ncl-talk/attachments/20140804/b04f1178/attachment-0001.png" target="_blank">http://mailman.ucar.edu/pipermail/ncl-talk/attachments/20140804/b04f1178/attachment-0001.png </a><br style="" class="">-------------- next part --------------<br style="" class="">A non-text attachment was scrubbed...<br style="" class="">Name: bar_11.ncl<br style="" class="">Type: application/octet-stream<br style="" class="">Size: 3061 bytes<br style="" class="">Desc: not available<br style="" class="">Url : <a style="" class="" href="http://mailman.ucar.edu/pipermail/ncl-talk/attachments/20140804/b04f1178/attachment-0001.obj" target="_blank">http://mailman.ucar.edu/pipermail/ncl-talk/attachments/20140804/b04f1178/attachment-0001.obj </a><br style="" class=""><br style="" class="">------------------------------<br style="" class=""><br style="" class="">Message: 3<br style="" class="">Date: Mon, 4 Aug 2014 08:44:26 -0600<br style=""
 class="">From: Dennis Shea &lt;<a style="" class="" ymailto="mailto:shea@ucar.edu" href="mailto:shea@ucar.edu">shea@ucar.edu</a>&gt;<br style="" class="">Subject: Re: [ncl-talk] (no subject)<br style="" class="">To: Modise Wiston &lt;<a style="" class="" ymailto="mailto:modise.wiston@postgrad.manchester.ac.uk" href="mailto:modise.wiston@postgrad.manchester.ac.uk">modise.wiston@postgrad.manchester.ac.uk</a>&gt;<br style="" class="">Cc: "<a style="" class="" ymailto="mailto:ncl-talk@ucar.edu" href="mailto:ncl-talk@ucar.edu">ncl-talk@ucar.edu</a>" &lt;<a style="" class="" ymailto="mailto:ncl-talk@ucar.edu" href="mailto:ncl-talk@ucar.edu">ncl-talk@ucar.edu</a>&gt;<br style="" class="">Message-ID:<br style="" class="">&nbsp;&nbsp;&nbsp; &lt;CAOF1d_4GEj90MZ04-u1vemt3UbnH+<a style="" class="" ymailto="mailto:vd--oWt1Ax73BAP2poQag@mail.gmail.com" href="mailto:vd--oWt1Ax73BAP2poQag@mail.gmail.com">vd--oWt1Ax73BAP2poQag@mail.gmail.com</a>&gt;<br style=""
 class="">Content-Type: text/plain; charset="utf-8"<br style="" class=""><br style="" class="">While not WRF, the last example at:<br style="" class=""><a style="" class="" href="http://www.ncl.ucar.edu/Applications/iso.shtml" target="_blank">http://www.ncl.ucar.edu/Applications/iso.shtml</a><br style="" class=""><br style="" class="">may give you an idea of how to approach the issue.<br style="" class=""><br style="" class="">===<br style="" class="">Also, please send *all* WRF questions to <a style="" class="" ymailto="mailto:wrfhelp@ucar.edu" href="mailto:wrfhelp@ucar.edu">wrfhelp@ucar.edu</a><br style="" class="">The know the WRF model best.<br style="" class="">You can cc <a style="" class="" ymailto="mailto:ncl-talk@ucar" href="mailto:ncl-talk@ucar">ncl-talk@ucar</a> but, really, wrfhelp should be your primary<br style="" class="">contact for assorted WRF related issues.<br style="" class=""><br style="" class="">Good luck<br style="" class=""><br
 style="" class=""><br style="" class=""><br style="" class="">On Sat, Aug 2, 2014 at 12:06 PM, Modise Wiston &lt;<br style="" class=""><a style="" class="" ymailto="mailto:modise.wiston@postgrad.manchester.ac.uk" href="mailto:modise.wiston@postgrad.manchester.ac.uk">modise.wiston@postgrad.manchester.ac.uk</a>&gt; wrote:<br style="" class=""><br style="" class="">&gt;&nbsp; *To whom it may concern*<br style="" class="">&gt;<br style="" class="">&gt;&nbsp; *Hi all,*<br style="" class="">&gt;<br style="" class="">&gt;&nbsp; *I am trying to determine the cloud droplet number<br style="" class="">&gt; concentration (QNDROP) from my [WRF-Chem] model simulation. The script [see<br style="" class="">&gt; the code below] is such that the code loops through the x-y-z (i-j-k)<br style="" class="">&gt; planes and finds the max (&amp; min) QNDROP along the vertical (model levels).<br style="" class="">&gt; The code is such that it exits/stops just after the first
 cloud band only<br style="" class="">&gt; -without continuing through all the layers above the first cloud band. This<br style="" class="">&gt; also calculates CCN number concentrations below the cloud base.*<br style="" class="">&gt;<br style="" class="">&gt;&nbsp; *How can I make it (or write a function/code) to calculate the height at<br style="" class="">&gt; which the max QNDROP occurs..? I have been trying to go through several NCL<br style="" class="">&gt; examples (functions) but couldn't figure out out how to do this.. (I would<br style="" class="">&gt; like to plot 'height vs max QNDROP' on the horizontal lat-lon domain) *<br style="" class="">&gt;<br style="" class="">&gt;&nbsp; *Any help is appreciated please..*<br style="" class="">&gt; *Thank you,*<br style="" class="">&gt; *M. Wiston*<br style="" class="">&gt; *The University of Manchester&nbsp; *<br style="" class="">&gt;<br style="" class="">&gt;
 -----------------------------------------------------------------------------------------------------------<br style="" class="">&gt;&nbsp;  dt = 6<br style="" class="">&gt;&nbsp; do ifil = 0, 0; numFILES-48, dt<br style="" class="">&gt;&nbsp; &nbsp; a = addfile(FILES(ifil)+".nc","r")<br style="" class="">&gt;&nbsp; &nbsp;  ;list time step to output data<br style="" class="">&gt;&nbsp; &nbsp; times = wrf_user_list_times(a)<br style="" class="">&gt;&nbsp; &nbsp; ntimes = dimsizes(times)<br style="" class="">&gt;<br style="" class="">&gt;&nbsp; &nbsp; do it = 0,ntimes-1,2<br style="" class="">&gt;&nbsp; do ispec = 0, nspec-1<br style="" class="">&gt;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;  species = speclist(ispec)<br style="" class="">&gt;<br style="" class="">&gt;&nbsp;  ;Obtain the variables from the file<br style="" class="">&gt;&nbsp; &nbsp; if(isfilevar(a,"QNDROP"))<br style="" class="">&gt; N = wrf_user_getvar(a,"QNDROP",it)<br style="" class="">&gt; Nd
 = (N*1.2923)/1e6&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;  ; convert from /kg to /sm^3 then<br style="" class="">&gt; to /scm^3<br style="" class="">&gt; <a style="" class="" ymailto="mailto:Nd@units" href="mailto:Nd@units">Nd@units</a> = "/cm^3"&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;  ; converted units<br style="" class="">&gt;&nbsp; &nbsp; end if<br style="" class="">&gt;<br style="" class="">&gt;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ;define an array to hold data<br style="" class="">&gt;&nbsp; &nbsp; dimsNd = dimsizes(Nd)<br style="" class="">&gt;&nbsp; &nbsp; print(dimsNd)<br style="" class="">&gt;<br style="" class="">&gt;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ;----------------Determine the domain size (grid points and<br style="" class="">&gt; vert. levels)----------------;<br style="" class="">&gt;&nbsp; &nbsp; ;&nbsp; &nbsp; &nbsp; &nbsp; (321 x 251)&nbsp; &nbsp;
 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;  ; grid points along "i"<br style="" class="">&gt; (hor) by "j" (vert) direction&nbsp;  ;<br style="" class="">&gt;&nbsp; &nbsp; ;&nbsp; &nbsp; (e_we:lat, e_sn:lon)<br style="" class="">&gt;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ;<br style="" class="">&gt;&nbsp; &nbsp; ;&nbsp; &nbsp; 40 vert levels:(k)&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;  ; model levels<br style="" class="">&gt;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ;<br style="" class="">&gt;&nbsp; &nbsp; ;&nbsp; &nbsp; Print output gives: k = 40&nbsp; &nbsp; &nbsp; &nbsp;  ;NB: this is read starting from<br style="" class="">&gt; zero (i.e. 0-39)&nbsp; &nbsp; ;<br style="" class="">&gt;&nbsp; &nbsp; ;&nbsp; &nbsp;
 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;  j = 250<br style="" class="">&gt;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ;<br style="" class="">&gt;&nbsp; &nbsp; ;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;  i = 320<br style="" class="">&gt;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ;<br style="" class="">&gt;<br style="" class="">&gt;&nbsp; ;------------------------------------------------------------------------------------------------;<br style="" class="">&gt;&nbsp; &nbsp; min_Nd =&nbsp; new( (/dimsNd(1),dimsNd(2)/),float )<br style="" class="">&gt;&nbsp; &nbsp; max_Nd =&nbsp; new( (/dimsNd(1),dimsNd(2)/),float
 )<br style="" class="">&gt;&nbsp; &nbsp; c_btm = new( (/dimsNd(1),dimsNd(2)/),integer )<br style="" class="">&gt;&nbsp; &nbsp; c_top = new( (/dimsNd(1),dimsNd(2)/),integer )<br style="" class="">&gt;<br style="" class="">&gt;&nbsp; &nbsp; do j = 0, dimsNd(1)-1&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;  ; loop along j<br style="" class="">&gt; do i = 0, dimsNd(2)-1&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ; loop along i<br style="" class="">&gt;&nbsp; &nbsp; &nbsp; ; cldfrc = (i*j)<br style="" class="">&gt;&nbsp; &nbsp; &nbsp; c_btm(j,i) = -1&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;  ;define cloud base and<br style="" class="">&gt; cloud top limits to confine the execution<br style="" class="">&gt;&nbsp; &nbsp; &nbsp; c_top(j,i) = -1<br style="" class="">&gt;&nbsp; &nbsp; &nbsp; do k = 0, dimsNd(0)-2&nbsp; &nbsp; &nbsp;
 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ; loop [vertically] through<br style="" class="">&gt; levels<br style="" class="">&gt;&nbsp;  ; print("k= "+k)<br style="" class="">&gt;&nbsp;  if(Nd(k,j,i) .le. cut_pnt .and. Nd((k+1),j,i) .gt. cut_pnt)<br style="" class="">&gt;&nbsp; &nbsp; &nbsp; &nbsp;  c_btm(j,i) = (k+1)<br style="" class="">&gt; ;[cloud base]<br style="" class="">&gt;&nbsp; &nbsp; &nbsp; &nbsp;  ; print("c_btm = "+c_btm(j,i))<br style="" class="">&gt;<br style="" class="">&gt;&nbsp;  else if (Nd(k,j,i) .gt. cut_pnt .and. Nd((k+1),j,i) .le. cut_pnt) then<br style="" class="">&gt;&nbsp; &nbsp; &nbsp; &nbsp;  c_top(j,i) = k<br style="" class="">&gt;&nbsp; ;[cloud top]<br style="" class="">&gt; break&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;  ; exit the the process after the first<br style="" class="">&gt; cloud band<br style="" class="">&gt;&nbsp;  end if<br style="" class="">&gt;&nbsp; &nbsp;
 &nbsp; &nbsp; &nbsp;  end if<br style="" class="">&gt;&nbsp; &nbsp; &nbsp; end do<br style="" class="">&gt;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ; min_Nd(i) = min(Nd(:,i))<br style="" class="">&gt;&nbsp; &nbsp; &nbsp; ; max_Nd(i) = max(Nd(:,i))<br style="" class="">&gt;&nbsp; &nbsp; &nbsp; ; min_Nd(j) = min(Nd(:,j))<br style="" class="">&gt;&nbsp; &nbsp; &nbsp; ; max_Nd(j) = max(Nd(:,j))<br style="" class="">&gt;&nbsp; &nbsp; &nbsp; ; min_Nd(j,i) = min(Nd(:,j,i))<br style="" class="">&gt;&nbsp; &nbsp; &nbsp; ; max_Nd(j,i) = max(Nd(0:3,j,i))<br style="" class="">&gt;<br style="" class="">&gt;&nbsp; &nbsp; &nbsp; if(c_btm(j,i) .eq. -1 .and. c_top(j,i) .eq. -1)<br style="" class="">&gt;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; max_Nd(j,i) = 0.0<br style="" class="">&gt;<br style="" class="">&gt;&nbsp; &nbsp; &nbsp; else if (c_btm(j,i) .gt. -1 .and. c_top(j,i) .gt. -1) then<br style="" class="">&gt;&nbsp; &nbsp; &nbsp;
 &nbsp; &nbsp; &nbsp; max_Nd(j,i) = max( Nd(c_btm(j,i):c_top(j,i),j,i) )<br style="" class="">&gt;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ;print(min_Nd(j,i))<br style="" class="">&gt;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ;print("max_Nd = " +max_Nd(j,i))<br style="" class="">&gt;&nbsp; print("| "+sprintf("%5.3f",max_Nd(j,i))+ " | "+sprintf("%2.1f",<br style="" class="">&gt; c_btm(j,i))+" | "+sprintf("%2.1f", c_btm(j,i))+" |" )<br style="" class="">&gt;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; end if<br style="" class="">&gt;&nbsp; &nbsp; &nbsp; end if<br style="" class="">&gt;&nbsp; &nbsp; &nbsp; end do<br style="" class="">&gt;&nbsp; &nbsp; &nbsp; &nbsp;  end do<br style="" class="">&gt;<br style="" class="">&gt;&nbsp; ;------------------------------------------------------------------------------------------<br style="" class="">&gt;<br style="" class="">&gt;&nbsp; &nbsp; &nbsp; &nbsp;  ;;get the CCN number concentration from the file<br
 style="" class="">&gt; Cn1 = wrf_user_getvar(a,"CCN1",it)<br style="" class="">&gt; Cn2 = wrf_user_getvar(a,"CCN2",it)<br style="" class="">&gt; Cn3 = wrf_user_getvar(a,"CCN3",it)<br style="" class="">&gt; Cn4 = wrf_user_getvar(a,"CCN4",it)<br style="" class="">&gt; Cn5 = wrf_user_getvar(a,"CCN5",it)<br style="" class="">&gt;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; Cn6 = wrf_user_getvar(a,"CCN6",it)<br style="" class="">&gt;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; z = wrf_user_getvar(a,"z",it)<br style="" class="">&gt;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; w = wrf_user_getvar(a,"wa",it)&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ; vertical<br style="" class="">&gt; [updraft..??] velocity<br style="" class="">&gt;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <a style="" class="" ymailto="mailto:w@units" href="mailto:w@units">w@units</a> = "m/s"<br style="" class="">&gt;<br style="" class="">&gt;&nbsp; p = wrf_user_getvar(a, "p",it)&nbsp; &nbsp; &nbsp; &nbsp;
 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;  ;extract p and tk to<br style="" class="">&gt; convert to STP<br style="" class="">&gt;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; tk = wrf_user_getvar(a,"tk",it)<br style="" class="">&gt; C1 = Cn1*((tk/p)*(P_std/T_std))<br style="" class="">&gt; C2 = Cn2*((tk/p)*(P_std/T_std))<br style="" class="">&gt; C3 = Cn3*((tk/p)*(P_std/T_std))<br style="" class="">&gt; C4 = Cn4*((tk/p)*(P_std/T_std))<br style="" class="">&gt; C5 = Cn5*((tk/p)*(P_std/T_std))<br style="" class="">&gt; C6 = Cn6*((tk/p)*(P_std/T_std))<br style="" class="">&gt; <a style="" class="" ymailto="mailto:C1@units" href="mailto:C1@units">C1@units</a> = "/cm^3"<br style="" class="">&gt;<br style="" class="">&gt; C1_btm = new( (/dimsNd(1),dimsNd(2)/),float )<br style="" class="">&gt; C2_btm = new( (/dimsNd(1),dimsNd(2)/),float )<br style="" class="">&gt; C3_btm = new( (/dimsNd(1),dimsNd(2)/),float )<br style="" class="">&gt; C4_btm = new(
 (/dimsNd(1),dimsNd(2)/),float )<br style="" class="">&gt; C5_btm = new( (/dimsNd(1),dimsNd(2)/),float )<br style="" class="">&gt; C6_btm = new( (/dimsNd(1),dimsNd(2)/),float )<br style="" class="">&gt; SS = new( (/dimsNd(1),dimsNd(2)/),float )<br style="" class="">&gt;<br style="" class="">&gt; do j = 0, dimsNd(1)-1<br style="" class="">&gt;&nbsp; &nbsp; &nbsp; do i = 0, dimsNd(2)-1<br style="" class="">&gt;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;  if(c_btm(j,i) .eq. -1)<br style="" class="">&gt;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; C1_btm(j,i) = 0.0<br style="" class="">&gt;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; C2_btm(j,i) = 0.0<br style="" class="">&gt;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; C3_btm(j,i) = 0.0<br style="" class="">&gt;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; C4_btm(j,i) = 0.0<br style="" class="">&gt;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; C5_btm(j,i) = 0.0<br style="" class="">&gt;&nbsp;
 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; C6_btm(j,i) = 0.0<br style="" class="">&gt;<br style="" class="">&gt;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;  else if(c_btm(j,i) .ne. -1) then<br style="" class="">&gt;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; C1_btm(j,i) = ( C1(c_btm(j,i),j,i) )<br style="" class="">&gt;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; C2_btm(j,i) = ( C2(c_btm(j,i),j,i) )<br style="" class="">&gt;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; C3_btm(j,i) = ( C3(c_btm(j,i),j,i) )<br style="" class="">&gt;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; C4_btm(j,i) = ( C4(c_btm(j,i),j,i) )<br style="" class="">&gt;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; C5_btm(j,i) = ( C5(c_btm(j,i),j,i) )<br style="" class="">&gt;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; C6_btm(j,i) = ( C6(c_btm(j,i),j,i) )<br style="" class="">&gt;<br style="" class="">&gt;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ; print("Cn1 = "
 +C1_btm(j,i))<br style="" class="">&gt;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ; print("Cn2 = " +C2_btm(j,i))<br style="" class="">&gt;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ; print("Cn3 = " +C3_btm(j,i))<br style="" class="">&gt;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ; print("Cn4 = " +C4_btm(j,i))<br style="" class="">&gt;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ; print("Cn5 = " +C5_btm(j,i))<br style="" class="">&gt;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ; print("Cn6 = " +C6_btm(j,i))<br style="" class="">&gt;&nbsp; print("| "+sprintf("%4.3f", C1_btm(j,i))+" | "+sprintf("%4.3f",<br style="" class="">&gt; C2_btm(j,i))+" | "+sprintf("%4.3f", C3_btm(j,i))+" | "+\<br style="" class="">&gt; sprintf("%4.3f", C4_btm(j,i))+" | "+sprintf("%4.3f", C5_btm(j,i))+" |<br style="" class="">&gt; "+sprintf("%4.3f", C6_btm(j,i))+" |" )<br style="" class="">&gt;&nbsp; &nbsp; &nbsp; &nbsp;  end if<br style=""
 class="">&gt;&nbsp; &nbsp; &nbsp; &nbsp;  end if<br style="" class="">&gt;&nbsp; &nbsp; &nbsp; &nbsp;  end do<br style="" class="">&gt;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; end do<br style="" class="">&gt;<br style="" class="">&gt; ;`````````````````````````````````````````````````````````````````````````````````<br style="" class="">&gt;<br style="" class="">&gt;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;  ; if(max_Nd(j,i) .le. C1_btm(j,i))<br style="" class="">&gt;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;  ;&nbsp; SS(j,i) = 0.01<br style="" class="">&gt;<br style="" class="">&gt;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;  ;&nbsp; else if(max_Nd(j,i) .gt. C1_btm(j,i) .and.<br style="" class="">&gt; max_Nd(j,i) .le. C2_btm(j,i))<br style="" class="">&gt;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;  ;&nbsp; SS(j,i) = "0.02%"<br
 style="" class="">&gt;<br style="" class="">&gt;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;  ;&nbsp; else if(max_Nd(j,i) .gt. C2_btm(j,i) .and.<br style="" class="">&gt; max_Nd(j,i) .le. C3_btm(j,i))<br style="" class="">&gt;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;  ;&nbsp;  SS(j,i) = "0.1%"<br style="" class="">&gt;<br style="" class="">&gt;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;  ;&nbsp; else if (max_Nd(j,i) .gt. C3_btm(j,i) .and.<br style="" class="">&gt; max_Nd(j,i) .le. C4_btm(j,i))<br style="" class="">&gt;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;  ;&nbsp; SS(j,i) = "0.2%"<br style="" class="">&gt;<br style="" class="">&gt;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;  ;&nbsp; else if (max_Nd(j,i) .gt. C4_btm(j,i) .and.<br style="" class="">&gt; max_Nd(j,i) .le. C5_btm(j,i))<br style="" class="">&gt;&nbsp;
 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;  ;&nbsp; SS(j,i) = "0.5%"<br style="" class="">&gt;<br style="" class="">&gt;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;  ;&nbsp; else if (max_Nd(j,i) .gt. C5_btm(j,i) .and.<br style="" class="">&gt; max_Nd(j,i) .le. C6_btm(j,i))<br style="" class="">&gt;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;  ;&nbsp; SS(j,i) = "1.0%"<br style="" class="">&gt;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;  ;&nbsp; end if<br style="" class="">&gt;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;  ;&nbsp; end if<br style="" class="">&gt;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;  ;&nbsp; end if<br style="" class="">&gt;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;  ;&nbsp; end if<br style="" class="">&gt;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; 
 ;&nbsp; end if<br style="" class="">&gt;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;  ;&nbsp; end if<br style="" class="">&gt;<br style="" class="">&gt; ;-------------------------------------------------------------------------------------------<br style="" class="">&gt;&nbsp; &nbsp; &nbsp; ;Set some Basic Plot options<br style="" class="">&gt;&nbsp; &nbsp; &nbsp;  res&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; = True<br style="" class="">&gt;&nbsp; &nbsp; &nbsp;  <a style="" class="" ymailto="mailto:res@tiMainString" href="mailto:res@tiMainString">res@tiMainString</a>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; = "CCN nmbr @: " +times(it)&nbsp; ; main<br style="" class="">&gt; field title<br style="" class="">&gt;&nbsp; &nbsp; &nbsp;  mpres&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;  = True<br style="" class="">&gt;&nbsp;
 &nbsp; &nbsp;  pltres&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;  = True<br style="" class="">&gt;<br style="" class="">&gt;&nbsp; &nbsp; &nbsp;  <a style="" class="" ymailto="mailto:res@gsnMaximize" href="mailto:res@gsnMaximize">res@gsnMaximize</a>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;  = False<br style="" class="">&gt;&nbsp; &nbsp; &nbsp;  <a style="" class="" ymailto="mailto:res@gsnFrame" href="mailto:res@gsnFrame">res@gsnFrame</a>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; = False<br style="" class="">&gt;&nbsp; &nbsp; &nbsp;  <a style="" class="" ymailto="mailto:res@gsnDraw" href="mailto:res@gsnDraw">res@gsnDraw</a>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;  = False<br style="" class="">&gt;&nbsp; &nbsp; &nbsp;  <a style="" class="" ymailto="mailto:res@cnFillOn"
 href="mailto:res@cnFillOn">res@cnFillOn</a>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;  = True<br style="" class="">&gt;&nbsp; &nbsp; &nbsp;  <a style="" class="" ymailto="mailto:res@cnLinesOn" href="mailto:res@cnLinesOn">res@cnLinesOn</a>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;  = False&nbsp; &nbsp; &nbsp; ; turn off contour<br style="" class="">&gt; lines<br style="" class="">&gt;&nbsp; &nbsp; &nbsp;  <a style="" class="" ymailto="mailto:res@cnLineLabelsOn" href="mailto:res@cnLineLabelsOn">res@cnLineLabelsOn</a>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; = False&nbsp; &nbsp; &nbsp;  ; lables the data<br style="" class="">&gt; on contours/map grids<br style="" class="">&gt;&nbsp; &nbsp; &nbsp;  <a style="" class="" ymailto="mailto:res@gsnSpreadColors" href="mailto:res@gsnSpreadColors">res@gsnSpreadColors</a>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;  = True<br
 style="" class="">&gt;&nbsp; &nbsp; &nbsp;  <a style="" class="" ymailto="mailto:res@lbOrientation" href="mailto:res@lbOrientation">res@lbOrientation</a>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;  = "Horizontal"&nbsp; &nbsp; &nbsp; &nbsp; ;<br style="" class="">&gt; orientates the linear scale<br style="" class="">&gt;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;  <a style="" class="" ymailto="mailto:res@cnLevelSelectionMode" href="mailto:res@cnLevelSelectionMode">res@cnLevelSelectionMode</a>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; = "ExplicitLevels"<br style="" class="">&gt;<br style="" class="">&gt; ;-------------------------------------------------------------------------------------------<br style="" class="">&gt;&nbsp; &nbsp; &nbsp;  <a style="" class="" ymailto="mailto:res@tiYAxisString" href="mailto:res@tiYAxisString">res@tiYAxisString</a>&nbsp; &nbsp; &nbsp;  = ""<br style="" class="">&gt;&nbsp; &nbsp; &nbsp;  <a style="" class=""
 ymailto="mailto:res@tiXAxisString" href="mailto:res@tiXAxisString">res@tiXAxisString</a>&nbsp; &nbsp; &nbsp;  = "Nmbr cont'n (/cm^3)"<br style="" class="">&gt;&nbsp; &nbsp; &nbsp;  <a style="" class="" ymailto="mailto:res@tiXAxisSide" href="mailto:res@tiXAxisSide">res@tiXAxisSide</a>&nbsp; &nbsp; &nbsp; &nbsp;  = "Bottom"<br style="" class="">&gt;<br style="" class="">&gt;&nbsp; &nbsp; &nbsp;  ;<a style="" class="" ymailto="mailto:res@tiMainString" href="mailto:res@tiMainString">res@tiMainString</a>&nbsp;  = "Droplet nmbr at: " +times(it)<br style="" class="">&gt;&nbsp; &nbsp; &nbsp;  contour_Nd = wrf_contour(a,wks,max_Nd,res)<br style="" class="">&gt;<br style="" class="">&gt;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;  plot_Nd = wrf_map_overlays(a,wks,(/contour_Nd/),pltres,res)<br style="" class="">&gt;&nbsp; &nbsp;  ; plots data on a map backgrnd<br style="" class="">&gt;&nbsp; &nbsp; &nbsp;  ; contour_Cn1 = wrf_contour(a,wks,C1_btm,res)<br
 style="" class="">&gt;&nbsp; &nbsp; &nbsp;  ; plot_Cn1 = wrf_map_overlays(a,wks,(/contour_Cn1/),pltres,res)<br style="" class="">&gt;&nbsp; &nbsp; &nbsp; &nbsp; ;&nbsp; contour_Cn2 = wrf_contour(a,wks,C2_btm,res)<br style="" class="">&gt;&nbsp; &nbsp; &nbsp;  ;&nbsp; plot_Cn2 = wrf_map_overlays(a,wks,(/contour_Cn2/),pltres,res)<br style="" class="">&gt;&nbsp; &nbsp; &nbsp;  ;&nbsp; contour_Cn3 = wrf_contour(a,wks,C3_btm,res)<br style="" class="">&gt;&nbsp; &nbsp; &nbsp;  ;&nbsp; plot_Cn3 = wrf_map_overlays(a,wks,(/contour_Cn3/),pltres,res)<br style="" class="">&gt;&nbsp; &nbsp; &nbsp;  ;&nbsp; contour_Cn4 = wrf_contour(a,wks,C4_btm,res)<br style="" class="">&gt;&nbsp; &nbsp; &nbsp;  ;&nbsp; plot_Cn4 = wrf_map_overlays(a,wks,(/contour_Cn4/),pltres,res)<br style="" class="">&gt;&nbsp; &nbsp; &nbsp;  ;&nbsp; contour_Cn5 = wrf_contour(a,wks,C5_btm,res)<br style="" class="">&gt;&nbsp; &nbsp; &nbsp;  ;&nbsp; plot_Cn5 =
 wrf_map_overlays(a,wks,(/contour_Cn5/),pltres,res)<br style="" class="">&gt;&nbsp; &nbsp; &nbsp; &nbsp;  ;&nbsp; contour_Cn6 = wrf_contour(a,wks,C6_btm,res)<br style="" class="">&gt;&nbsp; &nbsp; &nbsp;  ;&nbsp; plot_Cn6 = wrf_map_overlays(a,wks,(/contour_Cn6/),pltres,res)<br style="" class="">&gt;<br style="" class="">&gt;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;  ; delete(contour_Nd)<br style="" class="">&gt;&nbsp; &nbsp; &nbsp;  ; delete(contour_Cn1)<br style="" class="">&gt;<br style="" class="">&gt;&nbsp; &nbsp; &nbsp;  ; map = wrf_map(wks,a,res)<br style="" class="">&gt;&nbsp; &nbsp; &nbsp;  ; overlay(map,contour_Nd)<br style="" class="">&gt;&nbsp; &nbsp; &nbsp;  ; overlay(map,contour_Cn1)<br style="" class="">&gt;&nbsp; &nbsp; &nbsp;  ; overlay(plot0,plot3)<br style="" class="">&gt;&nbsp; &nbsp; &nbsp;  ; gsn_panel(wks,plots,(/3,2/),True)<br style="" class="">&gt;&nbsp; &nbsp; &nbsp; &nbsp; ; draw(plot)<br style="" class="">&gt;&nbsp;
 &nbsp; &nbsp;  ; frame(wks)<br style="" class="">&gt;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; end do<br style="" class="">&gt;&nbsp; &nbsp;  end do<br style="" class="">&gt;<br style="" class="">&gt;&nbsp; end<br style="" class="">&gt;<br style="" class="">&gt; ---------------------------------------------------------------------------------------------------------------<br style="" class="">&gt;<br style="" class="">&gt; _______________________________________________<br style="" class="">&gt; ncl-talk mailing list<br style="" class="">&gt; List instructions, subscriber options, unsubscribe:<br style="" class="">&gt; <a style="" class="" href="http://mailman.ucar.edu/mailman/listinfo/ncl-talk" target="_blank">http://mailman.ucar.edu/mailman/listinfo/ncl-talk</a><br style="" class="">&gt;<br style="" class="">&gt;<br style="" class="">-------------- next part --------------<br style="" class="">An HTML attachment was scrubbed...<br style="" class="">URL: <a
 style="" class="" href="http://mailman.ucar.edu/pipermail/ncl-talk/attachments/20140804/be554295/attachment-0001.html" target="_blank">http://mailman.ucar.edu/pipermail/ncl-talk/attachments/20140804/be554295/attachment-0001.html </a><br style="" class=""><br style="" class="">------------------------------<br style="" class=""><br style="" class="">Message: 4<br style="" class="">Date: Mon, 4 Aug 2014 08:52:43 -0600<br style="" class="">From: Mary Haley &lt;<a style="" class="" ymailto="mailto:haley@ucar.edu" href="mailto:haley@ucar.edu">haley@ucar.edu</a>&gt;<br style="" class="">Subject: Re: [ncl-talk] Running example scripts for beginners<br style="" class="">To: zilore mumba &lt;<a style="" class="" ymailto="mailto:zmumba@yahoo.com" href="mailto:zmumba@yahoo.com">zmumba@yahoo.com</a>&gt;<br style="" class="">Cc: "<a style="" class="" ymailto="mailto:ncl-talk@ucar.edu" href="mailto:ncl-talk@ucar.edu">ncl-talk@ucar.edu</a>" &lt;<a style="" class=""
 ymailto="mailto:ncl-talk@ucar.edu" href="mailto:ncl-talk@ucar.edu">ncl-talk@ucar.edu</a>&gt;<br style="" class="">Message-ID:<br style="" class="">&nbsp;&nbsp;&nbsp; &lt;CACNN_CJySFTTZvaJQbpnCE+<a style="" class="" ymailto="mailto:N3mBi3BncJCF7RxZHxgMmDd41nQ@mail.gmail.com" href="mailto:N3mBi3BncJCF7RxZHxgMmDd41nQ@mail.gmail.com">N3mBi3BncJCF7RxZHxgMmDd41nQ@mail.gmail.com</a>&gt;<br style="" class="">Content-Type: text/plain; charset="utf-8"<br style="" class=""><br style="" class="">?Zilore,<br style="" class=""><br style="" class="">WRF data is on a curvilinear grid, which means each data point is<br style="" class="">represented by a unique lat/lon value. You said that "wrf_map_overlays"<br style="" class="">didn't work for you, but it would help if you explain how it didn't work.<br style="" class=""> Did you get an error message? If so, include the error message. Did you<br style="" class="">get the wrong plot? If so, indicate this. The wrf_xxxx
 scripts are tailored<br style="" class="">for WRF ARW data, so they should work pretty well.<br style="" class=""><br style="" class="">If you want to use the gsn_csm_xxxx scripts, you have to provide lat/lon<br style="" class="">information, because the gsn_csm_xxxx scripts are *not* tailored for WRF<br style="" class="">data. Otherwise NCL will have no way of knowing what map projection or<br style="" class="">where your data is supposed to be overlaid on the map.<br style="" class=""><br style="" class="">If you are trying to use gsn_csm_contour_map and gsn_csm_contour to contour<br style="" class="">WRF data, then I suggest visiting this page:<br style="" class=""><br style="" class="">?<a style="" class="" href="http://www.ncl.ucar.edu/Applications/wrfgsn.shtml" target="_blank">http://www.ncl.ucar.edu/Applications/wrfgsn.shtml</a><br style="" class=""><br style="" class="">The first example, wrf_gsn_1.ncl, is the simplest one, but it only draws<br
 style="" class="">one field on a map.<br style="" class=""><br style="" class="">The last example, wrf_gsn_5.ncl, shows how to overlay multiple fields on<br style="" class="">one plot.&nbsp; It shows how to use both gsn_csm_xxx scripts, or wrf_xxxx<br style="" class="">scripts.&nbsp; It's up to you which one you want.<br style="" class=""><br style="" class="">Please look at these examples and try one of them.&nbsp; If you continue to have<br style="" class="">problems, include your script again, but this time include more information<br style="" class="">about what is wrong.<br style="" class=""><br style="" class="">Thanks,<br style="" class=""><br style="" class="">--Mary<br style="" class=""><br style="" class=""><br style="" class=""><br style="" class="">On Fri, Aug 1, 2014 at 4:05 PM, zilore mumba &lt;<a style="" class="" ymailto="mailto:zmumba@yahoo.com" href="mailto:zmumba@yahoo.com">zmumba@yahoo.com</a>&gt; wrote:<br style="" class=""><br
 style="" class="">&gt; My sincere apologies for posting very basic issues. I have been trying to<br style="" class="">&gt; make headway in learning ncl with very little progress. All the examples I<br style="" class="">&gt; try do not seem to work. Examples,<br style="" class="">&gt;<br style="" class="">&gt;<br style="" class="">&gt;<br style="" class="">&gt;<br style="" class="">&gt;<br style="" class="">&gt;<br style="" class="">&gt; wrfout_d01_2014-07-29_00^%00^%00.nc<br style="" class="">&gt; &lt;<a style="" class="" href="https://www.dropbox.com/s/aeoqmfgrk6pbd99/wrfout_d01_2014-07-29_00%5E%2500%5E%2500.nc" target="_blank">https://www.dropbox.com/s/aeoqmfgrk6pbd99/wrfout_d01_2014-07-29_00%5E%2500%5E%2500.nc</a>&gt;<br style="" class="">&gt; zilore mumba shared from Dropbox<br style="" class="">&gt; View on www.dropbox.com<br style="" class="">&gt; &lt;<a style="" class=""
 href="https://www.dropbox.com/s/aeoqmfgrk6pbd99/wrfout_d01_2014-07-29_00%5E%2500%5E%2500.nc" target="_blank">https://www.dropbox.com/s/aeoqmfgrk6pbd99/wrfout_d01_2014-07-29_00%5E%2500%5E%2500.nc</a>&gt;<br style="" class="">&gt; Preview by Yahoo<br style="" class="">&gt;<br style="" class="">&gt;<br style="" class="">&gt; 1. I have tried the two examples on "wrf_map_overlay" examples found at<br style="" class="">&gt; wrf_map_overlays<br style="" class="">&gt; &lt;<a style="" class="" href="https://www.ncl.ucar.edu/Document/Functions/WRF_arw/wrf_map_overlays.shtml" target="_blank">https://www.ncl.ucar.edu/Document/Functions/WRF_arw/wrf_map_overlays.shtml</a>&gt; both<br style="" class="">&gt; don't work for me, only modification being the filename (which works in<br style="" class="">&gt; grads)<br style="" class="">&gt; 2.&nbsp; I have tried the "Getting_started example 5"found at Getting started<br style="" class="">&gt; using NCL - example 5 -
 contour plots over maps<br style="" class="">&gt; &lt;<a style="" class="" href="https://www.ncl.ucar.edu/Document/Manuals/Getting_Started/Examples/gsun05n.shtml" target="_blank">https://www.ncl.ucar.edu/Document/Manuals/Getting_Started/Examples/gsun05n.shtml</a>&gt;,<br style="" class="">&gt; it does not work for me.<br style="" class="">&gt; 3. I have tried *overlay_*" examples found at<br style="" class="">&gt; <a style="" class="" href="https://www.ncl.ucar.edu/Applications/Scripts/overlay_1.ncl," target="_blank">https://www.ncl.ucar.edu/Applications/Scripts/overlay_1.ncl, </a>they do not<br style="" class="">&gt; work for me.<br style="" class="">&gt; I would appreciate if someone can make overlay_1.ncl (below) work for me.<br style="" class="">&gt; Modifications are a) my filename and longitude and latitude of my domain.<br style="" class="">&gt; The wrf output file is attached if allowed since it is too large (through<br style="" class="">&gt;
 dropbox). I moved to Windows which does not allow : in file names.<br style="" class="">&gt; The error I get is:<br style="" class="">&gt; fatal:Dimension (bottom_top) of file (wrfout_d01_2014-07-29_00:00:00) does<br style="" class="">&gt; not have an associated coordinate variable<br style="" class="">&gt; fatal:["Execute.c":8128]:Execute: Error occurred at or near line 16 in<br style="" class="">&gt; file overlay_1.ncl<br style="" class="">&gt;<br style="" class="">&gt; ;*************************************************<br style="" class="">&gt; ; overlay_1.ncl<br style="" class="">&gt; ;<br style="" class="">&gt; ; Concepts illustrated:<br style="" class="">&gt; ;&nbsp;  - Overlaying line contours on filled contours<br style="" class="">&gt; ;&nbsp;  - Explicitly setting contour levels<br style="" class="">&gt; ;&nbsp;  - Selecting a different color map<br style="" class="">&gt; ;<br style="" class="">&gt;
 ;*************************************************<br style="" class="">&gt;<br style="" class="">&gt; load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/gsn_code.ncl"<br style="" class="">&gt; load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/gsn_csm.ncl"<br style="" class="">&gt;<br style="" class="">&gt; begin<br style="" class="">&gt;&nbsp;  a = addfile("wrfout_d01_2014-07-29_00:00:00.nc","r")<br style="" class="">&gt;&nbsp;  temp = a-&gt;T(0,{500},:,:)<br style="" class="">&gt;&nbsp;  uwnd = a-&gt;U(0,{500},:,:)<br style="" class="">&gt;<br style="" class="">&gt;&nbsp;  wks = gsn_open_wks("ps","overlay")<br style="" class="">&gt;&nbsp;  gsn_define_colormap(wks,"BlueDarkRed18")&nbsp; &nbsp; ; use the BlueDarkRed18<br style="" class="">&gt; colormap<br style="" class="">&gt;<br style="" class="">&gt;&nbsp;  res = True<br style="" class="">&gt;&nbsp;  <a style="" class="" ymailto="mailto:res@mpFillOn" href="mailto:res@mpFillOn">res@mpFillOn</a> = False<br style=""
 class="">&gt;&nbsp;  <a style="" class="" ymailto="mailto:res@mpMaxLatF" href="mailto:res@mpMaxLatF">res@mpMaxLatF</a> =&nbsp; -4.07&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ; specify the plot domain<br style="" class="">&gt;&nbsp;  <a style="" class="" ymailto="mailto:res@mpMinLatF" href="mailto:res@mpMinLatF">res@mpMinLatF</a> = -21.9&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;  ;<br style="" class="">&gt;&nbsp;  <a style="" class="" ymailto="mailto:res@mpMinLonF" href="mailto:res@mpMinLonF">res@mpMinLonF</a> =&nbsp; 17.25&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ;<br style="" class="">&gt;&nbsp;  <a style="" class="" ymailto="mailto:res@mpMaxLonF" href="mailto:res@mpMaxLonF">res@mpMaxLonF</a> =&nbsp; 38.44&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ;<br style="" class="">&gt;&nbsp;  <a style="" class=""
 ymailto="mailto:sres@gsnFrame" href="mailto:sres@gsnFrame">sres@gsnFrame</a> = False&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;  ; do not advance the frame<br style="" class="">&gt;&nbsp;  <a style="" class="" ymailto="mailto:sres@cnLevelSelectionMode" href="mailto:sres@cnLevelSelectionMode">sres@cnLevelSelectionMode</a> = "ExplicitLevels" ; use explicit levels<br style="" class="">&gt;&nbsp;  <a style="" class="" ymailto="mailto:sres@cnLevels" href="mailto:sres@cnLevels">sres@cnLevels</a> = ispan(-5,35,5)&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ; set the contour levels<br style="" class="">&gt;<br style="" class="">&gt;&nbsp;  plot = gsn_csm_contour_map(wks,temp,res)&nbsp; &nbsp; ; create the temperature plot<br style="" class="">&gt;&nbsp;  plot_ov = gsn_csm_contour(wks,uwnd,sres)&nbsp; &nbsp; ; create the U-wind plot<br style="" class="">&gt;&nbsp;  overlay(plot,plot_ov)&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;  ; overlay the U-wind plot on<br style="" class="">&gt; the temperature plot<br style="" class="">&gt;&nbsp;  draw(plot)&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ; draw the temperature plot<br style="" class="">&gt; (with the U-wind plot overlaid)<br style="" class="">&gt;&nbsp;  frame(wks)&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ; advance the frame<br style="" class="">&gt; end<br style="" class="">&gt;<br style="" class="">&gt;&nbsp;  <a style="" class="" ymailto="mailto:res@mpOutlineOn" href="mailto:res@mpOutlineOn">res@mpOutlineOn</a> = True&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ; turn the map<br style="" class="">&gt; outline on<br style="" class="">&gt;&nbsp;  <a style="" class=""
 ymailto="mailto:res@gsnDraw" href="mailto:res@gsnDraw">res@gsnDraw</a>&nbsp; &nbsp; &nbsp; =&nbsp; False&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;  ; do not draw the plot<br style="" class="">&gt;<br style="" class="">&gt;<br style="" class="">&gt;<br style="" class="">&gt;<br style="" class="">&gt; [image: image]<br style="" class="">&gt; &lt;<a style="" class="" href="https://www.ncl.ucar.edu/Document/Manuals/Getting_Started/Examples/gsun05n.shtml" target="_blank">https://www.ncl.ucar.edu/Document/Manuals/Getting_Started/Examples/gsun05n.shtml</a>&gt;<br style="" class="">&gt;<br style="" class="">&gt;<br style="" class="">&gt;<br style="" class="">&gt;<br style="" class="">&gt;<br style="" class="">&gt; Getting started using NCL - example 5 - contour plots ov...<br style="" class="">&gt; &lt;<a style="" class="" href="https://www.ncl.ucar.edu/Document/Manuals/Getting_Started/Examples/gsun05n.shtml"
 target="_blank">https://www.ncl.ucar.edu/Document/Manuals/Getting_Started/Examples/gsun05n.shtml</a>&gt;<br style="" class="">&gt; NCL Home &gt; Documentation &gt; Manuals &gt; Getting Started GSUN &gt; Examples &gt; 1 |<br style="" class="">&gt; 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11<br style="" class="">&gt; View on www.ncl.ucar.edu<br style="" class="">&gt; &lt;<a style="" class="" href="https://www.ncl.ucar.edu/Document/Manuals/Getting_Started/Examples/gsun05n.shtml" target="_blank">https://www.ncl.ucar.edu/Document/Manuals/Getting_Started/Examples/gsun05n.shtml</a>&gt;<br style="" class="">&gt; Preview by Yahoo<br style="" class="">&gt;<br style="" class="">&gt;<br style="" class="">&gt;<br style="" class="">&gt;<br style="" class="">&gt;<br style="" class="">&gt;<br style="" class="">&gt;<br style="" class="">&gt;<br style="" class="">&gt; wrf_map_overlays<br style="" class="">&gt; &lt;<a style="" class=""
 href="https://www.ncl.ucar.edu/Document/Functions/WRF_arw/wrf_map_overlays.shtml" target="_blank">https://www.ncl.ucar.edu/Document/Functions/WRF_arw/wrf_map_overlays.shtml</a>&gt;<br style="" class="">&gt; NCL WRFUserARW.ncl functions (graphics routines)<br style="" class="">&gt; View on www.ncl.ucar.edu<br style="" class="">&gt; &lt;<a style="" class="" href="https://www.ncl.ucar.edu/Document/Functions/WRF_arw/wrf_map_overlays.shtml" target="_blank">https://www.ncl.ucar.edu/Document/Functions/WRF_arw/wrf_map_overlays.shtml</a>&gt;<br style="" class="">&gt; Preview by Yahoo<br style="" class="">&gt;<br style="" class="">&gt;<br style="" class="">&gt;<br style="" class="">&gt; _______________________________________________<br style="" class="">&gt; ncl-talk mailing list<br style="" class="">&gt; List instructions, subscriber options, unsubscribe:<br style="" class="">&gt; <a style="" class="" href="http://mailman.ucar.edu/mailman/listinfo/ncl-talk"
 target="_blank">http://mailman.ucar.edu/mailman/listinfo/ncl-talk</a><br style="" class="">&gt;<br style="" class="">&gt;<br style="" class="">-------------- next part --------------<br style="" class="">An HTML attachment was scrubbed...<br style="" class="">URL: <a style="" class="" href="http://mailman.ucar.edu/pipermail/ncl-talk/attachments/20140804/2718eee8/attachment-0001.html" target="_blank">http://mailman.ucar.edu/pipermail/ncl-talk/attachments/20140804/2718eee8/attachment-0001.html </a><br style="" class=""><br style="" class="">------------------------------<br style="" class=""><br style="" class="">Message: 5<br style="" class="">Date: Mon, 4 Aug 2014 08:55:42 -0600<br style="" class="">From: Dennis Shea &lt;<a style="" class="" ymailto="mailto:shea@ucar.edu" href="mailto:shea@ucar.edu">shea@ucar.edu</a>&gt;<br style="" class="">Subject: Re: [ncl-talk] read separated files<br style="" class="">To: Yuqiang Zhang &lt;<a style="" class=""
 ymailto="mailto:yuqiangzhang.thu@gmail.com" href="mailto:yuqiangzhang.thu@gmail.com">yuqiangzhang.thu@gmail.com</a>&gt;<br style="" class="">Cc: NCL &lt;<a style="" class="" ymailto="mailto:ncl-talk@ucar.edu" href="mailto:ncl-talk@ucar.edu">ncl-talk@ucar.edu</a>&gt;<br style="" class="">Message-ID:<br style="" class="">&nbsp;&nbsp;&nbsp; &lt;CAOF1d_4_aU1aywjH6CZvfAskDg276GTDvL+<a style="" class="" ymailto="mailto:3c6hhZeDPHYM2RQ@mail.gmail.com" href="mailto:3c6hhZeDPHYM2RQ@mail.gmail.com">3c6hhZeDPHYM2RQ@mail.gmail.com</a>&gt;<br style="" class="">Content-Type: text/plain; charset="utf-8"<br style="" class=""><br style="" class="">"ListSet Type" could be used&nbsp; but the following may be easier.<br style="" class=""><a style="" class="" href="https://www.ncl.ucar.edu/Document/Functions/Built-in/ListSetType.shtml" target="_blank">https://www.ncl.ucar.edu/Document/Functions/Built-in/ListSetType.shtml</a><br style="" class=""><br style="" class="">Also,
 your dats is type "short"<br style="" class=""><a style="" class="" href="https://www.ncl.ucar.edu/Document/Functions/Contributed/short2flt.shtml" target="_blank">https://www.ncl.ucar.edu/Document/Functions/Contributed/short2flt.shtml</a><br style="" class=""><br style="" class="">========<br style="" class="">Please see 'addfiles'<br style="" class=""><br style="" class=""><a style="" class="" href="https://www.ncl.ucar.edu/Document/Functions/Built-in/addfiles.shtml" target="_blank">https://www.ncl.ucar.edu/Document/Functions/Built-in/addfiles.shtml</a><br style="" class=""><br style="" class="">===<br style="" class="">&nbsp;  scrDir0 = "/d1/zhangg/prec/"<br style="" class="">&nbsp;  scrFile0= systemfunc("cd "+ scrDir0 +" ; ls<br style="" class="">TPCAS-CMFD_V0105_B-01_"+year+".nc"<br style="" class="">&nbsp;  print(srcFile0)<br style="" class=""><br style="" class="">&nbsp;  na = addfiles(srcDir0+srcFile0, "r")<br style="" class=""><br style=""
 class="">*&nbsp;  pp = short2flt( na[:}-&gt;prec(:,107,302))*<br style="" class=""><br style="" class="">*&nbsp;  printVarSummary(pp)*<br style="" class=""><br style="" class=""><br style="" class=""><br style="" class=""><br style="" class=""><br style="" class="">On Sat, Aug 2, 2014 at 10:35 AM, Yuqiang Zhang &lt;<a style="" class="" ymailto="mailto:yuqiangzhang.thu@gmail.com" href="mailto:yuqiangzhang.thu@gmail.com">yuqiangzhang.thu@gmail.com</a>&gt;<br style="" class="">wrote:<br style="" class=""><br style="" class="">&gt; Hi,<br style="" class="">&gt;<br style="" class="">&gt;<br style="" class="">&gt;<br style="" class="">&gt; You can use this function ?ListSetType? to read different dimensions data<br style="" class="">&gt; from multi files.<br style="" class="">&gt;<br style="" class="">&gt;<br style="" class="">&gt;<br style="" class="">&gt; Regards,<br style="" class="">&gt;<br style="" class="">&gt; Yuqiang<br style="" class="">&gt;<br
 style="" class="">&gt;<br style="" class="">&gt;<br style="" class="">&gt; *From:* <a style="" class="" ymailto="mailto:ncl-talk-bounces@ucar.edu" href="mailto:ncl-talk-bounces@ucar.edu">ncl-talk-bounces@ucar.edu</a> [mailto:<a style="" class="" ymailto="mailto:ncl-talk-bounces@ucar.edu" href="mailto:ncl-talk-bounces@ucar.edu">ncl-talk-bounces@ucar.edu</a>] *On<br style="" class="">&gt; Behalf Of *guozfruit<br style="" class="">&gt; *Sent:* Saturday, August 02, 2014 11:38 AM<br style="" class="">&gt; *To:* NCL<br style="" class="">&gt; *Subject:* [ncl-talk] read separated files<br style="" class="">&gt;<br style="" class="">&gt;<br style="" class="">&gt;<br style="" class="">&gt; Hi all,<br style="" class="">&gt;<br style="" class="">&gt;<br style="" class="">&gt;<br style="" class="">&gt; I have 3-hr netcdf data in 12 separated files (ie for 12 months). I'm<br style="" class="">&gt; trying to extract one grid preciptation for the whole year. I have
 the<br style="" class="">&gt; problem about how to define one variable with different dimensions when I<br style="" class="">&gt; read data from different files. Could you please help me with it? Thanks.<br style="" class="">&gt;<br style="" class="">&gt;<br style="" class="">&gt;<br style="" class="">&gt; As below are the data info, and my script:<br style="" class="">&gt;<br style="" class="">&gt; dimensions:<br style="" class="">&gt;<br style="" class="">&gt; lon = 700 ;<br style="" class="">&gt;<br style="" class="">&gt; lat = 400 ;<br style="" class="">&gt;<br style="" class="">&gt; time = UNLIMITED ;<br style="" class="">&gt;<br style="" class="">&gt; short prec(time, lat, lon) ;<br style="" class="">&gt;<br style="" class="">&gt;&nbsp; &nbsp;  prec:scale_factor = 0.002f ;<br style="" class="">&gt;<br style="" class="">&gt;&nbsp; &nbsp;  prec:add_offset = 50.f ;<br style="" class="">&gt;<br style="" class="">&gt;&nbsp; &nbsp;  prec:_Fill_Value =
 -32767s ;<br style="" class="">&gt;<br style="" class="">&gt;&nbsp; &nbsp;  prec:missing_value = -32767s ;<br style="" class="">&gt;<br style="" class="">&gt;&nbsp; &nbsp;  prec:units = "mm hr-1" ;<br style="" class="">&gt;<br style="" class="">&gt;&nbsp; &nbsp;  prec:long_name = "Precipitation rate" ;<br style="" class="">&gt;<br style="" class="">&gt;<br style="" class="">&gt;<br style="" class="">&gt;<br style="" class="">&gt;<br style="" class="">&gt;&nbsp; year = 2008<br style="" class="">&gt;<br style="" class="">&gt;&nbsp; mon = 12<br style="" class="">&gt;<br style="" class="">&gt;&nbsp; nhour = new(mon,integer)<br style="" class="">&gt;<br style="" class="">&gt;<br style="" class="">&gt;<br style="" class="">&gt;&nbsp;  if(year .eq. 2008) then<br style="" class="">&gt;<br style="" class="">&gt;&nbsp; &nbsp; day_leap&nbsp; &nbsp; = (/31,29,31,30,31,30,31,31,30,31,30,31/)<br style="" class="">&gt;<br style="" class="">&gt;&nbsp; &nbsp; do i =
 0,mon-1<br style="" class="">&gt;<br style="" class="">&gt;&nbsp; &nbsp; &nbsp;  nhour(i) = day_leap(i)*8<br style="" class="">&gt;<br style="" class="">&gt;&nbsp; &nbsp; end do<br style="" class="">&gt;<br style="" class="">&gt;&nbsp;  else<br style="" class="">&gt;<br style="" class="">&gt;&nbsp; &nbsp; day_nonleap = (/31,28,31,30,31,30,31,31,30,31,30,31/)<br style="" class="">&gt;<br style="" class="">&gt;&nbsp; &nbsp; do i = 0,mon-1<br style="" class="">&gt;<br style="" class="">&gt;&nbsp; &nbsp; &nbsp; nhour(i) = day_nonleap(i)*8<br style="" class="">&gt;<br style="" class="">&gt;&nbsp; &nbsp; end do<br style="" class="">&gt;<br style="" class="">&gt;&nbsp;  end if<br style="" class="">&gt;<br style="" class="">&gt;<br style="" class="">&gt;<br style="" class="">&gt; *pp =&nbsp; new((/12,nhour/),float)*<br style="" class="">&gt;<br style="" class="">&gt; do imon = 1,12<br style="" class="">&gt;<br style="" class="">&gt;&nbsp; &nbsp; &nbsp;
 if(imon.lt.10) then<br style="" class="">&gt;<br style="" class="">&gt;&nbsp; &nbsp; &nbsp; &nbsp; mon3 = "0"+imon<br style="" class="">&gt;<br style="" class="">&gt;&nbsp; &nbsp; &nbsp; else<br style="" class="">&gt;<br style="" class="">&gt;&nbsp; &nbsp; &nbsp; &nbsp; mon3 = ""+imon<br style="" class="">&gt;<br style="" class="">&gt;&nbsp; &nbsp; &nbsp; end if<br style="" class="">&gt;<br style="" class="">&gt;&nbsp; &nbsp; &nbsp; scrDir0 = "/d1/zhangg/prec/"<br style="" class="">&gt;<br style="" class="">&gt;&nbsp; &nbsp; do ifl = 0,nhour(imon-1)-1<br style="" class="">&gt;<br style="" class="">&gt;&nbsp; &nbsp; &nbsp; na&nbsp; =<br style="" class="">&gt; addfile(scrDir0+"prec_ITPCAS-CMFD_V0105_B-01_"+year+mon3+".nc","r")<br style="" class="">&gt;<br style="" class="">&gt;&nbsp; &nbsp; * pp(imon-1,ifl)&nbsp; = na-&gt;prec(:,107,302)*<br style="" class="">&gt;<br style="" class="">&gt;&nbsp; &nbsp; end do<br style="" class="">&gt;<br style=""
 class="">&gt;&nbsp;  end do<br style="" class="">&gt;<br style="" class="">&gt;<br style="" class="">&gt;<br style="" class="">&gt;<br style="" class="">&gt;<br style="" class="">&gt;<br style="" class="">&gt;<br style="" class="">&gt; X<br style="" class="">&gt;<br style="" class="">&gt; _______________________________________________<br style="" class="">&gt; ncl-talk mailing list<br style="" class="">&gt; List instructions, subscriber options, unsubscribe:<br style="" class="">&gt; <a style="" class="" href="http://mailman.ucar.edu/mailman/listinfo/ncl-talk" target="_blank">http://mailman.ucar.edu/mailman/listinfo/ncl-talk</a><br style="" class="">&gt;<br style="" class="">&gt;<br style="" class="">-------------- next part --------------<br style="" class="">An HTML attachment was scrubbed...<br style="" class="">URL: <a style="" class="" href="http://mailman.ucar.edu/pipermail/ncl-talk/attachments/20140804/5bf2441c/attachment-0001.html"
 target="_blank">http://mailman.ucar.edu/pipermail/ncl-talk/attachments/20140804/5bf2441c/attachment-0001.html </a><br style="" class=""><br style="" class="">------------------------------<br style="" class=""><br style="" class="">Message: 6<br style="" class="">Date: Mon, 4 Aug 2014 15:16:12 +0000<br style="" class="">From: Lauren Jean Vargo &lt;<a style="" class="" ymailto="mailto:lvargo@unm.edu" href="mailto:lvargo@unm.edu">lvargo@unm.edu</a>&gt;<br style="" class="">Subject: [ncl-talk] Using a loop to find values greater than 0<br style="" class="">&nbsp;&nbsp;&nbsp; (calculate&nbsp;&nbsp;&nbsp; PDD)<br style="" class="">To: "<a style="" class="" ymailto="mailto:ncl-talk@ucar.edu" href="mailto:ncl-talk@ucar.edu">ncl-talk@ucar.edu</a>" &lt;<a style="" class="" ymailto="mailto:ncl-talk@ucar.edu" href="mailto:ncl-talk@ucar.edu">ncl-talk@ucar.edu</a>&gt;<br style="" class="">Message-ID: &lt;<a style="" class=""
 ymailto="mailto:70D79029-3BC6-4860-8081-E5C280D91F93@unm.edu" href="mailto:70D79029-3BC6-4860-8081-E5C280D91F93@unm.edu">70D79029-3BC6-4860-8081-E5C280D91F93@unm.edu</a>&gt;<br style="" class="">Content-Type: text/plain; charset="Windows-1252"<br style="" class=""><br style="" class="">Hello, <br style="" class=""><br style="" class="">I?m having trouble doing a calculation with NCL, ultimately I am trying to calculate the Positive degree-day (PDD) sum. I?ve read in daily temperature data (which is 3D [time,lat,lon]). What I am trying to do is calculate the sum of the temperatures that are greater than 0C for 1 year. <br style="" class=""><br style="" class="">The way I was trying to do this was with a loop, and to first set any temperature less than or equal to zero, just to zero. Next I want to sum all the temperatures over 365 days at each lat &amp; lon point. If there is an easier way to do this using NCL functions, that would be great. <br style=""
 class=""><br style="" class="">The error message that I am getting is that the ?loop must be scalar". However, I?m not sure how to specify that I want the temperature value to be analyzed when tasC is (time,lat,lon).<br style="" class=""><br style="" class="">I?ve uploaded the file "tas_day_CCSM4_lgm_r2i1p1_18700101-19001231.nc? to the ftp account. <br style="" class=""><br style="" class="">I?m running ncl version 6.1.2, and the system is Darwin Kernel Version 13.3.0<br style="" class=""><br style="" class=""><br style="" class="">Here is the script: <br style="" class=""><br style="" class="">load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/gsn_code.ncl"<br style="" class="">load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/gsn_csm.ncl"&nbsp; <br style="" class="">load ?$NCARG_ROOT/lib/ncarg/nclscripts/csm/contributed.ncl"<br style="" class="">load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/shea_util.ncl"&nbsp; <br style="" class=""><br style="" class="">begin<br
 style="" class=""><br style="" class="">; Read in near surface air temperature (Ta) &nbsp;&nbsp;&nbsp; <br style="" class=""><br style="" class="">&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; a = addfile("tas_day_CCSM4_lgm_r2i1p1_18700101-19001231.nc","r") <br style="" class="">&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; tasL = a-&gt;tas(0:364,:,:) <br style="" class="">&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; tasC = tasL - 273.15 ; Convert K to C<br style="" class="">&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; print (tasC)&nbsp;&nbsp;&nbsp; <br style="" class="">&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; printVarSummary (tasC)<br style="" class=""><br style="" class="">&nbsp;&nbsp;&nbsp; &nbsp; &nbsp;&nbsp;&nbsp; do tasC = 0,364<br style="" class="">&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; if (tasC .le. 0)<br style="" class="">&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; H = 0<br style="" class="">&nbsp;&nbsp;&nbsp;
 &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; end if<br style="" class="">&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; end do<br style="" class=""><br style="" class="">&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; PDD_sum = dim_cumsum_n_Wrap(tasC)<br style="" class=""><br style="" class="">end <br style="" class=""><br style="" class=""><br style="" class="">Any help would be greatly appreciated. <br style="" class=""><br style="" class="">Thanks, <br style="" class=""><br style="" class="">Lauren Vargo<br style="" class="">M.S. Candidate<br style="" class="">The University of New Mexico<br style="" class=""><br style="" class="">------------------------------<br style="" class=""><br style="" class="">Message: 7<br style="" class="">Date: Mon, 4 Aug 2014 10:11:24 -0600<br style="" class="">From: Dennis Shea &lt;<a style="" class="" ymailto="mailto:shea@ucar.edu" href="mailto:shea@ucar.edu">shea@ucar.edu</a>&gt;<br style="" class="">Subject: Re: [ncl-talk] Using a loop to
 find values greater than 0<br style="" class="">&nbsp;&nbsp;&nbsp; (calculate PDD)<br style="" class="">To: Lauren Jean Vargo &lt;<a style="" class="" ymailto="mailto:lvargo@unm.edu" href="mailto:lvargo@unm.edu">lvargo@unm.edu</a>&gt;<br style="" class="">Cc: "<a style="" class="" ymailto="mailto:ncl-talk@ucar.edu" href="mailto:ncl-talk@ucar.edu">ncl-talk@ucar.edu</a>" &lt;<a style="" class="" ymailto="mailto:ncl-talk@ucar.edu" href="mailto:ncl-talk@ucar.edu">ncl-talk@ucar.edu</a>&gt;<br style="" class="">Message-ID:<br style="" class="">&nbsp;&nbsp;&nbsp; &lt;CAOF1d_5=0d_Fd0HP_1aOnzafkOmiScwouqZhZbD=<a style="" class="" ymailto="mailto:dSzzozwDbw@mail.gmail.com" href="mailto:dSzzozwDbw@mail.gmail.com">dSzzozwDbw@mail.gmail.com</a>&gt;<br style="" class="">Content-Type: text/plain; charset="utf-8"<br style="" class=""><br style="" class="">The variable, tasC, is an *array *<br style="" class=""><br style="" class="">&nbsp;  tasC = tasL - 273.15 ;
 Convert K to C<br style="" class="">&nbsp;  printVarSummary(tasC)<br style="" class=""><br style="" class="">You can not use an array as a loop variable ... in any language.<br style="" class=""><br style="" class="">&nbsp; do tasC = 0,364<br style="" class=""><br style="" class="">could be, say,<br style="" class=""><br style="" class="">&nbsp; do day = 0,364<br style="" class=""><br style="" class="">See:<br style="" class=""><a style="" class="" href="https://www.ncl.ucar.edu/Document/Manuals/Ref_Manual/NclStatements.shtml#Loops" target="_blank">https://www.ncl.ucar.edu/Document/Manuals/Ref_Manual/NclStatements.shtml#Loops</a><br style="" class=""><br style="" class="">Specifically:<br style="" class=""><br style="" class="">&nbsp; do *loop_identifier* = *scalar_start_expr* ,<br style="" class=""><br style="" class="">*end_expr*<br style="" class=""><br style="" class="">*T*he "scalar_start_expr , end_expr" are scalar.<br style="" class=""><br
 style="" class=""><br style="" class=""><br style="" class="">===<br style="" class=""><br style="" class="">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;  a = addfile("tas_day_CCSM4_lgm_<br style="" class="">r2i1p1_18700101-19001231.nc","r")<br style="" class="">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; tasL&nbsp; = a-&gt;tas(0:364,:,:)<br style="" class=""><br style="" class="">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; TIME = cd_calendar(tasL&amp;time,0)&nbsp;  ; TIME(ntim,6)<br style="" class="">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; print(TIME)<br style="" class=""><br style="" class="">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; tasC = tasL - 273.15 ; Convert K to C<br style="" class="">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; tasC = where(tasC.gt.0.0, tasc, 0.0)<br style="" class="">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; pdd&nbsp; =
 dim_sum_n_Wrap(tasC, 0)&nbsp; &nbsp; &nbsp;  ; (lat,lon)<br style="" class="">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <a style="" class="" ymailto="mailto:pdd@long_name" href="mailto:pdd@long_name">pdd@long_name</a> = "degree days for year="+toint(TIME(0,0))<br style="" class="">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <a style="" class="" ymailto="mailto:pdd@units" href="mailto:pdd@units">pdd@units</a> = "degC"<br style="" class=""><br style="" class=""><br style="" class=""><br style="" class=""><br style="" class="">On Mon, Aug 4, 2014 at 9:16 AM, Lauren Jean Vargo &lt;<a style="" class="" ymailto="mailto:lvargo@unm.edu" href="mailto:lvargo@unm.edu">lvargo@unm.edu</a>&gt; wrote:<br style="" class=""><br style="" class="">&gt; Hello,<br style="" class="">&gt;<br style="" class="">&gt; I?m having trouble doing a calculation with NCL, ultimately I am trying to<br style="" class="">&gt; calculate the Positive degree-day
 (PDD) sum. I?ve read in daily temperature<br style="" class="">&gt; data (which is 3D [time,lat,lon]). What I am trying to do is calculate the<br style="" class="">&gt; sum of the temperatures that are greater than 0C for 1 year.<br style="" class="">&gt;<br style="" class="">&gt; The way I was trying to do this was with a loop, and to first set any<br style="" class="">&gt; temperature less than or equal to zero, just to zero. Next I want to sum<br style="" class="">&gt; all the temperatures over 365 days at each lat &amp; lon point. If there is an<br style="" class="">&gt; easier way to do this using NCL functions, that would be great.<br style="" class="">&gt;<br style="" class="">&gt; The error message that I am getting is that the ?loop must be scalar".<br style="" class="">&gt; However, I?m not sure how to specify that I want the temperature value to<br style="" class="">&gt; be analyzed when tasC is (time,lat,lon).<br style="" class="">&gt;<br
 style="" class="">&gt; I?ve uploaded the file "tas_day_CCSM4_lgm_r2i1p1_18700101-19001231.nc? to<br style="" class="">&gt; the ftp account.<br style="" class="">&gt;<br style="" class="">&gt; I?m running ncl version 6.1.2, and the system is Darwin Kernel Version<br style="" class="">&gt; 13.3.0<br style="" class="">&gt;<br style="" class="">&gt;<br style="" class="">&gt; Here is the script:<br style="" class="">&gt;<br style="" class="">&gt; load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/gsn_code.ncl"<br style="" class="">&gt; load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/gsn_csm.ncl"<br style="" class="">&gt; load ?$NCARG_ROOT/lib/ncarg/nclscripts/csm/contributed.ncl"<br style="" class="">&gt; load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/shea_util.ncl"<br style="" class="">&gt;<br style="" class="">&gt; begin<br style="" class="">&gt;<br style="" class="">&gt; ; Read in near surface air temperature (Ta)<br style="" class="">&gt;<br style="" class="">&gt;&nbsp;
 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;  a =<br style="" class="">&gt; addfile("tas_day_CCSM4_lgm_r2i1p1_18700101-19001231.nc","r")<br style="" class="">&gt;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;  tasL = a-&gt;tas(0:364,:,:)<br style="" class="">&gt;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;  tasC = tasL - 273.15 ; Convert K to C<br style="" class="">&gt;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;  print (tasC)<br style="" class="">&gt;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;  printVarSummary (tasC)<br style="" class="">&gt;<br style="" class="">&gt;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;  do tasC = 0,364<br style="" class="">&gt;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;  if (tasC .le. 0)<br style="" class="">&gt;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;  H =
 0<br style="" class="">&gt;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;  end if<br style="" class="">&gt;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;  end do<br style="" class="">&gt;<br style="" class="">&gt;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;  PDD_sum = dim_cumsum_n_Wrap(tasC)<br style="" class="">&gt;<br style="" class="">&gt; end<br style="" class="">&gt;<br style="" class="">&gt;<br style="" class="">&gt; Any help would be greatly appreciated.<br style="" class="">&gt;<br style="" class="">&gt; Thanks,<br style="" class="">&gt;<br style="" class="">&gt; Lauren Vargo<br style="" class="">&gt; M.S. Candidate<br style="" class="">&gt; The University of New Mexico<br style="" class="">&gt; _______________________________________________<br style="" class="">&gt; ncl-talk mailing list<br style="" class="">&gt; List instructions, subscriber options, unsubscribe:<br style=""
 class="">&gt; <a style="" class="" href="http://mailman.ucar.edu/mailman/listinfo/ncl-talk" target="_blank">http://mailman.ucar.edu/mailman/listinfo/ncl-talk</a><br style="" class="">&gt;<br style="" class="">-------------- next part --------------<br style="" class="">An HTML attachment was scrubbed...<br style="" class="">URL: <a style="" class="" href="http://mailman.ucar.edu/pipermail/ncl-talk/attachments/20140804/571eb834/attachment-0001.html" target="_blank">http://mailman.ucar.edu/pipermail/ncl-talk/attachments/20140804/571eb834/attachment-0001.html </a><br style="" class=""><br style="" class="">------------------------------<br style="" class=""><br style="" class="">Message: 8<br style="" class="">Date: Mon, 4 Aug 2014 11:36:03 -0500<br style="" class="">From: Kyle Griffin &lt;<a style="" class="" ymailto="mailto:ksgriffin2@wisc.edu" href="mailto:ksgriffin2@wisc.edu">ksgriffin2@wisc.edu</a>&gt;<br style="" class="">Subject: Re: [ncl-talk]
 Using a loop to find values greater than 0<br style="" class="">&nbsp;&nbsp;&nbsp; (calculate PDD)<br style="" class="">To: Lauren Jean Vargo &lt;<a style="" class="" ymailto="mailto:lvargo@unm.edu" href="mailto:lvargo@unm.edu">lvargo@unm.edu</a>&gt;<br style="" class="">Cc: "<a style="" class="" ymailto="mailto:ncl-talk@ucar.edu" href="mailto:ncl-talk@ucar.edu">ncl-talk@ucar.edu</a>" &lt;<a style="" class="" ymailto="mailto:ncl-talk@ucar.edu" href="mailto:ncl-talk@ucar.edu">ncl-talk@ucar.edu</a>&gt;<br style="" class="">Message-ID:<br style="" class="">&nbsp;&nbsp;&nbsp; &lt;CAKt9o=gyy9Wtwyuv3J32VTubo9zrZVmFFh5LAuN5oju5F6=<a style="" class="" ymailto="mailto:8bg@mail.gmail.com" href="mailto:8bg@mail.gmail.com">8bg@mail.gmail.com</a>&gt;<br style="" class="">Content-Type: text/plain; charset="utf-8"<br style="" class=""><br style="" class="">This also sounds like an ideal spot for implementing the 'where' function.<br style="" class=""><br style=""
 class=""><a style="" class="" href="https://www.ncl.ucar.edu/Document/Functions/Built-in/where.shtml" target="_blank">https://www.ncl.ucar.edu/Document/Functions/Built-in/where.shtml</a><br style="" class=""><br style="" class="">pos_dd = where(tasC.ge.0,tasC,<a style="" class="" ymailto="mailto:tasC@_FillValue" href="mailto:tasC@_FillValue">tasC@_FillValue</a>)<br style="" class="">total_pos_dd = dim_sum_n_Wrap(pos_dd,0)<br style="" class=""><br style="" class="">This will assign the missing value of tasC to any location in the array<br style="" class="">that is greater than or equal to zero and have each point less than zero<br style="" class="">assigned to the missing value (usually in the _FillValue attribute. If<br style="" class=""><a style="" class="" ymailto="mailto:tasC@_FillValue" href="mailto:tasC@_FillValue">tasC@_FillValue</a><br style="" class="">is not set, you can set it to anything). You can then add up the values<br style=""
 class="">over the 0th dimension (time) to get a total at each lat/lon point.<br style="" class=""><br style="" class="">Hope that helps,<br style="" class=""><br style="" class=""><br style="" class="">Kyle<br style="" class=""><br style="" class="">----------------------------------------<br style="" class="">Kyle S. Griffin<br style="" class="">Department of Atmospheric and Oceanic Sciences<br style="" class="">University of Wisconsin - Madison<br style="" class="">Room 1421<br style="" class="">1225 W Dayton St, Madison, WI 53706<br style="" class="">Email: <a style="" class="" ymailto="mailto:ksgriffin2@wisc.edu" href="mailto:ksgriffin2@wisc.edu">ksgriffin2@wisc.edu</a><br style="" class=""><br style="" class=""><br style="" class="">On Mon, Aug 4, 2014 at 11:11 AM, Dennis Shea &lt;<a style="" class="" ymailto="mailto:shea@ucar.edu" href="mailto:shea@ucar.edu">shea@ucar.edu</a>&gt; wrote:<br style="" class=""><br style="" class="">&gt; The variable,
 tasC, is an *array *<br style="" class="">&gt;<br style="" class="">&gt;&nbsp; &nbsp; tasC = tasL - 273.15 ; Convert K to C<br style="" class="">&gt;&nbsp; &nbsp; printVarSummary(tasC)<br style="" class="">&gt;<br style="" class="">&gt; You can not use an array as a loop variable ... in any language.<br style="" class="">&gt;<br style="" class="">&gt;&nbsp;  do tasC = 0,364<br style="" class="">&gt;<br style="" class="">&gt; could be, say,<br style="" class="">&gt;<br style="" class="">&gt;&nbsp;  do day = 0,364<br style="" class="">&gt;<br style="" class="">&gt; See:<br style="" class="">&gt;<br style="" class="">&gt; <a style="" class="" href="https://www.ncl.ucar.edu/Document/Manuals/Ref_Manual/NclStatements.shtml#Loops" target="_blank">https://www.ncl.ucar.edu/Document/Manuals/Ref_Manual/NclStatements.shtml#Loops</a><br style="" class="">&gt;<br style="" class="">&gt; Specifically:<br style="" class="">&gt;<br style="" class="">&gt;&nbsp;  do
 *loop_identifier* = *scalar_start_expr* ,<br style="" class="">&gt;<br style="" class="">&gt; *end_expr*<br style="" class="">&gt;<br style="" class="">&gt; *T*he "scalar_start_expr , end_expr" are scalar.<br style="" class="">&gt;<br style="" class="">&gt;<br style="" class="">&gt;<br style="" class="">&gt; ===<br style="" class="">&gt;<br style="" class="">&gt;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; a = addfile("tas_day_CCSM4_lgm_<br style="" class="">&gt; r2i1p1_18700101-19001231.nc","r")<br style="" class="">&gt;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;  tasL&nbsp; = a-&gt;tas(0:364,:,:)<br style="" class="">&gt;<br style="" class="">&gt;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;  TIME = cd_calendar(tasL&amp;time,0)&nbsp;  ; TIME(ntim,6)<br style="" class="">&gt;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;  print(TIME)<br style="" class="">&gt;<br style="" class="">&gt;&nbsp; &nbsp; &nbsp;
 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;  tasC = tasL - 273.15 ; Convert K to C<br style="" class="">&gt;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;  tasC = where(tasC.gt.0.0, tasc, 0.0)<br style="" class="">&gt;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;  pdd&nbsp; = dim_sum_n_Wrap(tasC, 0)&nbsp; &nbsp; &nbsp;  ; (lat,lon)<br style="" class="">&gt;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;  <a style="" class="" ymailto="mailto:pdd@long_name" href="mailto:pdd@long_name">pdd@long_name</a> = "degree days for year="+toint(TIME(0,0))<br style="" class="">&gt;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;  <a style="" class="" ymailto="mailto:pdd@units" href="mailto:pdd@units">pdd@units</a> = "degC"<br style="" class="">&gt;<br style="" class="">&gt;<br style="" class="">&gt;<br style="" class="">&gt;<br style="" class="">&gt; On Mon, Aug 4, 2014 at 9:16 AM, Lauren Jean Vargo &lt;<a style="" class=""
 ymailto="mailto:lvargo@unm.edu" href="mailto:lvargo@unm.edu">lvargo@unm.edu</a>&gt; wrote:<br style="" class="">&gt;<br style="" class="">&gt;&gt; Hello,<br style="" class="">&gt;&gt;<br style="" class="">&gt;&gt; I?m having trouble doing a calculation with NCL, ultimately I am trying<br style="" class="">&gt;&gt; to calculate the Positive degree-day (PDD) sum. I?ve read in daily<br style="" class="">&gt;&gt; temperature data (which is 3D [time,lat,lon]). What I am trying to do is<br style="" class="">&gt;&gt; calculate the sum of the temperatures that are greater than 0C for 1 year.<br style="" class="">&gt;&gt;<br style="" class="">&gt;&gt; The way I was trying to do this was with a loop, and to first set any<br style="" class="">&gt;&gt; temperature less than or equal to zero, just to zero. Next I want to sum<br style="" class="">&gt;&gt; all the temperatures over 365 days at each lat &amp; lon point. If there is an<br style="" class="">&gt;&gt;
 easier way to do this using NCL functions, that would be great.<br style="" class="">&gt;&gt;<br style="" class="">&gt;&gt; The error message that I am getting is that the ?loop must be scalar".<br style="" class="">&gt;&gt; However, I?m not sure how to specify that I want the temperature value to<br style="" class="">&gt;&gt; be analyzed when tasC is (time,lat,lon).<br style="" class="">&gt;&gt;<br style="" class="">&gt;&gt; I?ve uploaded the file "tas_day_CCSM4_lgm_r2i1p1_18700101-19001231.nc? to<br style="" class="">&gt;&gt; the ftp account.<br style="" class="">&gt;&gt;<br style="" class="">&gt;&gt; I?m running ncl version 6.1.2, and the system is Darwin Kernel Version<br style="" class="">&gt;&gt; 13.3.0<br style="" class="">&gt;&gt;<br style="" class="">&gt;&gt;<br style="" class="">&gt;&gt; Here is the script:<br style="" class="">&gt;&gt;<br style="" class="">&gt;&gt; load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/gsn_code.ncl"<br style=""
 class="">&gt;&gt; load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/gsn_csm.ncl"<br style="" class="">&gt;&gt; load ?$NCARG_ROOT/lib/ncarg/nclscripts/csm/contributed.ncl"<br style="" class="">&gt;&gt; load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/shea_util.ncl"<br style="" class="">&gt;&gt;<br style="" class="">&gt;&gt; begin<br style="" class="">&gt;&gt;<br style="" class="">&gt;&gt; ; Read in near surface air temperature (Ta)<br style="" class="">&gt;&gt;<br style="" class="">&gt;&gt;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;  a =<br style="" class="">&gt;&gt; addfile("tas_day_CCSM4_lgm_r2i1p1_18700101-19001231.nc","r")<br style="" class="">&gt;&gt;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;  tasL = a-&gt;tas(0:364,:,:)<br style="" class="">&gt;&gt;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;  tasC = tasL - 273.15 ; Convert K to C<br style="" class="">&gt;&gt;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;  print
 (tasC)<br style="" class="">&gt;&gt;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;  printVarSummary (tasC)<br style="" class="">&gt;&gt;<br style="" class="">&gt;&gt;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;  do tasC = 0,364<br style="" class="">&gt;&gt;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;  if (tasC .le. 0)<br style="" class="">&gt;&gt;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;  H = 0<br style="" class="">&gt;&gt;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;  end if<br style="" class="">&gt;&gt;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;  end do<br style="" class="">&gt;&gt;<br style="" class="">&gt;&gt;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;  PDD_sum = dim_cumsum_n_Wrap(tasC)<br style="" class="">&gt;&gt;<br style="" class="">&gt;&gt; end<br style=""
 class="">&gt;&gt;<br style="" class="">&gt;&gt;<br style="" class="">&gt;&gt; Any help would be greatly appreciated.<br style="" class="">&gt;&gt;<br style="" class="">&gt;&gt; Thanks,<br style="" class="">&gt;&gt;<br style="" class="">&gt;&gt; Lauren Vargo<br style="" class="">&gt;&gt; M.S. Candidate<br style="" class="">&gt;&gt; The University of New Mexico<br style="" class="">&gt;&gt; _______________________________________________<br style="" class="">&gt;&gt; ncl-talk mailing list<br style="" class="">&gt;&gt; List instructions, subscriber options, unsubscribe:<br style="" class="">&gt;&gt; <a style="" class="" href="http://mailman.ucar.edu/mailman/listinfo/ncl-talk" target="_blank">http://mailman.ucar.edu/mailman/listinfo/ncl-talk</a><br style="" class="">&gt;&gt;<br style="" class="">&gt;<br style="" class="">&gt;<br style="" class="">&gt; _______________________________________________<br style="" class="">&gt; ncl-talk mailing list<br style=""
 class="">&gt; List instructions, subscriber options, unsubscribe:<br style="" class="">&gt; <a style="" class="" href="http://mailman.ucar.edu/mailman/listinfo/ncl-talk" target="_blank">http://mailman.ucar.edu/mailman/listinfo/ncl-talk</a><br style="" class="">&gt;<br style="" class="">&gt;<br style="" class="">-------------- next part --------------<br style="" class="">An HTML attachment was scrubbed...<br style="" class="">URL: <a style="" class="" href="http://mailman.ucar.edu/pipermail/ncl-talk/attachments/20140804/17872935/attachment-0001.html" target="_blank">http://mailman.ucar.edu/pipermail/ncl-talk/attachments/20140804/17872935/attachment-0001.html </a><br style="" class=""><br style="" class="">------------------------------<br style="" class=""><br style="" class="">Message: 9<br style="" class="">Date: Mon, 4 Aug 2014 10:52:57 -0600<br style="" class="">From: Mary Haley &lt;<a style="" class="" ymailto="mailto:haley@ucar.edu"
 href="mailto:haley@ucar.edu">haley@ucar.edu</a>&gt;<br style="" class="">Subject: Re: [ncl-talk] Strange white lines across plot<br style="" class="">To: Michael Notaro &lt;<a style="" class="" ymailto="mailto:mnotaro@wisc.edu" href="mailto:mnotaro@wisc.edu">mnotaro@wisc.edu</a>&gt;<br style="" class="">Cc: "<a style="" class="" ymailto="mailto:ncl-talk@ucar.edu" href="mailto:ncl-talk@ucar.edu">ncl-talk@ucar.edu</a>" &lt;<a style="" class="" ymailto="mailto:ncl-talk@ucar.edu" href="mailto:ncl-talk@ucar.edu">ncl-talk@ucar.edu</a>&gt;<br style="" class="">Message-ID:<br style="" class="">&nbsp;&nbsp;&nbsp; &lt;<a style="" class="" ymailto="mailto:CACNN_CJk8ojmqz8L3oqZiTw2ERjJF6S3xmwprTO--fT7jtnTSQ@mail.gmail.com" href="mailto:CACNN_CJk8ojmqz8L3oqZiTw2ERjJF6S3xmwprTO--fT7jtnTSQ@mail.gmail.com">CACNN_CJk8ojmqz8L3oqZiTw2ERjJF6S3xmwprTO--fT7jtnTSQ@mail.gmail.com</a>&gt;<br style="" class="">Content-Type: text/plain; charset="utf-8"<br style="" class=""><br
 style="" class="">Hi Michael,<br style="" class=""><br style="" class="">I really don't have any idea about this one.&nbsp; We did fix a bug in V6.1.2<br style="" class="">that caused thin white lines to show up, but this doesn't look like a case<br style="" class="">of that.<br style="" class=""><br style="" class="">Can you provide your VAR3 variable, say in a NetCDF file, so we can try<br style="" class="">running your script here?<br style="" class=""><br style="" class="">--Mary<br style="" class=""><br style="" class=""><br style="" class="">On Fri, Aug 1, 2014 at 4:10 PM, Michael Notaro &lt;<a style="" class="" ymailto="mailto:mnotaro@wisc.edu" href="mailto:mnotaro@wisc.edu">mnotaro@wisc.edu</a>&gt; wrote:<br style="" class=""><br style="" class="">&gt;<br style="" class="">&gt; I am using NCL 6.1.2. Please see the attached plot<br style="" class="">&gt;<br style="" class="">&gt; and note the odd white lines across the figure. Any<br style=""
 class="">&gt;<br style="" class="">&gt; idea what caused it and how to remove it?<br style="" class="">&gt;<br style="" class="">&gt;<br style="" class="">&gt;<br style="" class="">&gt;<br style="" class="">&gt; The plotting lines are listed below.<br style="" class="">&gt;<br style="" class="">&gt;<br style="" class="">&gt;<br style="" class="">&gt;<br style="" class="">&gt; If I change the data values in the plot to some<br style="" class="">&gt;<br style="" class="">&gt; arbitrary value, sometimes the lines go away.<br style="" class="">&gt;<br style="" class="">&gt;<br style="" class="">&gt;<br style="" class="">&gt;<br style="" class="">&gt; Michael<br style="" class="">&gt;<br style="" class="">&gt;<br style="" class="">&gt;<br style="" class="">&gt;<br style="" class="">&gt;<br style="" class="">&gt;<br style="" class="">&gt;<br style="" class="">&gt; wks=gsn_open_wks("ps","bar_revised2")<br style="" class="">&gt;<br style="" class="">&gt;
 gsn_define_colormap(wks, "NCV_blue_red")<br style="" class="">&gt;<br style="" class="">&gt;<br style="" class="">&gt;<br style="" class="">&gt;<br style="" class="">&gt; res = True<br style="" class="">&gt;<br style="" class="">&gt; <a style="" class="" ymailto="mailto:res@gsnDraw" href="mailto:res@gsnDraw">res@gsnDraw</a> = False<br style="" class="">&gt;<br style="" class="">&gt; <a style="" class="" ymailto="mailto:res@gsnFrame" href="mailto:res@gsnFrame">res@gsnFrame</a> = False<br style="" class="">&gt;<br style="" class="">&gt; <a style="" class="" ymailto="mailto:res@cnRasterModeOn" href="mailto:res@cnRasterModeOn">res@cnRasterModeOn</a>=True<br style="" class="">&gt;<br style="" class="">&gt; <a style="" class="" ymailto="mailto:res@cnFillDrawOrder" href="mailto:res@cnFillDrawOrder">res@cnFillDrawOrder</a> = "PreDraw"<br style="" class="">&gt;<br style="" class="">&gt; <a style="" class="" ymailto="mailto:res@tmXTOn"
 href="mailto:res@tmXTOn">res@tmXTOn</a> = False<br style="" class="">&gt;<br style="" class="">&gt; <a style="" class="" ymailto="mailto:res@tmXTBorderOn" href="mailto:res@tmXTBorderOn">res@tmXTBorderOn</a> = False<br style="" class="">&gt;<br style="" class="">&gt; <a style="" class="" ymailto="mailto:res@tmYROn" href="mailto:res@tmYROn">res@tmYROn</a> = False<br style="" class="">&gt;<br style="" class="">&gt; <a style="" class="" ymailto="mailto:res@tmYRBorderOn" href="mailto:res@tmYRBorderOn">res@tmYRBorderOn</a> = False<br style="" class="">&gt;<br style="" class="">&gt; <a style="" class="" ymailto="mailto:res@tmXBOn" href="mailto:res@tmXBOn">res@tmXBOn</a> = False<br style="" class="">&gt;<br style="" class="">&gt; <a style="" class="" ymailto="mailto:res@tmXBBorderOn" href="mailto:res@tmXBBorderOn">res@tmXBBorderOn</a> = False<br style="" class="">&gt;<br style="" class="">&gt; <a style="" class="" ymailto="mailto:res@tmYLOn"
 href="mailto:res@tmYLOn">res@tmYLOn</a> = False<br style="" class="">&gt;<br style="" class="">&gt; <a style="" class="" ymailto="mailto:res@tmYLBorderOn" href="mailto:res@tmYLBorderOn">res@tmYLBorderOn</a> = False<br style="" class="">&gt;<br style="" class="">&gt; <a style="" class="" ymailto="mailto:res@lbLabelFont" href="mailto:res@lbLabelFont">res@lbLabelFont</a> = 25<br style="" class="">&gt;<br style="" class="">&gt; <a style="" class="" ymailto="mailto:res@lbLabelFontHeightF" href="mailto:res@lbLabelFontHeightF">res@lbLabelFontHeightF</a> = 0.012<br style="" class="">&gt;<br style="" class="">&gt; <a style="" class="" ymailto="mailto:res@lbBottomMarginF" href="mailto:res@lbBottomMarginF">res@lbBottomMarginF</a> = 0.5<br style="" class="">&gt;<br style="" class="">&gt; <a style="" class="" ymailto="mailto:res@lbTopMarginF" href="mailto:res@lbTopMarginF">res@lbTopMarginF</a> = 0.25<br style="" class="">&gt;<br style="" class="">&gt; <a style=""
 class="" ymailto="mailto:res@cnFillOn" href="mailto:res@cnFillOn">res@cnFillOn</a> = True<br style="" class="">&gt;<br style="" class="">&gt; <a style="" class="" ymailto="mailto:res@cnLinesOn" href="mailto:res@cnLinesOn">res@cnLinesOn</a> = False<br style="" class="">&gt;<br style="" class="">&gt; <a style="" class="" ymailto="mailto:res@cnLevelSelectionMode" href="mailto:res@cnLevelSelectionMode">res@cnLevelSelectionMode</a> = "ManualLevels"<br style="" class="">&gt;<br style="" class="">&gt;<br style="" class="">&gt;<br style="" class="">&gt;<br style="" class="">&gt; lower=int2flt(floattointeger(min(VAR3)*100.))/100.<br style="" class="">&gt;<br style="" class="">&gt; upper=int2flt(floattointeger(max(VAR3)*100.))/100.<br style="" class="">&gt;<br style="" class="">&gt; delta=fabs(lower-upper)<br style="" class="">&gt;<br style="" class="">&gt;<br style="" class="">&gt;<br style="" class="">&gt;<br style="" class="">&gt; <a style="" class=""
 ymailto="mailto:res@cnLevelSpacingF" href="mailto:res@cnLevelSpacingF">res@cnLevelSpacingF</a>=0.01<br style="" class="">&gt;<br style="" class="">&gt;<br style="" class="">&gt;<br style="" class="">&gt;<br style="" class="">&gt; if ( (delta.ge.0.).and.(delta.lt.0.0025) ) then<br style="" class="">&gt;<br style="" class="">&gt;&nbsp; <a style="" class="" ymailto="mailto:res@cnLevelSpacingF" href="mailto:res@cnLevelSpacingF">res@cnLevelSpacingF</a>=0.00001<br style="" class="">&gt;<br style="" class="">&gt; end if<br style="" class="">&gt;<br style="" class="">&gt; if ( (delta.ge.0.0025).and.(delta.lt.0.025) ) then<br style="" class="">&gt;<br style="" class="">&gt;&nbsp; <a style="" class="" ymailto="mailto:res@cnLevelSpacingF" href="mailto:res@cnLevelSpacingF">res@cnLevelSpacingF</a>=0.0001<br style="" class="">&gt;<br style="" class="">&gt; end if<br style="" class="">&gt;<br style="" class="">&gt; if ( (delta.ge.0.025).and.(delta.lt.0.25) ) then<br
 style="" class="">&gt;<br style="" class="">&gt;&nbsp; <a style="" class="" ymailto="mailto:res@cnLevelSpacingF" href="mailto:res@cnLevelSpacingF">res@cnLevelSpacingF</a>=0.001<br style="" class="">&gt;<br style="" class="">&gt; end if<br style="" class="">&gt;<br style="" class="">&gt; if ( (delta.ge.0.25).and.(delta.lt.2.5) ) then<br style="" class="">&gt;<br style="" class="">&gt;&nbsp; <a style="" class="" ymailto="mailto:res@cnLevelSpacingF" href="mailto:res@cnLevelSpacingF">res@cnLevelSpacingF</a>=0.01<br style="" class="">&gt;<br style="" class="">&gt; end if<br style="" class="">&gt;<br style="" class="">&gt; if ( (delta.ge.2.5).and.(delta.lt.25.0) ) then<br style="" class="">&gt;<br style="" class="">&gt;&nbsp; <a style="" class="" ymailto="mailto:res@cnLevelSpacingF" href="mailto:res@cnLevelSpacingF">res@cnLevelSpacingF</a>=0.1<br style="" class="">&gt;<br style="" class="">&gt; end if<br style="" class="">&gt;<br style="" class="">&gt; if (
 (delta.ge.25.).and.(delta.lt.250) ) then<br style="" class="">&gt;<br style="" class="">&gt;&nbsp; <a style="" class="" ymailto="mailto:res@cnLevelSpacingF" href="mailto:res@cnLevelSpacingF">res@cnLevelSpacingF</a>=1.0<br style="" class="">&gt;<br style="" class="">&gt; end if<br style="" class="">&gt;<br style="" class="">&gt; if ( (delta.ge.250.).and.(delta.lt.2500.) ) then<br style="" class="">&gt;<br style="" class="">&gt;&nbsp; <a style="" class="" ymailto="mailto:res@cnLevelSpacingF" href="mailto:res@cnLevelSpacingF">res@cnLevelSpacingF</a>=10.0<br style="" class="">&gt;<br style="" class="">&gt; end if<br style="" class="">&gt;<br style="" class="">&gt;<br style="" class="">&gt;<br style="" class="">&gt;<br style="" class="">&gt; <a style="" class="" ymailto="mailto:res@gsnSpreadColors" href="mailto:res@gsnSpreadColors">res@gsnSpreadColors</a>=True<br style="" class="">&gt;<br style="" class="">&gt;<br style="" class="">&gt;<br style=""
 class="">&gt;<br style="" class="">&gt; if ( (lower.ge.0.).and.(upper.ge.0.) ) then<br style="" class="">&gt;<br style="" class="">&gt;&nbsp; <a style="" class="" ymailto="mailto:res@gsnSpreadColorStart" href="mailto:res@gsnSpreadColorStart">res@gsnSpreadColorStart</a>=120<br style="" class="">&gt;<br style="" class="">&gt;&nbsp; <a style="" class="" ymailto="mailto:res@gsnSpreadColorEnd" href="mailto:res@gsnSpreadColorEnd">res@gsnSpreadColorEnd</a>=2<br style="" class="">&gt;<br style="" class="">&gt; end if<br style="" class="">&gt;<br style="" class="">&gt; if ( (lower.le.0.).and.(upper.le.0.) ) then<br style="" class="">&gt;<br style="" class="">&gt;&nbsp; <a style="" class="" ymailto="mailto:res@gsnSpreadColorStart" href="mailto:res@gsnSpreadColorStart">res@gsnSpreadColorStart</a>=255<br style="" class="">&gt;<br style="" class="">&gt;&nbsp; <a style="" class="" ymailto="mailto:res@gsnSpreadColorEnd"
 href="mailto:res@gsnSpreadColorEnd">res@gsnSpreadColorEnd</a>=137<br style="" class="">&gt;<br style="" class="">&gt; end if<br style="" class="">&gt;<br style="" class="">&gt;<br style="" class="">&gt;<br style="" class="">&gt;<br style="" class="">&gt; if ( (lower.lt.0.).and.(upper.gt.0.) ) then<br style="" class="">&gt;<br style="" class="">&gt;&nbsp; ratio=fabs(lower)/fabs(upper)<br style="" class="">&gt;<br style="" class="">&gt;&nbsp; <a style="" class="" ymailto="mailto:res@gsnSpreadColorStart" href="mailto:res@gsnSpreadColorStart">res@gsnSpreadColorStart</a>=255<br style="" class="">&gt;<br style="" class="">&gt;&nbsp; <a style="" class="" ymailto="mailto:res@gsnSpreadColorEnd" href="mailto:res@gsnSpreadColorEnd">res@gsnSpreadColorEnd</a>=128-floattointeger(128./ratio)<br style="" class="">&gt;<br style="" class="">&gt; end if<br style="" class="">&gt;<br style="" class="">&gt;<br style="" class="">&gt;<br style="" class="">&gt;<br style=""
 class="">&gt; <a style="" class="" ymailto="mailto:res@cnMinLevelValF" href="mailto:res@cnMinLevelValF">res@cnMinLevelValF</a>=lower<br style="" class="">&gt;<br style="" class="">&gt; <a style="" class="" ymailto="mailto:res@cnMaxLevelValF" href="mailto:res@cnMaxLevelValF">res@cnMaxLevelValF</a>=upper<br style="" class="">&gt;<br style="" class="">&gt;<br style="" class="">&gt;<br style="" class="">&gt;<br style="" class="">&gt; <a style="" class="" ymailto="mailto:res@lbBoxLinesOn" href="mailto:res@lbBoxLinesOn">res@lbBoxLinesOn</a>=False<br style="" class="">&gt;<br style="" class="">&gt;<br style="" class="">&gt;<br style="" class="">&gt;<br style="" class="">&gt;<br style="" class="">&gt;<br style="" class="">&gt; plot = gsn_csm_contour(wks, VAR3, res)<br style="" class="">&gt;<br style="" class="">&gt; _______________________________________________<br style="" class="">&gt; ncl-talk mailing list<br style="" class="">&gt; List instructions,
 subscriber options, unsubscribe:<br style="" class="">&gt; <a style="" class="" href="http://mailman.ucar.edu/mailman/listinfo/ncl-talk" target="_blank">http://mailman.ucar.edu/mailman/listinfo/ncl-talk</a><br style="" class="">&gt;<br style="" class="">&gt;<br style="" class="">-------------- next part --------------<br style="" class="">An HTML attachment was scrubbed...<br style="" class="">URL: <a style="" class="" href="http://mailman.ucar.edu/pipermail/ncl-talk/attachments/20140804/8f82b7fe/attachment-0001.html" target="_blank">http://mailman.ucar.edu/pipermail/ncl-talk/attachments/20140804/8f82b7fe/attachment-0001.html </a><br style="" class=""><br style="" class="">------------------------------<br style="" class=""><br style="" class="">Message: 10<br style="" class="">Date: Mon, 4 Aug 2014 10:58:51 -0600<br style="" class="">From: Mary Haley &lt;<a style="" class="" ymailto="mailto:haley@ucar.edu"
 href="mailto:haley@ucar.edu">haley@ucar.edu</a>&gt;<br style="" class="">Subject: Re: [ncl-talk] Fwd: Masking a U.S. county from a netcdf file<br style="" class="">To: Mohammadhassan Mohegh &lt;<a style="" class="" ymailto="mailto:mohegh@usc.edu" href="mailto:mohegh@usc.edu">mohegh@usc.edu</a>&gt;<br style="" class="">Cc: ncl-talk &lt;<a style="" class="" ymailto="mailto:ncl-talk@ucar.edu" href="mailto:ncl-talk@ucar.edu">ncl-talk@ucar.edu</a>&gt;<br style="" class="">Message-ID:<br style="" class="">&nbsp;&nbsp;&nbsp; &lt;CACNN_CLmsqp6fP8Q50GDM=ebG+<a style="" class="" ymailto="mailto:4RZhFgugzK8c04fHkeExH-3A@mail.gmail.com" href="mailto:4RZhFgugzK8c04fHkeExH-3A@mail.gmail.com">4RZhFgugzK8c04fHkeExH-3A@mail.gmail.com</a>&gt;<br style="" class="">Content-Type: text/plain; charset="utf-8"<br style="" class=""><br style="" class="">Hi,<br style="" class=""><br style="" class="">You can use a combination of shapefiles and the "gc_inout" function in<br
 style="" class="">order to collect values for a given county and get an average.<br style="" class=""><br style="" class="">My suggestion is to use the USA_adm2.shp shapefile downloaded from<br style="" class="">gadm.org/country, and then look at example "shapefiles_13.ncl" at:<br style="" class=""><br style="" class=""><a style="" class="" href="http://www.ncl.ucar.edu/Applications/shapefiles.shtml#ex13" target="_blank">http://www.ncl.ucar.edu/Applications/shapefiles.shtml#ex13</a><br style="" class=""><br style="" class="">You can also look at the example right after that, which does the same<br style="" class="">thing for the coastal counties of Germany, "<br style="" class="">Germany_coastal_counties_DEU_adm.ncl<br style="" class="">&lt;<a style="" class="" href="http://www.ncl.ucar.edu/Applications/Scripts/Germany_coastal_counties_DEU_adm.ncl"
 target="_blank">http://www.ncl.ucar.edu/Applications/Scripts/Germany_coastal_counties_DEU_adm.ncl</a>&gt;<br style="" class="">".<br style="" class=""><br style="" class="">The "shapefiles_13.ncl" example only does the counties of Georgia.&nbsp; Let me<br style="" class="">know if you need help extending it to do all the counties of the US. It<br style="" class="">would help, however, if you could provide me with your two WRF output files.<br style="" class=""><br style="" class="">--Mary<br style="" class=""><br style="" class=""><br style="" class=""><br style="" class="">On Thu, Jul 31, 2014 at 5:09 PM, Mohammadhassan Mohegh &lt;<a style="" class="" ymailto="mailto:mohegh@usc.edu" href="mailto:mohegh@usc.edu">mohegh@usc.edu</a>&gt;<br style="" class="">wrote:<br style="" class=""><br style="" class="">&gt;<br style="" class="">&gt; Hi<br style="" class="">&gt;<br style="" class="">&gt; I'm working with WRF model output and I need to average the
 differences of<br style="" class="">&gt; 2 outputs within a county. Is there any way to do this? Are there<br style="" class="">&gt; shapefiles or netcdf files available for US counties that NCL recognizes?<br style="" class="">&gt;<br style="" class="">&gt; I have created a netcdf file containing these counties using ARCGIS. The<br style="" class="">&gt; problem is that it does not have the same grid and I can't use the mask()<br style="" class="">&gt; function with it. Does any one know of a<br style="" class="">&gt;<br style="" class="">&gt; Thanks in advance for your help.<br style="" class="">&gt;<br style="" class="">&gt;<br style="" class="">&gt;<br style="" class="">&gt; --<br style="" class="">&gt; Mohammadhassan Mohegh, PhD student<br style="" class="">&gt; Astani Dept of Civil and Environmental Engineering<br style="" class="">&gt; University of Southern California<br style="" class="">&gt; 3620 South Vermont Ave, KAP227<br style=""
 class="">&gt; Los Angeles, CA<br style="" class="">&gt; <a style="" class="" ymailto="mailto:mohegh@usc.edu" href="mailto:mohegh@usc.edu">mohegh@usc.edu</a><br style="" class="">&gt;<br style="" class="">&gt; _______________________________________________<br style="" class="">&gt; ncl-talk mailing list<br style="" class="">&gt; List instructions, subscriber options, unsubscribe:<br style="" class="">&gt; <a style="" class="" href="http://mailman.ucar.edu/mailman/listinfo/ncl-talk" target="_blank">http://mailman.ucar.edu/mailman/listinfo/ncl-talk</a><br style="" class="">&gt;<br style="" class="">&gt;<br style="" class="">-------------- next part --------------<br style="" class="">An HTML attachment was scrubbed...<br style="" class="">URL: <a style="" class="" href="http://mailman.ucar.edu/pipermail/ncl-talk/attachments/20140804/8992036d/attachment-0001.html"
 target="_blank">http://mailman.ucar.edu/pipermail/ncl-talk/attachments/20140804/8992036d/attachment-0001.html </a><br style="" class=""><br style="" class="">------------------------------<br style="" class=""><br style="" class="">_______________________________________________<br style="" class="">ncl-talk mailing list<br style="" class=""><a style="" class="" ymailto="mailto:ncl-talk@ucar.edu" href="mailto:ncl-talk@ucar.edu">ncl-talk@ucar.edu</a><br style="" class=""><a style="" class="" href="http://mailman.ucar.edu/mailman/listinfo/ncl-talk" target="_blank">http://mailman.ucar.edu/mailman/listinfo/ncl-talk</a><br style="" class=""><br style="" class=""><br style="" class="">End of ncl-talk Digest, Vol 129, Issue 4<br style="" class="">****************************************<br style="" class=""><br style="" class=""><br style="" class=""></div>  </div> </div>  </div> </div></body></html>