<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title></title>
</head>
<style type="text/css">
<!--
        #send_mail { 
        font-family: "Courier New";
        background:#FFFFFF;
        color:#000000;
        }

#send_mail a {
        color:#999999
        }

#send_mail a:hover {
        color:#0000FF
        }

#send_mail div { 
        color:#000000;
        font-family: "Courier New";
        font-size:14px;
        line-height:150%;
        }

#send_mail .usersign {
        line-height:100%;
        }
-->
</style>
<body id="send_mail">
<div><DIV align=left>
<P mce_keep="true">Hi,</P>
<P mce_keep="true">&nbsp;I'd like to specify the orientation of the plot to portrait, but I'm failed even I using the following scripts:</P>
<P mce_keep="true">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <A href="mailto:opts_r@gsnMaximize">opts_r@gsnMaximize</A>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; = True<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <A href="mailto:opts_r@gsnPaperOrientation">opts_r@gsnPaperOrientation</A> = "portrait"</P>
<P mce_keep="true">or </P>
<P mce_keep="true">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <A href="mailto:type@wkOrientation">type@wkOrientation</A> = "portrait"</P>
<P mce_keep="true">Attachment&nbsp;is&nbsp;my scripts, please check it.</P>
<P mce_keep="true">Thanks in advance.</P>
<P mce_keep="true">Yuhua&nbsp;</P>
<P mce_keep="true">&nbsp;</P><STRONG>您于 Tue, 5 Aug 2014 11:12:04 +0800 的来信中写到: </STRONG><BR><BR></DIV>
<STYLE type=text/css>.line_left {
        BORDER-LEFT: #2867ae 2px solid; PADDING-LEFT: 5px; PADDING-RIGHT: 3px; MARGIN-LEFT: 5px
}
</STYLE>

