<div dir="ltr"><div class="gmail_default" style="font-size:small">Can you please try wrf_map_overlays instead of wrf_map_overlay?  wrf_map_overlay is a deprecated function.</div><div class="gmail_default" style="font-size:small">
<br></div><div class="gmail_default" style="font-size:small">Please see the wrf_map_overlays documentation for more information:</div><div class="gmail_default" style="font-size:small"><br></div><div class="gmail_default" style>
<a href="http://www.ncl.ucar.edu/Document/Functions/WRF_arw/wrf_map_overlays.shtml">http://www.ncl.ucar.edu/Document/Functions/WRF_arw/wrf_map_overlays.shtml</a><br></div><div class="gmail_default" style><br></div><div class="gmail_default" style>
Also, there are some cases where the WRF functions don&#39;t recognize the gsnXXXX resources, and so it&#39;s possible that gsnPaperOrientation is getting ignored.</div><div class="gmail_default" style><br></div><div class="gmail_default" style>
You can try not setting gsnMaximize to True to see if that turns off the rotation of your plot.</div><div class="gmail_default" style><br></div><div class="gmail_default" style>If you continue to have problems, it would help if you could provide the data file needed to run your script.</div>
<div class="gmail_default" style><br></div><div class="gmail_default" style>Thanks,</div><div class="gmail_default" style><br></div><div class="gmail_default" style>--Mary</div></div><div class="gmail_extra"><br><br><div class="gmail_quote">
On Mon, Aug 4, 2014 at 9:43 PM, 杨玉华 <span dir="ltr">&lt;<a href="mailto:yangyh@mail.typhoon.gov.cn" target="_blank">yangyh@mail.typhoon.gov.cn</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<u></u>






<div>
<div><div align="left">
<p>Hi,</p>
<p> I&#39;d like to specify the orientation of the plot to portrait, but I&#39;m failed even I using the following scripts:</p>
<p>         <a href="mailto:opts_r@gsnMaximize" target="_blank">opts_r@gsnMaximize</a>          = True<br>         <a href="mailto:opts_r@gsnPaperOrientation" target="_blank">opts_r@gsnPaperOrientation</a> = &quot;portrait&quot;</p>

<p>or </p>
<p>         <a href="mailto:type@wkOrientation" target="_blank">type@wkOrientation</a> = &quot;portrait&quot;</p>
<p>Attachment is my scripts, please check it.</p>
<p>Thanks in advance.</p>
<p>Yuhua </p>
<p> </p><strong>您于 Tue, 5 Aug 2014 11:12:04 +0800 的来信中写到: </strong><br><br></div>


<div>
<div dir="ltr">Dear Sir 
<div><br></div>
<div>i am trying to read TRMM(tropical rainfall measuring mission data) on NCL version 6.1.2 but as the latitude and longitude are different from geographic values i.e from ncl_filedump i get total  longitude = 1440   latitude = 400, the spatial resolution is 25km .</div>

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

<br>_______________________________________________<br>
ncl-talk mailing list<br>
List instructions, subscriber options, unsubscribe:<br>
<a href="http://mailman.ucar.edu/mailman/listinfo/ncl-talk" target="_blank">http://mailman.ucar.edu/mailman/listinfo/ncl-talk</a><br>
<br></blockquote></div><br></div>