<DIV class=line_left>
<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 &nbsp;longitude = 1440 &nbsp; 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&nbsp;</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+49.875)/0.25)+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 mce_href="mailto:ncl-talk-request@ucar.edu">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>&nbsp; &nbsp; &nbsp; &nbsp; <A href="mailto:ncl-talk@ucar.edu" mce_href="mailto:ncl-talk@ucar.edu">ncl-talk@ucar.edu</A><BR><BR>To subscribe or unsubscribe via the World Wide Web, visit<BR>&nbsp; &nbsp; &nbsp; &nbsp; <A href="http://mailman.ucar.edu/mailman/listinfo/ncl-talk" target=_blank mce_href="http://mailman.ucar.edu/mailman/listinfo/ncl-talk">http://mailman.ucar.edu/mailman/listinfo/ncl-talk</A><BR>or, via email, send a message with subject or body 'help' to<BR>&nbsp; &nbsp; &nbsp; &nbsp; <A href="mailto:ncl-talk-request@ucar.edu" mce_href="mailto:ncl-talk-request@ucar.edu">ncl-talk-request@ucar.edu</A><BR><BR>You can reach the person managing the list at<BR>&nbsp; &nbsp; &nbsp; &nbsp; <A href="mailto:ncl-talk-owner@ucar.edu" mce_href="mailto:ncl-talk-owner@ucar.edu">ncl-talk-owner@ucar.edu</A><BR><BR>When replying, please edit your Subject line so it is more specific<BR>than "Re: Contents of ncl-talk digest..."<BR><BR><BR>Today's Topics:<BR><BR>&nbsp; &nbsp;1. Re: triple2grid (Dennis Shea)<BR>&nbsp; &nbsp;2. Re: How to create two y axis with a common x axis in bar &nbsp;plot<BR>&nbsp; &nbsp; &nbsp; (Mary Haley)<BR>&nbsp; &nbsp;3. Re: (no subject) (Dennis Shea)<BR>&nbsp; &nbsp;4. Re: Running example scripts for beginners (Mary Haley)<BR>&nbsp; &nbsp;5. Re: read separated files (Dennis Shea)<BR>&nbsp; &nbsp;6. Using a loop to find values greater than 0 (calculate &nbsp; &nbsp; PDD)<BR>&nbsp; &nbsp; &nbsp; (Lauren Jean Vargo)<BR>&nbsp; &nbsp;7. Re: Using a loop to find values greater than 0 &nbsp; &nbsp;(calculate<BR>&nbsp; &nbsp; &nbsp; PDD) (Dennis Shea)<BR>&nbsp; &nbsp;8. Re: Using a loop to find values greater than 0 &nbsp; &nbsp;(calculate<BR>&nbsp; &nbsp; &nbsp; PDD) (Kyle Griffin)<BR>&nbsp; &nbsp;9. Re: Strange white lines across plot (Mary Haley)<BR>&nbsp; 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" mce_href="mailto:shea@ucar.edu">shea@ucar.edu</A>&gt;<BR>Subject: Re: [ncl-talk] triple2grid<BR>To: Manisha Ganeshan &lt;<A href="mailto:manisha.ganeshan86@gmail.com" mce_href="mailto:manisha.ganeshan86@gmail.com">manisha.ganeshan86@gmail.com</A>&gt;<BR>Cc: NCL-talk &lt;<A href="mailto:ncl-talk@ucar.edu" mce_href="mailto:ncl-talk@ucar.edu">ncl-talk@ucar.edu</A>&gt;<BR>Message-ID:<BR>&nbsp; &nbsp; &nbsp; &nbsp; &lt;CAOF1d_4pLjOOnFbXb-7ju2BQbkXwbx=iCVsuVWjiUM=<A href="mailto:wyR_Efw@mail.gmail.com" mce_href="mailto:wyR_Efw@mail.gmail.com">wyR_Efw@mail.gmail.com</A>&gt;<BR>Content-Type: text/plain; charset="utf-8"<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" mce_href="mailto:manisha.ganeshan86@gmail.com">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" mce_href="mailto:shea@ucar.edu">shea@ucar.edu</A>&gt; wrote:<BR>&gt;<BR>&gt;&gt; It does not calculate the mean. New 'nearest neighbor' 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" mce_href="mailto:manisha.ganeshan86@gmail.com">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 mce_href="http://mailman.ucar.edu/mailman/listinfo/ncl-talk">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 mce_href="http://mailman.ucar.edu/pipermail/ncl-talk/attachments/20140804/81cbd948/attachment-0001.html">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" mce_href="mailto:haley@ucar.edu">haley@ucar.edu</A>&gt;<BR>Subject: Re: [ncl-talk] How to create two y axis with a common x axis<BR>&nbsp; &nbsp; &nbsp; &nbsp; in bar &nbsp;plot<BR>To: Ipshita Majhi &lt;<A href="mailto:ipmajhi@alaska.edu" mce_href="mailto:ipmajhi@alaska.edu">ipmajhi@alaska.edu</A>&gt;<BR>Cc: NCL USERS &lt;<A href="mailto:ncl-talk@ucar.edu" mce_href="mailto:ncl-talk@ucar.edu">ncl-talk@ucar.edu</A>&gt;<BR>Message-ID:<BR>&nbsp; &nbsp; &nbsp; &nbsp; &lt;CACNN_CKd2OjK7wbauhLmC01QPRpsCMfMq2aYC1CDzqh=<A href="mailto:UQeVog@mail.gmail.com" mce_href="mailto:UQeVog@mail.gmail.com">UQeVog@mail.gmail.com</A>&gt;<BR>Content-Type: text/plain; charset="utf-8"<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. &nbsp;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" mce_href="mailto:ipmajhi@alaska.edu">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; &nbsp; &nbsp; &nbsp;load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/gsn_code.ncl"<BR>&gt; &nbsp; &nbsp; &nbsp;load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/gsn_csm.ncl"<BR>&gt;<BR>&gt; &nbsp; &nbsp; &nbsp;months=(/1,2,3,4,5,6,7,8,9,10,11,12/)<BR>&gt;<BR>&gt;<BR>&gt; monthly_avg=asciiread("~/Documents/PhD_June_2015/NCL_Moonsoon/Data_output/Monthly_avg_air.txt",-1,<BR>&gt; "float")<BR>&gt;<BR>&gt; monthly_Trend=asciiread("~/Documents/PhD_June_2015/NCL_Moonsoon/Data_output/trend_air.txt",<BR>&gt; -1, "float")<BR>&gt; &nbsp; &nbsp; &nbsp;printVarSummary(monthly_avg)<BR>&gt;<BR>&gt; &nbsp; &nbsp; &nbsp;wks = gsn_open_wks("ps","Trend_Avg")<BR>&gt;<BR>&gt;<BR>&gt; &nbsp; &nbsp; &nbsp;sres = True<BR>&gt; &nbsp; &nbsp; &nbsp;sres@vpWidthF = 0.7<BR>&gt; &nbsp; &nbsp; &nbsp;sres@vpHeightF = 0.5<BR>&gt; &nbsp; &nbsp; &nbsp;sres@gsnDraw = True<BR>&gt; &nbsp; &nbsp; &nbsp;sres@gsnFrame = False<BR>&gt; &nbsp; &nbsp; &nbsp;sres@gsnXYBarChart = True<BR>&gt; &nbsp; &nbsp; &nbsp;sres@gsnXYBarChartBarWidth = 0.15 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ; change bar widths<BR>&gt; &nbsp; &nbsp; &nbsp;sres@tmXBMode &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;= "Explicit" &nbsp; &nbsp; &nbsp; &nbsp; ; explicit labels<BR>&gt; &nbsp; &nbsp; &nbsp;sres@tmXBValues &nbsp; &nbsp; &nbsp; &nbsp;= (/1,2,3,4,5,6,7,8,9,10,11,12/)<BR>&gt; &nbsp; &nbsp; &nbsp;sres@tmXBLabels =<BR>&gt; (/"Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"/)<BR>&gt; &nbsp; &nbsp; &nbsp;sres@tmXBLabelFontHeightF = 0.0205<BR>&gt; &nbsp; &nbsp; &nbsp;sres@tmXTLabelFontHeightF = 0.0205<BR>&gt; &nbsp; &nbsp; &nbsp;sres@tmYLLabelFontHeightF = 0.0225<BR>&gt; &nbsp; &nbsp; &nbsp;sres@tiMainFontHeightF = 0.025<BR>&gt; &nbsp; &nbsp; &nbsp;sres@tiMainFont = "helvetica"<BR>&gt; &nbsp; &nbsp; &nbsp;sres@tiMainString = "All India Rainfall Climatology and Trend<BR>&gt; 1880-2012"<BR>&gt; &nbsp; &nbsp; &nbsp;sres@tiYAxisString = "(mm)"<BR>&gt;<BR>&gt; &nbsp; &nbsp; &nbsp;plot1 = gsn_csm_xy (wks,months,monthly_avg,sres)<BR>&gt; &nbsp; &nbsp; &nbsp;sres@gsnXYBarChartColors = (/"red"/) &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;;<BR>&gt; seperately, not<BR>&gt; &nbsp; &nbsp; &nbsp;plot2 = gsn_csm_xy(wks,months,monthly_Trend,sres)<BR>&gt; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;; advancing the frame<BR>&gt; &nbsp; &nbsp; &nbsp;sres@gsnXYBarChartColors = (/"blue"/) &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;; 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 mce_href="http://mailman.ucar.edu/mailman/listinfo/ncl-talk">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 mce_href="http://mailman.ucar.edu/pipermail/ncl-talk/attachments/20140804/b04f1178/attachment-0001.html">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 mce_href="http://mailman.ucar.edu/pipermail/ncl-talk/attachments/20140804/b04f1178/attachment-0001.png">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 mce_href="http://mailman.ucar.edu/pipermail/ncl-talk/attachments/20140804/b04f1178/attachment-0001.obj">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" mce_href="mailto:shea@ucar.edu">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" mce_href="mailto:modise.wiston@postgrad.manchester.ac.uk">modise.wiston@postgrad.manchester.ac.uk</A>&gt;<BR>Cc: "<A href="mailto:ncl-talk@ucar.edu" mce_href="mailto:ncl-talk@ucar.edu">ncl-talk@ucar.edu</A>" &lt;<A href="mailto:ncl-talk@ucar.edu" mce_href="mailto:ncl-talk@ucar.edu">ncl-talk@ucar.edu</A>&gt;<BR>Message-ID:<BR>&nbsp; &nbsp; &nbsp; &nbsp; &lt;<A href="mailto:CAOF1d_4GEj90MZ04-u1vemt3UbnH%2Bvd--oWt1Ax73BAP2poQag@mail.gmail.com" mce_href="mailto:CAOF1d_4GEj90MZ04-u1vemt3UbnH%2Bvd--oWt1Ax73BAP2poQag@mail.gmail.com">CAOF1d_4GEj90MZ04-u1vemt3UbnH+vd--oWt1Ax73BAP2poQag@mail.gmail.com</A>&gt;<BR>Content-Type: text/plain; charset="utf-8"<BR><BR>While not WRF, the last example at:<BR><A href="http://www.ncl.ucar.edu/Applications/iso.shtml" target=_blank mce_href="http://www.ncl.ucar.edu/Applications/iso.shtml">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" mce_href="mailto:wrfhelp@ucar.edu">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" mce_href="mailto:modise.wiston@postgrad.manchester.ac.uk">modise.wiston@postgrad.manchester.ac.uk</A>&gt; wrote:<BR><BR>&gt; &nbsp;*To whom it may concern*<BR>&gt;<BR>&gt; &nbsp;*Hi all,*<BR>&gt;<BR>&gt; &nbsp;*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; &nbsp;*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't figure out out how to do this.. (I would<BR>&gt; like to plot 'height vs max QNDROP' on the horizontal lat-lon domain) *<BR>&gt;<BR>&gt; &nbsp;*Any help is appreciated please..*<BR>&gt; *Thank you,*<BR>&gt; *M. Wiston*<BR>&gt; *The University of Manchester &nbsp;*<BR>&gt;<BR>&gt; -----------------------------------------------------------------------------------------------------------<BR>&gt; &nbsp; dt = 6<BR>&gt; &nbsp;do ifil = 0, 0; numFILES-48, dt<BR>&gt; &nbsp; &nbsp;a = addfile(FILES(ifil)+".nc","r")<BR>&gt; &nbsp; &nbsp; ;list time step to output data<BR>&gt; &nbsp; &nbsp;times = wrf_user_list_times(a)<BR>&gt; &nbsp; &nbsp;ntimes = dimsizes(times)<BR>&gt;<BR>&gt; &nbsp; &nbsp;do it = 0,ntimes-1,2<BR>&gt; &nbsp;do ispec = 0, nspec-1<BR>&gt; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; species = speclist(ispec)<BR>&gt;<BR>&gt; &nbsp; ;Obtain the variables from the file<BR>&gt; &nbsp; &nbsp;if(isfilevar(a,"QNDROP"))<BR>&gt; N = wrf_user_getvar(a,"QNDROP",it)<BR>&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>&gt; to /scm^3<BR>&gt; Nd@units = "/cm^3" &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ; converted units<BR>&gt; &nbsp; &nbsp;end if<BR>&gt;<BR>&gt; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;;define an array to hold data<BR>&gt; &nbsp; &nbsp;dimsNd = dimsizes(Nd)<BR>&gt; &nbsp; &nbsp;print(dimsNd)<BR>&gt;<BR>&gt; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;;----------------Determine the domain size (grid points and<BR>&gt; vert. levels)----------------;<BR>&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>&gt; (hor) by "j" (vert) direction &nbsp; ;<BR>&gt; &nbsp; &nbsp;; &nbsp; &nbsp;(e_we:lat, e_sn:lon)<BR>&gt; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;;<BR>&gt; &nbsp; &nbsp;; &nbsp; &nbsp;40 vert levels:(k) &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ; model levels<BR>&gt; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;;<BR>&gt; &nbsp; &nbsp;; &nbsp; &nbsp;Print output gives: k = 40 &nbsp; &nbsp; &nbsp; &nbsp; ;NB: this is read starting from<BR>&gt; zero (i.e. 0-39) &nbsp; &nbsp;;<BR>&gt; &nbsp; &nbsp;; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; j = 250<BR>&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>&gt; &nbsp; &nbsp;; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; i = 320<BR>&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>&gt;<BR>&gt; &nbsp;;------------------------------------------------------------------------------------------------;<BR>&gt; &nbsp; &nbsp;min_Nd = &nbsp;new( (/dimsNd(1),dimsNd(2)/),float )<BR>&gt; &nbsp; &nbsp;max_Nd = &nbsp;new( (/dimsNd(1),dimsNd(2)/),float )<BR>&gt; &nbsp; &nbsp;c_btm = new( (/dimsNd(1),dimsNd(2)/),integer )<BR>&gt; &nbsp; &nbsp;c_top = new( (/dimsNd(1),dimsNd(2)/),integer )<BR>&gt;<BR>&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>&gt; do i = 0, dimsNd(2)-1 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;; loop along i<BR>&gt; &nbsp; &nbsp; &nbsp;; cldfrc = (i*j)<BR>&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>&gt; cloud top limits to confine the execution<BR>&gt; &nbsp; &nbsp; &nbsp;c_top(j,i) = -1<BR>&gt; &nbsp; &nbsp; &nbsp;do k = 0, dimsNd(0)-2 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;; loop [vertically] through<BR>&gt; levels<BR>&gt; &nbsp; ; print("k= "+k)<BR>&gt; &nbsp; if(Nd(k,j,i) .le. cut_pnt .and. Nd((k+1),j,i) .gt. cut_pnt)<BR>&gt; &nbsp; &nbsp; &nbsp; &nbsp; c_btm(j,i) = (k+1)<BR>&gt; ;[cloud base]<BR>&gt; &nbsp; &nbsp; &nbsp; &nbsp; ; print("c_btm = "+c_btm(j,i))<BR>&gt;<BR>&gt; &nbsp; else if (Nd(k,j,i) .gt. cut_pnt .and. Nd((k+1),j,i) .le. cut_pnt) then<BR>&gt; &nbsp; &nbsp; &nbsp; &nbsp; c_top(j,i) = k<BR>&gt; &nbsp;;[cloud top]<BR>&gt; break &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ; exit the the process after the first<BR>&gt; cloud band<BR>&gt; &nbsp; end if<BR>&gt; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; end if<BR>&gt; &nbsp; &nbsp; &nbsp;end do<BR>&gt; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;; min_Nd(i) = min(Nd(:,i))<BR>&gt; &nbsp; &nbsp; &nbsp;; max_Nd(i) = max(Nd(:,i))<BR>&gt; &nbsp; &nbsp; &nbsp;; min_Nd(j) = min(Nd(:,j))<BR>&gt; &nbsp; &nbsp; &nbsp;; max_Nd(j) = max(Nd(:,j))<BR>&gt; &nbsp; &nbsp; &nbsp;; min_Nd(j,i) = min(Nd(:,j,i))<BR>&gt; &nbsp; &nbsp; &nbsp;; max_Nd(j,i) = max(Nd(0:3,j,i))<BR>&gt;<BR>&gt; &nbsp; &nbsp; &nbsp;if(c_btm(j,i) .eq. -1 .and. c_top(j,i) .eq. -1)<BR>&gt; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;max_Nd(j,i) = 0.0<BR>&gt;<BR>&gt; &nbsp; &nbsp; &nbsp;else if (c_btm(j,i) .gt. -1 .and. c_top(j,i) .gt. -1) then<BR>&gt; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;max_Nd(j,i) = max( Nd(c_btm(j,i):c_top(j,i),j,i) )<BR>&gt; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;;print(min_Nd(j,i))<BR>&gt; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;;print("max_Nd = " +max_Nd(j,i))<BR>&gt; &nbsp;print("| "+sprintf("%5.3f",max_Nd(j,i))+ " | "+sprintf("%2.1f",<BR>&gt; c_btm(j,i))+" | "+sprintf("%2.1f", c_btm(j,i))+" |" )<BR>&gt; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;end if<BR>&gt; &nbsp; &nbsp; &nbsp;end if<BR>&gt; &nbsp; &nbsp; &nbsp;end do<BR>&gt; &nbsp; &nbsp; &nbsp; &nbsp; end do<BR>&gt;<BR>&gt; &nbsp;;------------------------------------------------------------------------------------------<BR>&gt;<BR>&gt; &nbsp; &nbsp; &nbsp; &nbsp; ;;get the CCN number concentration from the file<BR>&gt; Cn1 = wrf_user_getvar(a,"CCN1",it)<BR>&gt; Cn2 = wrf_user_getvar(a,"CCN2",it)<BR>&gt; Cn3 = wrf_user_getvar(a,"CCN3",it)<BR>&gt; Cn4 = wrf_user_getvar(a,"CCN4",it)<BR>&gt; Cn5 = wrf_user_getvar(a,"CCN5",it)<BR>&gt; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;Cn6 = wrf_user_getvar(a,"CCN6",it)<BR>&gt; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;z = wrf_user_getvar(a,"z",it)<BR>&gt; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;w = wrf_user_getvar(a,"wa",it) &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;; vertical<BR>&gt; [updraft..??] velocity<BR>&gt; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;w@units = "m/s"<BR>&gt;<BR>&gt; &nbsp;p = wrf_user_getvar(a, "p",it) &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ;extract p and tk to<BR>&gt; convert to STP<BR>&gt; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;tk = wrf_user_getvar(a,"tk",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 = "/cm^3"<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; &nbsp; &nbsp; &nbsp;do i = 0, dimsNd(2)-1<BR>&gt; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; if(c_btm(j,i) .eq. -1)<BR>&gt; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;C1_btm(j,i) = 0.0<BR>&gt; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;C2_btm(j,i) = 0.0<BR>&gt; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;C3_btm(j,i) = 0.0<BR>&gt; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;C4_btm(j,i) = 0.0<BR>&gt; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;C5_btm(j,i) = 0.0<BR>&gt; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;C6_btm(j,i) = 0.0<BR>&gt;<BR>&gt; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; else if(c_btm(j,i) .ne. -1) then<BR>&gt; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;C1_btm(j,i) = ( C1(c_btm(j,i),j,i) )<BR>&gt; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;C2_btm(j,i) = ( C2(c_btm(j,i),j,i) )<BR>&gt; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;C3_btm(j,i) = ( C3(c_btm(j,i),j,i) )<BR>&gt; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;C4_btm(j,i) = ( C4(c_btm(j,i),j,i) )<BR>&gt; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;C5_btm(j,i) = ( C5(c_btm(j,i),j,i) )<BR>&gt; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;C6_btm(j,i) = ( C6(c_btm(j,i),j,i) )<BR>&gt;<BR>&gt; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;; print("Cn1 = " +C1_btm(j,i))<BR>&gt; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;; print("Cn2 = " +C2_btm(j,i))<BR>&gt; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;; print("Cn3 = " +C3_btm(j,i))<BR>&gt; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;; print("Cn4 = " +C4_btm(j,i))<BR>&gt; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;; print("Cn5 = " +C5_btm(j,i))<BR>&gt; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;; print("Cn6 = " +C6_btm(j,i))<BR>&gt; &nbsp;print("| "+sprintf("%4.3f", C1_btm(j,i))+" | "+sprintf("%4.3f",<BR>&gt; C2_btm(j,i))+" | "+sprintf("%4.3f", C3_btm(j,i))+" | "+\<BR>&gt; sprintf("%4.3f", C4_btm(j,i))+" | "+sprintf("%4.3f", C5_btm(j,i))+" |<BR>&gt; "+sprintf("%4.3f", C6_btm(j,i))+" |" )<BR>&gt; &nbsp; &nbsp; &nbsp; &nbsp; end if<BR>&gt; &nbsp; &nbsp; &nbsp; &nbsp; end if<BR>&gt; &nbsp; &nbsp; &nbsp; &nbsp; end do<BR>&gt; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;end do<BR>&gt;<BR>&gt; ;`````````````````````````````````````````````````````````````````````````````````<BR>&gt;<BR>&gt; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ; if(max_Nd(j,i) .le. C1_btm(j,i))<BR>&gt; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ; &nbsp;SS(j,i) = 0.01<BR>&gt;<BR>&gt; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ; &nbsp;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; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ; &nbsp;SS(j,i) = "0.02%"<BR>&gt;<BR>&gt; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ; &nbsp;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; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ; &nbsp; SS(j,i) = "0.1%"<BR>&gt;<BR>&gt; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ; &nbsp;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; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ; &nbsp;SS(j,i) = "0.2%"<BR>&gt;<BR>&gt; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ; &nbsp;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; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ; &nbsp;SS(j,i) = "0.5%"<BR>&gt;<BR>&gt; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ; &nbsp;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; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ; &nbsp;SS(j,i) = "1.0%"<BR>&gt; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ; &nbsp;end if<BR>&gt; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ; &nbsp;end if<BR>&gt; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ; &nbsp;end if<BR>&gt; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ; &nbsp;end if<BR>&gt; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ; &nbsp;end if<BR>&gt; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ; &nbsp;end if<BR>&gt;<BR>&gt; ;-------------------------------------------------------------------------------------------<BR>&gt; &nbsp; &nbsp; &nbsp;;Set some Basic Plot options<BR>&gt; &nbsp; &nbsp; &nbsp; res &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;= True<BR>&gt; &nbsp; &nbsp; &nbsp; res@tiMainString &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;= "CCN nmbr @: " +times(it) &nbsp;; main<BR>&gt; field title<BR>&gt; &nbsp; &nbsp; &nbsp; mpres &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; = True<BR>&gt; &nbsp; &nbsp; &nbsp; pltres &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; = True<BR>&gt;<BR>&gt; &nbsp; &nbsp; &nbsp; res@gsnMaximize &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; = False<BR>&gt; &nbsp; &nbsp; &nbsp; res@gsnFrame &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;= False<BR>&gt; &nbsp; &nbsp; &nbsp; res@gsnDraw &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; = False<BR>&gt; &nbsp; &nbsp; &nbsp; res@cnFillOn &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; = True<BR>&gt; &nbsp; &nbsp; &nbsp; res@cnLinesOn &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; = False &nbsp; &nbsp; &nbsp;; turn off contour<BR>&gt; lines<BR>&gt; &nbsp; &nbsp; &nbsp; res@cnLineLabelsOn &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;= False &nbsp; &nbsp; &nbsp; ; lables the data<BR>&gt; on contours/map grids<BR>&gt; &nbsp; &nbsp; &nbsp; res@gsnSpreadColors &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; = True<BR>&gt; &nbsp; &nbsp; &nbsp; res@lbOrientation &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; = "Horizontal" &nbsp; &nbsp; &nbsp; &nbsp;;<BR>&gt; orientates the linear scale<BR>&gt; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; res@cnLevelSelectionMode &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;= "ExplicitLevels"<BR>&gt;<BR>&gt; ;-------------------------------------------------------------------------------------------<BR>&gt; &nbsp; &nbsp; &nbsp; res@tiYAxisString &nbsp; &nbsp; &nbsp; = ""<BR>&gt; &nbsp; &nbsp; &nbsp; res@tiXAxisString &nbsp; &nbsp; &nbsp; = "Nmbr cont'n (/cm^3)"<BR>&gt; &nbsp; &nbsp; &nbsp; res@tiXAxisSide &nbsp; &nbsp; &nbsp; &nbsp; = "Bottom"<BR>&gt;<BR>&gt; &nbsp; &nbsp; &nbsp; ;res@tiMainString &nbsp; = "Droplet nmbr at: " +times(it)<BR>&gt; &nbsp; &nbsp; &nbsp; contour_Nd = wrf_contour(a,wks,max_Nd,res)<BR>&gt;<BR>&gt; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; plot_Nd = wrf_map_overlays(a,wks,(/contour_Nd/),pltres,res)<BR>&gt; &nbsp; &nbsp; ; plots data on a map backgrnd<BR>&gt; &nbsp; &nbsp; &nbsp; ; contour_Cn1 = wrf_contour(a,wks,C1_btm,res)<BR>&gt; &nbsp; &nbsp; &nbsp; ; plot_Cn1 = wrf_map_overlays(a,wks,(/contour_Cn1/),pltres,res)<BR>&gt; &nbsp; &nbsp; &nbsp; &nbsp;; &nbsp;contour_Cn2 = wrf_contour(a,wks,C2_btm,res)<BR>&gt; &nbsp; &nbsp; &nbsp; ; &nbsp;plot_Cn2 = wrf_map_overlays(a,wks,(/contour_Cn2/),pltres,res)<BR>&gt; &nbsp; &nbsp; &nbsp; ; &nbsp;contour_Cn3 = wrf_contour(a,wks,C3_btm,res)<BR>&gt; &nbsp; &nbsp; &nbsp; ; &nbsp;plot_Cn3 = wrf_map_overlays(a,wks,(/contour_Cn3/),pltres,res)<BR>&gt; &nbsp; &nbsp; &nbsp; ; &nbsp;contour_Cn4 = wrf_contour(a,wks,C4_btm,res)<BR>&gt; &nbsp; &nbsp; &nbsp; ; &nbsp;plot_Cn4 = wrf_map_overlays(a,wks,(/contour_Cn4/),pltres,res)<BR>&gt; &nbsp; &nbsp; &nbsp; ; &nbsp;contour_Cn5 = wrf_contour(a,wks,C5_btm,res)<BR>&gt; &nbsp; &nbsp; &nbsp; ; &nbsp;plot_Cn5 = wrf_map_overlays(a,wks,(/contour_Cn5/),pltres,res)<BR>&gt; &nbsp; &nbsp; &nbsp; &nbsp; ; &nbsp;contour_Cn6 = wrf_contour(a,wks,C6_btm,res)<BR>&gt; &nbsp; &nbsp; &nbsp; ; &nbsp;plot_Cn6 = wrf_map_overlays(a,wks,(/contour_Cn6/),pltres,res)<BR>&gt;<BR>&gt; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ; delete(contour_Nd)<BR>&gt; &nbsp; &nbsp; &nbsp; ; delete(contour_Cn1)<BR>&gt;<BR>&gt; &nbsp; &nbsp; &nbsp; ; map = wrf_map(wks,a,res)<BR>&gt; &nbsp; &nbsp; &nbsp; ; overlay(map,contour_Nd)<BR>&gt; &nbsp; &nbsp; &nbsp; ; overlay(map,contour_Cn1)<BR>&gt; &nbsp; &nbsp; &nbsp; ; overlay(plot0,plot3)<BR>&gt; &nbsp; &nbsp; &nbsp; ; gsn_panel(wks,plots,(/3,2/),True)<BR>&gt; &nbsp; &nbsp; &nbsp; &nbsp;; draw(plot)<BR>&gt; &nbsp; &nbsp; &nbsp; ; frame(wks)<BR>&gt; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;end do<BR>&gt; &nbsp; &nbsp; end do<BR>&gt;<BR>&gt; &nbsp;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 mce_href="http://mailman.ucar.edu/mailman/listinfo/ncl-talk">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 mce_href="http://mailman.ucar.edu/pipermail/ncl-talk/attachments/20140804/be554295/attachment-0001.html">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" mce_href="mailto:haley@ucar.edu">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" mce_href="mailto:zmumba@yahoo.com">zmumba@yahoo.com</A>&gt;<BR>Cc: "<A href="mailto:ncl-talk@ucar.edu" mce_href="mailto:ncl-talk@ucar.edu">ncl-talk@ucar.edu</A>" &lt;<A href="mailto:ncl-talk@ucar.edu" mce_href="mailto:ncl-talk@ucar.edu">ncl-talk@ucar.edu</A>&gt;<BR>Message-ID:<BR>&nbsp; &nbsp; &nbsp; &nbsp; &lt;<A href="mailto:CACNN_CJySFTTZvaJQbpnCE%2BN3mBi3BncJCF7RxZHxgMmDd41nQ@mail.gmail.com" mce_href="mailto:CACNN_CJySFTTZvaJQbpnCE%2BN3mBi3BncJCF7RxZHxgMmDd41nQ@mail.gmail.com">CACNN_CJySFTTZvaJQbpnCE+N3mBi3BncJCF7RxZHxgMmDd41nQ@mail.gmail.com</A>&gt;<BR>Content-Type: text/plain; charset="utf-8"<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 "wrf_map_overlays"<BR>didn't work for you, but it would help if you explain how it didn't work.<BR>&nbsp;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 mce_href="http://www.ncl.ucar.edu/Applications/wrfgsn.shtml">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. &nbsp;It shows how to use both gsn_csm_xxx scripts, or wrf_xxxx<BR>scripts. &nbsp;It's up to you which one you want.<BR><BR>Please look at these examples and try one of them. &nbsp;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" mce_href="mailto:zmumba@yahoo.com">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 mce_href="http://00.nc">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 mce_href="https://www.dropbox.com/s/aeoqmfgrk6pbd99/wrfout_d01_2014-07-29_00%5E%2500%5E%2500.nc">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 mce_href="http://www.dropbox.com">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 mce_href="https://www.dropbox.com/s/aeoqmfgrk6pbd99/wrfout_d01_2014-07-29_00%5E%2500%5E%2500.nc">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 "wrf_map_overlay" 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 mce_href="https://www.ncl.ucar.edu/Document/Functions/WRF_arw/wrf_map_overlays.shtml">https://www.ncl.ucar.edu/Document/Functions/WRF_arw/wrf_map_overlays.shtml</A>&gt; both<BR>&gt; don't work for me, only modification being the filename (which works in<BR>&gt; grads)<BR>&gt; 2. &nbsp;I have tried the "Getting_started example 5"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 mce_href="https://www.ncl.ucar.edu/Document/Manuals/Getting_Started/Examples/gsun05n.shtml">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_*" examples found at<BR>&gt; <A href="https://www.ncl.ucar.edu/Applications/Scripts/overlay_1.ncl" target=_blank mce_href="https://www.ncl.ucar.edu/Applications/Scripts/overlay_1.ncl">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:["Execute.c":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; ; &nbsp; - Overlaying line contours on filled contours<BR>&gt; ; &nbsp; - Explicitly setting contour levels<BR>&gt; ; &nbsp; - Selecting a different color map<BR>&gt; ;<BR>&gt; ;*************************************************<BR>&gt;<BR>&gt; load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/gsn_code.ncl"<BR>&gt; load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/gsn_csm.ncl"<BR>&gt;<BR>&gt; begin<BR>&gt; &nbsp; a = addfile("wrfout_d01_2014-07-29_00:00:<A href="http://00.nc/" target=_blank mce_href="http://00.nc">00.nc</A>","r")<BR>&gt; &nbsp; temp = a-&gt;T(0,{500},:,:)<BR>&gt; &nbsp; uwnd = a-&gt;U(0,{500},:,:)<BR>&gt;<BR>&gt; &nbsp; wks = gsn_open_wks("ps","overlay")<BR>&gt; &nbsp; gsn_define_colormap(wks,"BlueDarkRed18") &nbsp; &nbsp;; use the BlueDarkRed18<BR>&gt; colormap<BR>&gt;<BR>&gt; &nbsp; res = True<BR>&gt; &nbsp; res@mpFillOn = False<BR>&gt; &nbsp; res@mpMaxLatF = &nbsp;-4.07 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;; specify the plot domain<BR>&gt; &nbsp; res@mpMinLatF = -21.9 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ;<BR>&gt; &nbsp; res@mpMinLonF = &nbsp;17.25 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;;<BR>&gt; &nbsp; res@mpMaxLonF = &nbsp;38.44 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;;<BR>&gt; &nbsp; sres@gsnFrame = False &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ; do not advance the frame<BR>&gt; &nbsp; sres@cnLevelSelectionMode = "ExplicitLevels" ; use explicit levels<BR>&gt; &nbsp; sres@cnLevels = ispan(-5,35,5) &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;; set the contour levels<BR>&gt;<BR>&gt; &nbsp; plot = gsn_csm_contour_map(wks,temp,res) &nbsp; &nbsp;; create the temperature plot<BR>&gt; &nbsp; plot_ov = gsn_csm_contour(wks,uwnd,sres) &nbsp; &nbsp;; create the U-wind plot<BR>&gt; &nbsp; overlay(plot,plot_ov) &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ; overlay the U-wind plot on<BR>&gt; the temperature plot<BR>&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>&gt; (with the U-wind plot overlaid)<BR>&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>&gt; end<BR>&gt;<BR>&gt; &nbsp; res@mpOutlineOn = True &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;; turn the map<BR>&gt; outline on<BR>&gt; &nbsp; res@gsnDraw &nbsp; &nbsp; &nbsp;= &nbsp;False &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ; 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 mce_href="https://www.ncl.ucar.edu/Document/Manuals/Getting_Started/Examples/gsun05n.shtml">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 mce_href="https://www.ncl.ucar.edu/Document/Manuals/Getting_Started/Examples/gsun05n.shtml">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 mce_href="http://www.ncl.ucar.edu">www.ncl.ucar.edu</A><BR>&gt; &lt;<A href="https://www.ncl.ucar.edu/Document/Manuals/Getting_Started/Examples/gsun05n.shtml" target=_blank mce_href="https://www.ncl.ucar.edu/Document/Manuals/Getting_Started/Examples/gsun05n.shtml">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 mce_href="https://www.ncl.ucar.edu/Document/Functions/WRF_arw/wrf_map_overlays.shtml">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 mce_href="http://www.ncl.ucar.edu">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 mce_href="https://www.ncl.ucar.edu/Document/Functions/WRF_arw/wrf_map_overlays.shtml">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 mce_href="http://mailman.ucar.edu/mailman/listinfo/ncl-talk">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 mce_href="http://mailman.ucar.edu/pipermail/ncl-talk/attachments/20140804/2718eee8/attachment-0001.html">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" mce_href="mailto:shea@ucar.edu">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" mce_href="mailto:yuqiangzhang.thu@gmail.com">yuqiangzhang.thu@gmail.com</A>&gt;<BR>Cc: NCL &lt;<A href="mailto:ncl-talk@ucar.edu" mce_href="mailto:ncl-talk@ucar.edu">ncl-talk@ucar.edu</A>&gt;<BR>Message-ID:<BR>&nbsp; &nbsp; &nbsp; &nbsp; &lt;<A href="mailto:CAOF1d_4_aU1aywjH6CZvfAskDg276GTDvL%2B3c6hhZeDPHYM2RQ@mail.gmail.com" mce_href="mailto:CAOF1d_4_aU1aywjH6CZvfAskDg276GTDvL%2B3c6hhZeDPHYM2RQ@mail.gmail.com">CAOF1d_4_aU1aywjH6CZvfAskDg276GTDvL+3c6hhZeDPHYM2RQ@mail.gmail.com</A>&gt;<BR>Content-Type: text/plain; charset="utf-8"<BR><BR>"ListSet Type" could be used &nbsp;but the following may be easier.<BR><A href="https://www.ncl.ucar.edu/Document/Functions/Built-in/ListSetType.shtml" target=_blank mce_href="https://www.ncl.ucar.edu/Document/Functions/Built-in/ListSetType.shtml">https://www.ncl.ucar.edu/Document/Functions/Built-in/ListSetType.shtml</A><BR><BR>Also, your dats is type "short"<BR><A href="https://www.ncl.ucar.edu/Document/Functions/Contributed/short2flt.shtml" target=_blank mce_href="https://www.ncl.ucar.edu/Document/Functions/Contributed/short2flt.shtml">https://www.ncl.ucar.edu/Document/Functions/Contributed/short2flt.shtml</A><BR><BR>========<BR>Please see 'addfiles'<BR><BR><A href="https://www.ncl.ucar.edu/Document/Functions/Built-in/addfiles.shtml" target=_blank mce_href="https://www.ncl.ucar.edu/Document/Functions/Built-in/addfiles.shtml">https://www.ncl.ucar.edu/Document/Functions/Built-in/addfiles.shtml</A><BR><BR>===<BR>&nbsp; &nbsp;scrDir0 = "/d1/zhangg/prec/"<BR>&nbsp; &nbsp;scrFile0= systemfunc("cd "+ scrDir0 +" ; ls<BR>TPCAS-CMFD_V0105_B-01_"+year+".nc"<BR>&nbsp; &nbsp;print(srcFile0)<BR><BR>&nbsp; &nbsp;na = addfiles(srcDir0+srcFile0, "r")<BR><BR>* &nbsp; pp = short2flt( na[:}-&gt;prec(:,107,302))*<BR><BR>* &nbsp; 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" mce_href="mailto:yuqiangzhang.thu@gmail.com">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" mce_href="mailto:ncl-talk-bounces@ucar.edu">ncl-talk-bounces@ucar.edu</A> [mailto:<A href="mailto:ncl-talk-bounces@ucar.edu" mce_href="mailto:ncl-talk-bounces@ucar.edu">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'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; &nbsp; &nbsp; prec:scale_factor = 0.002f ;<BR>&gt;<BR>&gt; &nbsp; &nbsp; prec:add_offset = 50.f ;<BR>&gt;<BR>&gt; &nbsp; &nbsp; prec:_Fill_Value = -32767s ;<BR>&gt;<BR>&gt; &nbsp; &nbsp; prec:missing_value = -32767s ;<BR>&gt;<BR>&gt; &nbsp; &nbsp; prec:units = "mm hr-1" ;<BR>&gt;<BR>&gt; &nbsp; &nbsp; prec:long_name = "Precipitation rate" ;<BR>&gt;<BR>&gt;<BR>&gt;<BR>&gt;<BR>&gt;<BR>&gt; &nbsp;year = 2008<BR>&gt;<BR>&gt; &nbsp;mon = 12<BR>&gt;<BR>&gt; &nbsp;nhour = new(mon,integer)<BR>&gt;<BR>&gt;<BR>&gt;<BR>&gt; &nbsp; if(year .eq. 2008) then<BR>&gt;<BR>&gt; &nbsp; &nbsp;day_leap &nbsp; &nbsp;= (/31,29,31,30,31,30,31,31,30,31,30,31/)<BR>&gt;<BR>&gt; &nbsp; &nbsp;do i = 0,mon-1<BR>&gt;<BR>&gt; &nbsp; &nbsp; &nbsp; nhour(i) = day_leap(i)*8<BR>&gt;<BR>&gt; &nbsp; &nbsp;end do<BR>&gt;<BR>&gt; &nbsp; else<BR>&gt;<BR>&gt; &nbsp; &nbsp;day_nonleap = (/31,28,31,30,31,30,31,31,30,31,30,31/)<BR>&gt;<BR>&gt; &nbsp; &nbsp;do i = 0,mon-1<BR>&gt;<BR>&gt; &nbsp; &nbsp; &nbsp;nhour(i) = day_nonleap(i)*8<BR>&gt;<BR>&gt; &nbsp; &nbsp;end do<BR>&gt;<BR>&gt; &nbsp; end if<BR>&gt;<BR>&gt;<BR>&gt;<BR>&gt; *pp = &nbsp;new((/12,nhour/),float)*<BR>&gt;<BR>&gt; do imon = 1,12<BR>&gt;<BR>&gt; &nbsp; &nbsp; &nbsp;if(imon.lt.10) then<BR>&gt;<BR>&gt; &nbsp; &nbsp; &nbsp; &nbsp;mon3 = "0"+imon<BR>&gt;<BR>&gt; &nbsp; &nbsp; &nbsp;else<BR>&gt;<BR>&gt; &nbsp; &nbsp; &nbsp; &nbsp;mon3 = ""+imon<BR>&gt;<BR>&gt; &nbsp; &nbsp; &nbsp;end if<BR>&gt;<BR>&gt; &nbsp; &nbsp; &nbsp;scrDir0 = "/d1/zhangg/prec/"<BR>&gt;<BR>&gt; &nbsp; &nbsp;do ifl = 0,nhour(imon-1)-1<BR>&gt;<BR>&gt; &nbsp; &nbsp; &nbsp;na &nbsp;=<BR>&gt; addfile(scrDir0+"prec_ITPCAS-CMFD_V0105_B-01_"+year+mon3+".nc","r")<BR>&gt;<BR>&gt; &nbsp; &nbsp;* pp(imon-1,ifl) &nbsp;= na-&gt;prec(:,107,302)*<BR>&gt;<BR>&gt; &nbsp; &nbsp;end do<BR>&gt;<BR>&gt; &nbsp; 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 mce_href="http://mailman.ucar.edu/mailman/listinfo/ncl-talk">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 mce_href="http://mailman.ucar.edu/pipermail/ncl-talk/attachments/20140804/5bf2441c/attachment-0001.html">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" mce_href="mailto:lvargo@unm.edu">lvargo@unm.edu</A>&gt;<BR>Subject: [ncl-talk] Using a loop to find values greater than 0<BR>&nbsp; &nbsp; &nbsp; &nbsp; (calculate &nbsp; &nbsp; &nbsp;PDD)<BR>To: "<A href="mailto:ncl-talk@ucar.edu" mce_href="mailto:ncl-talk@ucar.edu">ncl-talk@ucar.edu</A>" &lt;<A href="mailto:ncl-talk@ucar.edu" mce_href="mailto:ncl-talk@ucar.edu">ncl-talk@ucar.edu</A>&gt;<BR>Message-ID: &lt;<A href="mailto:70D79029-3BC6-4860-8081-E5C280D91F93@unm.edu" mce_href="mailto:70D79029-3BC6-4860-8081-E5C280D91F93@unm.edu">70D79029-3BC6-4860-8081-E5C280D91F93@unm.edu</A>&gt;<BR>Content-Type: text/plain; charset="Windows-1252"<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". 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 "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 "$NCARG_ROOT/lib/ncarg/nclscripts/csm/gsn_code.ncl"<BR>load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/gsn_csm.ncl"<BR>load ?$NCARG_ROOT/lib/ncarg/nclscripts/csm/contributed.ncl"<BR>load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/shea_util.ncl"<BR><BR>begin<BR><BR>; Read in near surface air temperature (Ta)<BR><BR>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; a = addfile("tas_day_CCSM4_lgm_r2i1p1_18700101-19001231.nc","r")<BR>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; tasL = a-&gt;tas(0:364,:,:)<BR>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; tasC = tasL - 273.15 ; Convert K to C<BR>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; print (tasC)<BR>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; printVarSummary (tasC)<BR><BR>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; do tasC = 0,364<BR>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; if (tasC .le. 0)<BR>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; H = 0<BR>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; end if<BR>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; end do<BR><BR>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; 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" mce_href="mailto:shea@ucar.edu">shea@ucar.edu</A>&gt;<BR>Subject: Re: [ncl-talk] Using a loop to find values greater than 0<BR>&nbsp; &nbsp; &nbsp; &nbsp; (calculate PDD)<BR>To: Lauren Jean Vargo &lt;<A href="mailto:lvargo@unm.edu" mce_href="mailto:lvargo@unm.edu">lvargo@unm.edu</A>&gt;<BR>Cc: "<A href="mailto:ncl-talk@ucar.edu" mce_href="mailto:ncl-talk@ucar.edu">ncl-talk@ucar.edu</A>" &lt;<A href="mailto:ncl-talk@ucar.edu" mce_href="mailto:ncl-talk@ucar.edu">ncl-talk@ucar.edu</A>&gt;<BR>Message-ID:<BR>&nbsp; &nbsp; &nbsp; &nbsp; &lt;CAOF1d_5=0d_Fd0HP_1aOnzafkOmiScwouqZhZbD=<A href="mailto:dSzzozwDbw@mail.gmail.com" mce_href="mailto:dSzzozwDbw@mail.gmail.com">dSzzozwDbw@mail.gmail.com</A>&gt;<BR>Content-Type: text/plain; charset="utf-8"<BR><BR>The variable, tasC, is an *array *<BR><BR>&nbsp; &nbsp;tasC = tasL - 273.15 ; Convert K to C<BR>&nbsp; &nbsp;printVarSummary(tasC)<BR><BR>You can not use an array as a loop variable ... in any language.<BR><BR>&nbsp; do tasC = 0,364<BR><BR>could be, say,<BR><BR>&nbsp; do day = 0,364<BR><BR>See:<BR><A href="https://www.ncl.ucar.edu/Document/Manuals/Ref_Manual/NclStatements.shtml#Loops" target=_blank mce_href="https://www.ncl.ucar.edu/Document/Manuals/Ref_Manual/NclStatements.shtml#Loops">https://www.ncl.ucar.edu/Document/Manuals/Ref_Manual/NclStatements.shtml#Loops</A><BR><BR>Specifically:<BR><BR>&nbsp; do *loop_identifier* = *scalar_start_expr* ,<BR><BR>*end_expr*<BR><BR>*T*he "scalar_start_expr , end_expr" are scalar.<BR><BR><BR><BR>===<BR><BR>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;a = addfile("tas_day_CCSM4_lgm_<BR><A href="http://r2i1p1_18700101-19001231.nc/" target=_blank mce_href="http://r2i1p1_18700101-19001231.nc">r2i1p1_18700101-19001231.nc</A>","r")<BR>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; tasL &nbsp;= a-&gt;tas(0:364,:,:)<BR><BR>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; TIME = cd_calendar(tasL&amp;time,0) &nbsp; ; TIME(ntim,6)<BR>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; print(TIME)<BR><BR>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; tasC = tasL - 273.15 ; Convert K to C<BR>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; tasC = where(tasC.gt.0.0, tasc, 0.0)<BR>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; pdd &nbsp;= dim_sum_n_Wrap(tasC, 0) &nbsp; &nbsp; &nbsp; ; (lat,lon)<BR>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; pdd@long_name = "degree days for year="+toint(TIME(0,0))<BR>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; pdd@units = "degC"<BR><BR><BR><BR><BR>On Mon, Aug 4, 2014 at 9:16 AM, Lauren Jean Vargo &lt;<A href="mailto:lvargo@unm.edu" mce_href="mailto:lvargo@unm.edu">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".<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 "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 "$NCARG_ROOT/lib/ncarg/nclscripts/csm/gsn_code.ncl"<BR>&gt; load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/gsn_csm.ncl"<BR>&gt; load ?$NCARG_ROOT/lib/ncarg/nclscripts/csm/contributed.ncl"<BR>&gt; load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/shea_util.ncl"<BR>&gt;<BR>&gt; begin<BR>&gt;<BR>&gt; ; Read in near surface air temperature (Ta)<BR>&gt;<BR>&gt; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; a =<BR>&gt; addfile("tas_day_CCSM4_lgm_r2i1p1_18700101-19001231.nc","r")<BR>&gt; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; tasL = a-&gt;tas(0:364,:,:)<BR>&gt; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; tasC = tasL - 273.15 ; Convert K to C<BR>&gt; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; print (tasC)<BR>&gt; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; printVarSummary (tasC)<BR>&gt;<BR>&gt; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; do tasC = 0,364<BR>&gt; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; if (tasC .le. 0)<BR>&gt; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; H = 0<BR>&gt; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; end if<BR>&gt; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; end do<BR>&gt;<BR>&gt; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; 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 mce_href="http://mailman.ucar.edu/mailman/listinfo/ncl-talk">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 mce_href="http://mailman.ucar.edu/pipermail/ncl-talk/attachments/20140804/571eb834/attachment-0001.html">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" mce_href="mailto:ksgriffin2@wisc.edu">ksgriffin2@wisc.edu</A>&gt;<BR>Subject: Re: [ncl-talk] Using a loop to find values greater than 0<BR>&nbsp; &nbsp; &nbsp; &nbsp; (calculate PDD)<BR>To: Lauren Jean Vargo &lt;<A href="mailto:lvargo@unm.edu" mce_href="mailto:lvargo@unm.edu">lvargo@unm.edu</A>&gt;<BR>Cc: "<A href="mailto:ncl-talk@ucar.edu" mce_href="mailto:ncl-talk@ucar.edu">ncl-talk@ucar.edu</A>" &lt;<A href="mailto:ncl-talk@ucar.edu" mce_href="mailto:ncl-talk@ucar.edu">ncl-talk@ucar.edu</A>&gt;<BR>Message-ID:<BR>&nbsp; &nbsp; &nbsp; &nbsp; &lt;CAKt9o=gyy9Wtwyuv3J32VTubo9zrZVmFFh5LAuN5oju5F6=<A href="mailto:8bg@mail.gmail.com" mce_href="mailto:8bg@mail.gmail.com">8bg@mail.gmail.com</A>&gt;<BR>Content-Type: text/plain; charset="utf-8"<BR><BR>This also sounds like an ideal spot for implementing the 'where' function.<BR><BR><A href="https://www.ncl.ucar.edu/Document/Functions/Built-in/where.shtml" target=_blank mce_href="https://www.ncl.ucar.edu/Document/Functions/Built-in/where.shtml">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" mce_href="mailto:ksgriffin2@wisc.edu">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" mce_href="mailto:shea@ucar.edu">shea@ucar.edu</A>&gt; wrote:<BR><BR>&gt; The variable, tasC, is an *array *<BR>&gt;<BR>&gt; &nbsp; &nbsp;tasC = tasL - 273.15 ; Convert K to C<BR>&gt; &nbsp; &nbsp;printVarSummary(tasC)<BR>&gt;<BR>&gt; You can not use an array as a loop variable ... in any language.<BR>&gt;<BR>&gt; &nbsp; do tasC = 0,364<BR>&gt;<BR>&gt; could be, say,<BR>&gt;<BR>&gt; &nbsp; 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 mce_href="https://www.ncl.ucar.edu/Document/Manuals/Ref_Manual/NclStatements.shtml#Loops">https://www.ncl.ucar.edu/Document/Manuals/Ref_Manual/NclStatements.shtml#Loops</A><BR>&gt;<BR>&gt; Specifically:<BR>&gt;<BR>&gt; &nbsp; do *loop_identifier* = *scalar_start_expr* ,<BR>&gt;<BR>&gt; *end_expr*<BR>&gt;<BR>&gt; *T*he "scalar_start_expr , end_expr" are scalar.<BR>&gt;<BR>&gt;<BR>&gt;<BR>&gt; ===<BR>&gt;<BR>&gt; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;a = addfile("tas_day_CCSM4_lgm_<BR>&gt; <A href="http://r2i1p1_18700101-19001231.nc/" target=_blank mce_href="http://r2i1p1_18700101-19001231.nc">r2i1p1_18700101-19001231.nc</A>","r")<BR>&gt; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; tasL &nbsp;= a-&gt;tas(0:364,:,:)<BR>&gt;<BR>&gt; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; TIME = cd_calendar(tasL&amp;time,0) &nbsp; ; TIME(ntim,6)<BR>&gt; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; print(TIME)<BR>&gt;<BR>&gt; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; tasC = tasL - 273.15 ; Convert K to C<BR>&gt; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; tasC = where(tasC.gt.0.0, tasc, 0.0)<BR>&gt; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; pdd &nbsp;= dim_sum_n_Wrap(tasC, 0) &nbsp; &nbsp; &nbsp; ; (lat,lon)<BR>&gt; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; pdd@long_name = "degree days for year="+toint(TIME(0,0))<BR>&gt; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; pdd@units = "degC"<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" mce_href="mailto:lvargo@unm.edu">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".<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 "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 "$NCARG_ROOT/lib/ncarg/nclscripts/csm/gsn_code.ncl"<BR>&gt;&gt; load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/gsn_csm.ncl"<BR>&gt;&gt; load ?$NCARG_ROOT/lib/ncarg/nclscripts/csm/contributed.ncl"<BR>&gt;&gt; load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/shea_util.ncl"<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; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; a =<BR>&gt;&gt; addfile("tas_day_CCSM4_lgm_r2i1p1_18700101-19001231.nc","r")<BR>&gt;&gt; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; tasL = a-&gt;tas(0:364,:,:)<BR>&gt;&gt; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; tasC = tasL - 273.15 ; Convert K to C<BR>&gt;&gt; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; print (tasC)<BR>&gt;&gt; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; printVarSummary (tasC)<BR>&gt;&gt;<BR>&gt;&gt; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; do tasC = 0,364<BR>&gt;&gt; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; if (tasC .le. 0)<BR>&gt;&gt; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; H = 0<BR>&gt;&gt; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; end if<BR>&gt;&gt; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; end do<BR>&gt;&gt;<BR>&gt;&gt; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; 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 mce_href="http://mailman.ucar.edu/mailman/listinfo/ncl-talk">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 mce_href="http://mailman.ucar.edu/mailman/listinfo/ncl-talk">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 mce_href="http://mailman.ucar.edu/pipermail/ncl-talk/attachments/20140804/17872935/attachment-0001.html">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" mce_href="mailto:haley@ucar.edu">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" mce_href="mailto:mnotaro@wisc.edu">mnotaro@wisc.edu</A>&gt;<BR>Cc: "<A href="mailto:ncl-talk@ucar.edu" mce_href="mailto:ncl-talk@ucar.edu">ncl-talk@ucar.edu</A>" &lt;<A href="mailto:ncl-talk@ucar.edu" mce_href="mailto:ncl-talk@ucar.edu">ncl-talk@ucar.edu</A>&gt;<BR>Message-ID:<BR>&nbsp; &nbsp; &nbsp; &nbsp; &lt;<A href="mailto:CACNN_CJk8ojmqz8L3oqZiTw2ERjJF6S3xmwprTO--fT7jtnTSQ@mail.gmail.com" mce_href="mailto:CACNN_CJk8ojmqz8L3oqZiTw2ERjJF6S3xmwprTO--fT7jtnTSQ@mail.gmail.com">CACNN_CJk8ojmqz8L3oqZiTw2ERjJF6S3xmwprTO--fT7jtnTSQ@mail.gmail.com</A>&gt;<BR>Content-Type: text/plain; charset="utf-8"<BR><BR>Hi Michael,<BR><BR>I really don't have any idea about this one. &nbsp;We did fix a bug in V6.1.2<BR>that caused thin white lines to show up, but this doesn'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" mce_href="mailto:mnotaro@wisc.edu">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("ps","bar_revised2")<BR>&gt;<BR>&gt; gsn_define_colormap(wks, "NCV_blue_red")<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 = "PreDraw"<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 = "ManualLevels"<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; &nbsp;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; &nbsp;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; &nbsp;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; &nbsp;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; &nbsp;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; &nbsp;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; &nbsp;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; &nbsp;res@gsnSpreadColorStart=120<BR>&gt;<BR>&gt; &nbsp;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; &nbsp;res@gsnSpreadColorStart=255<BR>&gt;<BR>&gt; &nbsp;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; &nbsp;ratio=fabs(lower)/fabs(upper)<BR>&gt;<BR>&gt; &nbsp;res@gsnSpreadColorStart=255<BR>&gt;<BR>&gt; &nbsp;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 mce_href="http://mailman.ucar.edu/mailman/listinfo/ncl-talk">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 mce_href="http://mailman.ucar.edu/pipermail/ncl-talk/attachments/20140804/8f82b7fe/attachment-0001.html">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" mce_href="mailto:haley@ucar.edu">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" mce_href="mailto:mohegh@usc.edu">mohegh@usc.edu</A>&gt;<BR>Cc: ncl-talk &lt;<A href="mailto:ncl-talk@ucar.edu" mce_href="mailto:ncl-talk@ucar.edu">ncl-talk@ucar.edu</A>&gt;<BR>Message-ID:<BR>&nbsp; &nbsp; &nbsp; &nbsp; &lt;CACNN_CLmsqp6fP8Q50GDM=<A href="mailto:ebG%2B4RZhFgugzK8c04fHkeExH-3A@mail.gmail.com" mce_href="mailto:ebG%2B4RZhFgugzK8c04fHkeExH-3A@mail.gmail.com">ebG+4RZhFgugzK8c04fHkeExH-3A@mail.gmail.com</A>&gt;<BR>Content-Type: text/plain; charset="utf-8"<BR><BR>Hi,<BR><BR>You can use a combination of shapefiles and the "gc_inout" 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 mce_href="http://gadm.org/country">gadm.org/country</A>, and then look at example "shapefiles_13.ncl" at:<BR><BR><A href="http://www.ncl.ucar.edu/Applications/shapefiles.shtml#ex13" target=_blank mce_href="http://www.ncl.ucar.edu/Applications/shapefiles.shtml#ex13">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, "<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 mce_href="http://www.ncl.ucar.edu/Applications/Scripts/Germany_coastal_counties_DEU_adm.ncl">http://www.ncl.ucar.edu/Applications/Scripts/Germany_coastal_counties_DEU_adm.ncl</A>&gt;<BR>".<BR><BR>The "shapefiles_13.ncl" example only does the counties of Georgia. &nbsp;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" mce_href="mailto:mohegh@usc.edu">mohegh@usc.edu</A>&gt;<BR>wrote:<BR><BR>&gt;<BR>&gt; Hi<BR>&gt;<BR>&gt; I'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'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" mce_href="mailto:mohegh@usc.edu">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 mce_href="http://mailman.ucar.edu/mailman/listinfo/ncl-talk">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 mce_href="http://mailman.ucar.edu/pipermail/ncl-talk/attachments/20140804/8992036d/attachment-0001.html">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" mce_href="mailto:ncl-talk@ucar.edu">ncl-talk@ucar.edu</A><BR><A href="http://mailman.ucar.edu/mailman/listinfo/ncl-talk" target=_blank mce_href="http://mailman.ucar.edu/mailman/listinfo/ncl-talk">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>&nbsp;<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> :&nbsp;</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>
电话:(+86)021-64391966 <BR>
传真:(+86)021-64391966 <BR>
============================
</body>
</html>