Dear Marco<div><br></div><div>Thanks alot. But can you tell me if I can install PyNGL via pip install. I am trying to install on Linux and user permissions from our administrator donot allow me to install conda.</div><div><br></div><div>Also can I find some video tutorials and are there any trainings online that I can attend </div><div><br></div><div>Thank you once again </div><div><br></div><div><br><br>On Saturday, December 5, 2020, Marco Miani via ncl-talk <<a href="mailto:ncl-talk@mailman.ucar.edu">ncl-talk@mailman.ucar.edu</a>> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div lang="EN-GB" link="blue" vlink="#954F72">
<div>
<p class="MsoNormal">Hi Ali, </p>
<p class="MsoNormal"><u></u> <u></u></p>
<p class="MsoNormal">Python has something called PyNGL which, as the name suggests, is a python based NCL platform.
</p>
<p class="MsoNormal">The structure is very similar to pure NCL, and so is the slicing of data:
</p>
<p class="MsoNormal"><u></u> <u></u></p>
<p class="MsoNormal">At the bottom of this message, I enclose a little snippet. </p>
<p class="MsoNormal">More infos can be found here, on the official webpage: <br>
<a href="https://www.pyngl.ucar.edu/" target="_blank">https://www.pyngl.ucar.edu/</a></p>
<p class="MsoNormal"><u></u> <u></u></p>
<p class="MsoNormal">Did this help? <br>
Bye</p>
<p class="MsoNormal"><u></u> <u></u></p>
<p class="MsoNormal">Marco </p>
<p class="MsoNormal"><u></u> <u></u></p>
<p class="MsoNormal"><u></u> <u></u></p>
<p class="MsoNormal"><u></u> <u></u></p>
<pre><span style="color:black">#<u></u><u></u></span></pre>
<pre><span style="color:black"># File:<u></u><u></u></span></pre>
<pre><span style="color:black"># newcolor1.py<u></u><u></u></span></pre>
<pre><span style="color:black">#<u></u><u></u></span></pre>
<pre><span style="color:black"># Synopsis:<u></u><u></u></span></pre>
<pre><span style="color:black"># Illustrates new color capabilities in PyNGL 1.5.0.<u></u><u></u></span></pre>
<pre><span style="color:black">#<u></u><u></u></span></pre>
<pre><span style="color:black"># Categories:<u></u><u></u></span></pre>
<pre><span style="color:black"># Contouring<u></u><u></u></span></pre>
<pre><span style="color:black">#<u></u><u></u></span></pre>
<pre><span style="color:black"># Author:<u></u><u></u></span></pre>
<pre><span style="color:black"># Mary Haley<u></u><u></u></span></pre>
<pre><span style="color:black"># <u></u><u></u></span></pre>
<pre><span style="color:black"># Date of initial publication:<u></u><u></u></span></pre>
<pre><span style="color:black"># November 2012<u></u><u></u></span></pre>
<pre><span style="color:black">#<u></u><u></u></span></pre>
<pre><span style="color:black"># Description:<u></u><u></u></span></pre>
<pre><span style="color:black"># This example shows how to use the new cnFillPalette resource.<u></u><u></u></span></pre>
<pre><span style="color:black">#<u></u><u></u></span></pre>
<pre><span style="color:black"># Effects illustrated:<u></u><u></u></span></pre>
<pre><span style="color:black"># o Using the new "cnFillPalette" resource.<u></u><u></u></span></pre>
<pre><span style="color:black"># o Using a named color without having to add it to color map<u></u><u></u></span></pre>
<pre><span style="color:black"># <u></u><u></u></span></pre>
<pre><span style="color:black"># Output:<u></u><u></u></span></pre>
<pre><span style="color:black"># This example produces one visualization<u></u><u></u></span></pre>
<pre><span style="color:black">#<u></u><u></u></span></pre>
<pre><span style="color:black"># Notes:<u></u><u></u></span></pre>
<pre><span style="color:black"># <u></u><u></u></span></pre>
<pre><span style="color:black">from __future__ import print_function<u></u><u></u></span></pre>
<pre><span style="color:black">import os, numpy<u></u><u></u></span></pre>
<pre><span style="color:black">import Ngl, Nio<u></u><u></u></span></pre>
<pre><span style="color:black"><u></u> <u></u></span></pre>
<pre><span style="color:black">#<u></u><u></u></span></pre>
<pre><span style="color:black"># Create some dummy data for the contour plot.<u></u><u></u></span></pre>
<pre><span style="color:black">#<u></u><u></u></span></pre>
<pre><span style="color:black">dirc = Ngl.pynglpath("data")<u></u><u></u></span></pre>
<pre><span style="color:black">f = Nio.open_file(os.path.join(<wbr>dirc,"cdf","<a href="http://uv300.nc" target="_blank">uv300.nc</a>"))<u></u><u></u></span></pre>
<pre><span style="color:black">u = f.variables["U"][1,:,:] # </span><span style="font-family:Wingdings;color:black">ß</span><span style="color:black">---Ali, this is what you are looking for! <u></u><u></u></span></pre>
<pre><span style="color:black">lat = f.variables["lat"][:]<u></u><u></u></span></pre>
<pre><span style="color:black">lon = f.variables["lon"][:]<u></u><u></u></span></pre>
<pre><span style="color:black"> <u></u><u></u></span></pre>
<pre><span style="color:black">wks_type = "png"<u></u><u></u></span></pre>
<pre><span style="color:black">wks = Ngl.open_wks(wks_type,"<wbr>newcolor1")<u></u><u></u></span></pre>
<pre><span style="color:black"><u></u> <u></u></span></pre>
<pre><span style="color:black">cnres = Ngl.Resources()<u></u><u></u></span></pre>
<pre><span style="color:black"><u></u> <u></u></span></pre>
<pre><span style="color:black"># Contour resources<u></u><u></u></span></pre>
<pre><span style="color:black">cnres.cnFillOn = True<u></u><u></u></span></pre>
<pre><span style="color:black">cnres.cnFillPalette = "BlueYellowRed" # New in PyNGL 1.5.0<u></u><u></u></span></pre>
<pre><span style="color:black">cnres.cnLinesOn = False<u></u><u></u></span></pre>
<pre><span style="color:black">cnres.cnLineLabelsOn = False<u></u><u></u></span></pre>
<pre><span style="color:black"><u></u> <u></u></span></pre>
<pre><span style="color:black"># Labelbar resource<u></u><u></u></span></pre>
<pre><span style="color:black">cnres.lbOrientation = "horizontal"<u></u><u></u></span></pre>
<pre><span style="color:black"><u></u> <u></u></span></pre>
<pre><span style="color:black"># Scalar field resources<u></u><u></u></span></pre>
<pre><span style="color:black">cnres.sfXArray = lon<u></u><u></u></span></pre>
<pre><span style="color:black">cnres.sfYArray = lat<u></u><u></u></span></pre>
<pre><span style="color:black"><u></u> <u></u></span></pre>
<pre><span style="color:black"># Map resources<u></u><u></u></span></pre>
<pre><span style="color:black">cnres.mpFillOn = True<u></u><u></u></span></pre>
<pre><span style="color:black">cnres.mpFillDrawOrder = "PostDraw"<u></u><u></u></span></pre>
<pre><span style="color:black">cnres.mpLandFillColor = "Gray"<u></u><u></u></span></pre>
<pre><span style="color:black">cnres.mpOceanFillColor = "Transparent"<u></u><u></u></span></pre>
<pre><span style="color:black">cnres.mpInlandWaterFillColor = "Transparent"<u></u><u></u></span></pre>
<pre><span style="color:black"><u></u> <u></u></span></pre>
<pre><span style="color:black">contour = Ngl.contour_map(wks,u,cnres)<u></u><u></u></span></pre>
<pre><span style="color:black"><u></u> <u></u></span></pre>
<pre><span style="color:black">Ngl.end()<u></u><u></u></span></pre>
<p class="MsoNormal"><u></u> <u></u></p>
<p class="MsoNormal"><u></u> <u></u></p>
<div>
<table border="0" cellspacing="3" cellpadding="0" style="background:white">
<tbody>
<tr>
<td colspan="2" style="padding:.75pt .75pt .75pt .75pt">
<p class="MsoNormal"><strong><span style="font-size:10.5pt;font-family:"Calibri",sans-serif;color:black">Marco Miani</span></strong><span style="font-size:10.5pt;color:black"><br>
Computational Support Specialist<br>
Climate and Atmosphere Research Center (CARE-C)<br>
The Cyprus Institute<br>
20 Konstantinou Kavafi Street, 2121, Nicosia, Cyprus<br>
<strong><span style="font-family:"Calibri",sans-serif">Tel:</span></strong> <a href="tel:+357%2022%20397%20561" target="_blank"><span style="border:none windowtext 1.0pt;padding:0cm">+357 22 397 561</span></a> | <strong><span style="font-family:"Calibri",sans-serif">Email:</span></strong> <a href="mailto:m.miani@cyi.ac.cy" target="_blank"><span style="border:none windowtext 1.0pt;padding:0cm">m.miani@cyi.ac.cy</span></a><br>
<strong><span style="font-family:"Calibri",sans-serif">Web:</span></strong> <a href="https://cyi.ac.cy/" target="_blank"><span style="border:none windowtext 1.0pt;padding:0cm">cyi.ac.cy</span></a> | <a href="https://emme-care.cyi.ac.cy/" target="_blank"><span style="border:none windowtext 1.0pt;padding:0cm">emme-care.<wbr>cyi.ac.cy</span></a><u></u><u></u></span></p>
</td>
</tr>
<tr>
<td style="padding:.75pt .75pt .75pt .75pt">
<div>
<p class="MsoNormal" style="vertical-align:baseline"><span style="font-size:10.5pt;color:black;border:none windowtext 1.0pt;padding:0cm">Follow us on </span><span style="color:black"><a href="https://www.facebook.com/CyprusInstitute/" target="_blank"><b><span style="color:black;text-decoration:none"><img border="0" width="18" height="18" style="width:.1916in;height:.1916in" src="cid:image004.png@01D6CB1E.950330C0"></span></b></a><a href="https://twitter.com/CyprusInstitute" target="_blank"><b><span style="color:black;text-decoration:none"><img border="0" width="18" height="18" style="width:.1916in;height:.1916in" src="cid:image005.png@01D6CB1E.950330C0"></span></b></a><a href="https://www.linkedin.com/company/the-cyprus-institute" target="_blank"><b><span style="color:black;text-decoration:none"><img border="0" width="18" height="18" style="width:.1916in;height:.1916in" src="cid:image006.png@01D6CB1E.950330C0"></span></b></a></span><span style="font-size:10.5pt;color:black"><u></u><u></u></span></p>
</div>
</td>
<td style="padding:.75pt .75pt .75pt .75pt"></td>
</tr>
<tr>
<td style="padding:.75pt .75pt .75pt .75pt">
<div>
<p class="MsoNormal" style="vertical-align:baseline"><span style="font-size:13.5pt;font-family:Webdings;color:#009900">P</span><span style="font-size:10.0pt;color:#009900"> <strong><span style="font-family:"Calibri",sans-serif">Please consider the environment
before printing this email</span></strong></span><span style="font-size:10.5pt;color:black"> <u></u><u></u></span></p>
</div>
</td>
<td style="padding:.75pt .75pt .75pt .75pt"></td>
</tr>
</tbody>
</table>
</div>
<p class="MsoNormal"><u></u> <u></u></p>
<p class="MsoNormal"><u></u> <u></u></p>
<div style="border:none;border-top:solid #e1e1e1 1.0pt;padding:3.0pt 0cm 0cm 0cm">
<p class="MsoNormal" style="border:none;padding:0cm"><b>From: </b><a href="mailto:ncl-talk-request@mailman.ucar.edu" target="_blank">ncl-talk-request@mailman.ucar.<wbr>edu</a><br>
<b>Sent: </b>04 December 2020 21:00<br>
<b>To: </b><a href="mailto:ncl-talk@mailman.ucar.edu" target="_blank">ncl-talk@mailman.ucar.edu</a><br>
<b>Subject: </b>ncl-talk Digest, Vol 205, Issue 5</p>
</div>
<p class="MsoNormal"><u></u> <u></u></p>
<p class="MsoNormal">Send ncl-talk mailing list submissions to<br>
<a href="mailto:ncl-talk@mailman.ucar.edu" target="_blank">ncl-talk@mailman.ucar.edu</a><br>
<br>
To subscribe or unsubscribe via the World Wide Web, visit<br>
<a href="https://mailman.ucar.edu/mailman/listinfo/ncl-talk" target="_blank">https://mailman.ucar.edu/<wbr>mailman/listinfo/ncl-talk</a><br>
or, via email, send a message with subject or body 'help' to<br>
<a href="mailto:ncl-talk-request@mailman.ucar.edu" target="_blank">ncl-talk-request@mailman.ucar.<wbr>edu</a><br>
<br>
You can reach the person managing the list at<br>
<a href="mailto:ncl-talk-owner@mailman.ucar.edu" target="_blank">ncl-talk-owner@mailman.ucar.<wbr>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>
1. Re: Setting X-axis for proper data plotting (Adam Phillips)<br>
2. Effective Degree of Freedom (dickson mbigi)<br>
3. Re: Plot csv file (Anahita Amiri Farahani)<br>
4. python transition (ali mughal)<br>
5. wrfout file reading (Anil Kumar - NOAA Affiliate)<br>
6. Re: wrfout file reading (Ehsan Taghizadeh)<br>
7. Re: wrfout file reading (Anil Kumar - NOAA Affiliate)<br>
8. Re: wrfout file reading (Anil Kumar - NOAA Affiliate)<br>
<br>
<br>
------------------------------<wbr>------------------------------<wbr>----------<br>
<br>
Message: 1<br>
Date: Thu, 3 Dec 2020 18:12:48 -0700<br>
From: Adam Phillips <<a href="mailto:asphilli@ucar.edu" target="_blank">asphilli@ucar.edu</a>><br>
To: "Herb, Jason" <<a href="mailto:jherb@albany.edu" target="_blank">jherb@albany.edu</a>><br>
Cc: "<a href="mailto:ncl-talk@ucar.edu" target="_blank">ncl-talk@ucar.edu</a>" <<a href="mailto:ncl-talk@ucar.edu" target="_blank">ncl-talk@ucar.edu</a>><br>
Subject: Re: [ncl-talk] Setting X-axis for proper data plotting<br>
Message-ID:<br>
<CACvWuqB=<a href="mailto:NnFQjPePoRUrrB%2BOkd74DLs%2BBj3-ttjcdTzjv_ONcg@mail.gmail.com" target="_blank">NnFQjPePoRUrrB+<wbr>Okd74DLs+Bj3-ttjcdTzjv_ONcg@<wbr>mail.gmail.com</a>><br>
Content-Type: text/plain; charset="utf-8"<br>
<br>
Hi Jason,<br>
Thank you for sending an easy-to-run script. I have attached a modified<br>
script along with the resulting graphic.<br>
Two things to note:<br>
1 - I altered your asciiread statement to read in the data as a double,<br>
that way you can see the correct time. I then manually created my own<br>
yyyymmddhh array from the original time. Note that I assumed that the data<br>
is regular and that there are not any missing timesteps from<br>
20061221-20191231.95833. Once I passed the yyyymmddhh array into<br>
yyyymmddhh_to_yyyyfrac I now have a regular time coordinate to pass into<br>
gsn_csm_xy. This alleviates the jumping you were getting in your plot.<br>
Please look at the print statement output and coding and make sure the<br>
assumptions I made are correct.<br>
<br>
2 - To get better control of the tick mark labels, I recommend setting<br>
tmXBMode = "Explicit", and setting tmXBValues/tmXBLabels. See the<br>
tickmarks application<br>
page <<a href="http://www.ncl.ucar.edu/Applications/tickmarks.shtml" target="_blank">http://www.ncl.ucar.edu/<wbr>Applications/tickmarks.shtml</a>> for other<br>
examples of using these resources.<br>
<br>
Hope that helps!<br>
Adam<br>
<br>
On Wed, Dec 2, 2020 at 2:39 PM Herb, Jason via ncl-talk <<br>
<a href="mailto:ncl-talk@mailman.ucar.edu" target="_blank">ncl-talk@mailman.ucar.edu</a>> wrote:<br>
<br>
> Hello All,<br>
><br>
> I have been working with a continuous data set from late 2006 to end of<br>
> 2019. I have been able to force the X-axis labeling as close as I can to<br>
> get year to whole numbers, but I keep getting ".0" at the end of the year.<br>
> Also, I have a plotting error in the actual data with the space containing<br>
> "flat lines" between the end or one year to the start of the next. I<br>
> attempted to setup another array for the year but get the following error<br>
> message :<br>
><br>
> fatal:Illegal subscript. Subscripts must be integer when not using<br>
> coordinate indexing<br>
> fatal:["Execute.c":8640]:<wbr>Execute: Error occurred at or near line 36 in<br>
> file Basiclineplot.ncl<br>
><br>
> I have attached the plot, script and input file.<br>
> Does anyone have any suggestions to assist with this plotting issue?<br>
><br>
> Thanks,<br>
> Jason<br>
> ______________________________<wbr>_________________<br>
> ncl-talk mailing list<br>
> <a href="mailto:ncl-talk@mailman.ucar.edu" target="_blank">ncl-talk@mailman.ucar.edu</a><br>
> List instructions, subscriber options, unsubscribe:<br>
> <a href="https://mailman.ucar.edu/mailman/listinfo/ncl-talk" target="_blank">https://mailman.ucar.edu/<wbr>mailman/listinfo/ncl-talk</a><br>
<br>
<br>
<br>
-- <br>
Adam Phillips<br>
Associate Scientist, Climate and Global Dynamics Laboratory, NCAR<br>
<a href="http://www.cgd.ucar.edu/staff/asphilli/" target="_blank">www.cgd.ucar.edu/staff/<wbr>asphilli/</a> 303-497-1726<br>
<br>
<<a href="http://www.cgd.ucar.edu/staff/asphilli" target="_blank">http://www.cgd.ucar.edu/<wbr>staff/asphilli</a>><br>
-------------- next part --------------<br>
An HTML attachment was scrubbed...<br>
URL: <<a href="https://mailman.ucar.edu/pipermail/ncl-talk/attachments/20201203/6db121df/attachment-0001.html" target="_blank">https://mailman.ucar.edu/<wbr>pipermail/ncl-talk/<wbr>attachments/20201203/6db121df/<wbr>attachment-0001.html</a>><br>
-------------- next part --------------<br>
A non-text attachment was scrubbed...<br>
Name: test.png<br>
Type: image/png<br>
Size: 75791 bytes<br>
Desc: not available<br>
URL: <<a href="https://mailman.ucar.edu/pipermail/ncl-talk/attachments/20201203/6db121df/attachment-0001.png" target="_blank">https://mailman.ucar.edu/<wbr>pipermail/ncl-talk/<wbr>attachments/20201203/6db121df/<wbr>attachment-0001.png</a>><br>
-------------- next part --------------<br>
A non-text attachment was scrubbed...<br>
Name: Basiclineplot.ncl<br>
Type: application/octet-stream<br>
Size: 1663 bytes<br>
Desc: not available<br>
URL: <<a href="https://mailman.ucar.edu/pipermail/ncl-talk/attachments/20201203/6db121df/attachment-0001.obj" target="_blank">https://mailman.ucar.edu/<wbr>pipermail/ncl-talk/<wbr>attachments/20201203/6db121df/<wbr>attachment-0001.obj</a>><br>
<br>
------------------------------<br>
<br>
Message: 2<br>
Date: Fri, 4 Dec 2020 11:23:49 +0800<br>
From: dickson mbigi <<a href="mailto:dickson.mbigi@gmail.com" target="_blank">dickson.mbigi@gmail.com</a>><br>
To: <a href="mailto:ncl-talk@mailman.ucar.edu" target="_blank">ncl-talk@mailman.ucar.edu</a><br>
Subject: [ncl-talk] Effective Degree of Freedom<br>
Message-ID:<br>
<<a href="mailto:CALUZNzMQqxTPetw2OtW_nNt9px6Jh0DHeNPdDupykrvqSPxSDA@mail.gmail.com" target="_blank">CALUZNzMQqxTPetw2OtW_<wbr>nNt9px6Jh0DHeNPdDupykrvqSPxSDA<wbr>@mail.gmail.com</a>><br>
Content-Type: text/plain; charset="utf-8"<br>
<br>
Okay got it.<br>
Thanks<br>
<br>
On Fri, Dec 4, 2020 at 2:21 AM <<a href="mailto:ncl-talk-request@mailman.ucar.edu" target="_blank">ncl-talk-request@mailman.<wbr>ucar.edu</a>> wrote:<br>
<br>
> Send ncl-talk mailing list submissions to<br>
> <a href="mailto:ncl-talk@mailman.ucar.edu" target="_blank">ncl-talk@mailman.ucar.edu</a><br>
><br>
> To subscribe or unsubscribe via the World Wide Web, visit<br>
> <a href="https://mailman.ucar.edu/mailman/listinfo/ncl-talk" target="_blank">https://mailman.ucar.edu/<wbr>mailman/listinfo/ncl-talk</a><br>
> or, via email, send a message with subject or body 'help' to<br>
> <a href="mailto:ncl-talk-request@mailman.ucar.edu" target="_blank">ncl-talk-request@mailman.ucar.<wbr>edu</a><br>
><br>
> You can reach the person managing the list at<br>
> <a href="mailto:ncl-talk-owner@mailman.ucar.edu" target="_blank">ncl-talk-owner@mailman.ucar.<wbr>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>
> 1. Effective Degree of Freedom (dickson mbigi)<br>
> 2. Re: NCARG_COLORMAPS in conda (Jian Zheng)<br>
> 3. Re: Effective Degree of Freedom (Dennis Shea)<br>
> 4. Plot csv file (Anahita Amiri Farahani)<br>
><br>
><br>
> ------------------------------<wbr>------------------------------<wbr>----------<br>
><br>
> Message: 1<br>
> Date: Thu, 3 Dec 2020 08:25:59 +0800<br>
> From: dickson mbigi <<a href="mailto:dickson.mbigi@gmail.com" target="_blank">dickson.mbigi@gmail.com</a>><br>
> To: NCL-talk <<a href="mailto:ncl-talk@ucar.edu" target="_blank">ncl-talk@ucar.edu</a>><br>
> Subject: [ncl-talk] Effective Degree of Freedom<br>
> Message-ID:<br>
> <<wbr>CALUZNzOzszoPZz5xRtZeLVbZYaNkX<wbr>pVy=<br>
> <a href="mailto:q%2BRRBY5sVm4uxUiqw@mail.gmail.com" target="_blank">q+RRBY5sVm4uxUiqw@mail.gmail.<wbr>com</a>><br>
> Content-Type: text/plain; charset="utf-8"<br>
><br>
> Hi everyone,<br>
> I have sst(time) and pre(lon,lat,time) low pass filtered data sets. I can<br>
> calculate spatial correlation, but for the significance test using<br>
> Student's t- test I need to use effective degrees of freedom because my<br>
> data have been filtered. I went through NCL website and found ''equivalent<br>
> sample size'' function which I think is quite different from the effective<br>
> degrees of freedom. Is there a function or a way to use Effective Degree of<br>
> freedom to perform significance tests in spatial correlation analysis?<br>
><br>
> Ndof =N(1-r1r2)/(1+r1r2), where N is sample size, r1&r2 are the lag-1<br>
> autocorrelations of the two time series.<br>
><br>
> Thanks in advance.<br>
> Dickson.<br>
> -------------- next part --------------<br>
> An HTML attachment was scrubbed...<br>
> URL: <<br>
> <a href="https://mailman.ucar.edu/pipermail/ncl-talk/attachments/20201203/cfbd359e/attachment-0001.html" target="_blank">
https://mailman.ucar.edu/<wbr>pipermail/ncl-talk/<wbr>attachments/20201203/cfbd359e/<wbr>attachment-0001.html</a><br>
> ><br>
><br>
> ------------------------------<br>
><br>
> Message: 2<br>
> Date: Thu, 3 Dec 2020 11:13:39 +0800<br>
> From: Jian Zheng <<a href="mailto:jzheng8606@gmail.com" target="_blank">jzheng8606@gmail.com</a>><br>
> To: Rick Brownrigg <<a href="mailto:brownrig@ucar.edu" target="_blank">brownrig@ucar.edu</a>><br>
> Cc: Ncl-talk <<a href="mailto:ncl-talk@ucar.edu" target="_blank">ncl-talk@ucar.edu</a>><br>
> Subject: Re: [ncl-talk] NCARG_COLORMAPS in conda<br>
> Message-ID:<br>
> <<br>
> <a href="mailto:CAFMEVXN2tHnLXEYVyhdMb4iR3OL0Swd%2B3FEZNp8PETiNL09SxA@mail.gmail.com" target="_blank">CAFMEVXN2tHnLXEYVyhdMb4iR3OL0S<wbr>wd+3FEZNp8PETiNL09SxA@mail.<wbr>gmail.com</a>><br>
> Content-Type: text/plain; charset="utf-8"<br>
><br>
> Hi Rick,<br>
><br>
> I find that defining NCARG_COLORMAPS after the conda-initializing part in<br>
> the .bash_profile can solve the problem.<br>
><br>
> Thanks a lot for all your help.<br>
> Jian<br>
><br>
> On Sat, Nov 21, 2020 at 12:22 AM Rick Brownrigg <<a href="mailto:brownrig@ucar.edu" target="_blank">brownrig@ucar.edu</a>> wrote:<br>
><br>
> > Hi Jian,<br>
> ><br>
> > When you say it is not working, are you getting messages such as this<br>
> when<br>
> > you try to reference your custom colormap:<br>
> ><br>
> > fatal:CvtStringToCmap:Unable to convert string "foo" to ColorMap<br>
> > warning:Error retrieving resource wkColorMap from args - Ignoring Arg<br>
> ><br>
> > I don't know where the OLD_NCARG_COLORMAPS setting would be coming from<br>
> in<br>
> > your environment. I would note that the second path in it --<br>
> > /lib/ncarg/colormaps -- would be incorrect. I don't know that it would<br>
> > break things if the first path is correct however.<br>
> ><br>
> > I have a stock ncl installation from conda. I copied an arbitrary<br>
> colormap<br>
> > from $NCARG_ROOT/lib/colormaps into /tmp, renamed it "foo.rgb", and set<br>
> > NCARG_COLORMAPS=/tmp. Then when I run this little script, everything<br>
> works:<br>
> ><br>
> > ncl 1> wks = gsn_open_wks("x11","test")<br>
> > ncl 2> gsn_define_colormap(wks,"foo")<br>
> > ncl 3> gsn_draw_colormap(wks)<br>
> ><br>
> > if I unset NCARG_COLORMAPS, and re-run, then I get the fatal/warning<br>
> > errors mentioned above.<br>
> ><br>
> > So I would have to conclude something is not quite right in your<br>
> > environment. Perhaps before trying to set envvars via .bash_profile,<br>
> > perhaps try setting them on the command line. Are you certain your<br>
> colormap<br>
> > is in the directory you cite? Are you certain its format is valid for<br>
> NCL?<br>
> > Perhaps try what I did -- copying a known colormap into your custom<br>
> > directory, rename it to something that does not collide with NCL's<br>
> colormap<br>
> > names, and see if you can get the little scriptlet above to work.<br>
> ><br>
> > I hope that helps...<br>
> > Rick<br>
> ><br>
> ><br>
> > On Fri, Nov 20, 2020 at 8:54 AM Jian Zheng <<a href="mailto:jzheng8606@gmail.com" target="_blank">jzheng8606@gmail.com</a>> wrote:<br>
> ><br>
> >> Hi Rick,<br>
> >><br>
> >> When I ran "env | grep NCARG", I got<br>
> >><br>
> >><br>
> >><br>
> OLD_NCARG_COLORMAPS=/Users/<wbr>jzheng/Documents/nclcolormap:/<wbr>lib/ncarg/colormaps<br>
> >><br>
> >> NCARG_ROOT=/Users/jzheng/opt/<wbr>miniconda3<br>
> >><br>
> >><br>
> >> Does it show you more information?<br>
> >><br>
> >><br>
> >> On Fri, Nov 20, 2020 at 12:49 PM Rick Brownrigg <<a href="mailto:brownrig@ucar.edu" target="_blank">brownrig@ucar.edu</a>><br>
> >> wrote:<br>
> >><br>
> >>> Hi Jian,<br>
> >>><br>
> >>> Offhand that all looks reasonable. Only you can verify the custom path.<br>
> >>> Did you "source" your .bash_profile after you modified it? I'm not<br>
> sure<br>
> >>> what else to suggest.<br>
> >>><br>
> >>> Rick<br>
> >>><br>
> >>> On Thu, Nov 19, 2020 at 9:34 PM Jian Zheng <<a href="mailto:jzheng8606@gmail.com" target="_blank">jzheng8606@gmail.com</a>><br>
> wrote:<br>
> >>><br>
> >>>> Hi Rick,<br>
> >>>><br>
> >>>> NCARG_COLORMAPS (export<br>
> >>>><br>
> NCARG_COLORMAPS=/Users/jzheng/<wbr>Documents/nclcolormap:$NCARG_<wbr>ROOT/lib/ncarg/colormaps)<br>
> >>>> contains the directory where I put my user-defined colormap files.<br>
> When I<br>
> >>>> run ncl, it doesn't see these colormaps.<br>
> >>>><br>
> >>>> Thanks,<br>
> >>>> Jian<br>
> >>>><br>
> >>>> On Thu, Nov 19, 2020 at 9:33 PM Rick Brownrigg <<a href="mailto:brownrig@ucar.edu" target="_blank">brownrig@ucar.edu</a>><br>
> >>>> wrote:<br>
> >>>><br>
> >>>>> Hi,<br>
> >>>>><br>
> >>>>> What do you mean "it does not work"? What happens? Normally one<br>
> >>>>> should not need to set that environment variable unless there's<br>
> something<br>
> >>>>> unusual about the way the code is installed. It is common however<br>
> to set<br>
> >>>>> NCARG_ROOT, and that should point to the directory containing the NCL<br>
> >>>>> installation; i.e., the directory with the bin/ lib/ include/ and<br>
> man/<br>
> >>>>> directories belonging to NCL. I don't recall offhand where a stock<br>
> conda<br>
> >>>>> install places those directories.<br>
> >>>>><br>
> >>>>> Rick<br>
> >>>>><br>
> >>>>><br>
> >>>>> On Thu, Nov 19, 2020 at 1:47 AM Jian Zheng via ncl-talk <<br>
> >>>>> <a href="mailto:ncl-talk@mailman.ucar.edu" target="_blank">ncl-talk@mailman.ucar.edu</a>> wrote:<br>
> >>>>><br>
> >>>>>> Hi,<br>
> >>>>>><br>
> >>>>>> I installed ncl6.6.2 in conda root environment. When I set<br>
> NCARG_COLORMAPS<br>
> >>>>>> in my ~/.bash_profile file, it did not work. How should I set<br>
> NCARG_COLORMAPS<br>
> >>>>>> with conda correctly?<br>
> >>>>>><br>
> >>>>>> Thanks,<br>
> >>>>>> Jian<br>
> >>>>>> ______________________________<wbr>_________________<br>
> >>>>>> ncl-talk mailing list<br>
> >>>>>> <a href="mailto:ncl-talk@mailman.ucar.edu" target="_blank">ncl-talk@mailman.ucar.edu</a><br>
> >>>>>> List instructions, subscriber options, unsubscribe:<br>
> >>>>>> <a href="https://mailman.ucar.edu/mailman/listinfo/ncl-talk" target="_blank">https://mailman.ucar.edu/<wbr>mailman/listinfo/ncl-talk</a><br>
> >>>>><br>
> >>>>><br>
> -------------- next part --------------<br>
> An HTML attachment was scrubbed...<br>
> URL: <<br>
> <a href="https://mailman.ucar.edu/pipermail/ncl-talk/attachments/20201203/e73faef6/attachment-0001.html" target="_blank">
https://mailman.ucar.edu/<wbr>pipermail/ncl-talk/<wbr>attachments/20201203/e73faef6/<wbr>attachment-0001.html</a><br>
> ><br>
><br>
> ------------------------------<br>
><br>
> Message: 3<br>
> Date: Thu, 3 Dec 2020 09:44:35 -0700<br>
> From: Dennis Shea <<a href="mailto:shea@ucar.edu" target="_blank">shea@ucar.edu</a>><br>
> To: dickson mbigi <<a href="mailto:dickson.mbigi@gmail.com" target="_blank">dickson.mbigi@gmail.com</a>><br>
> Cc: NCL-talk <<a href="mailto:ncl-talk@ucar.edu" target="_blank">ncl-talk@ucar.edu</a>><br>
> Subject: Re: [ncl-talk] Effective Degree of Freedom<br>
> Message-ID:<br>
> <CAOF1d_6CO1djz=<br>
> <a href="mailto:ZCQgjRGhqtuw1yEoxe4n62APfcgJHaXJ7sgw@mail.gmail.com" target="_blank">ZCQgjRGhqtuw1yEoxe4n62APfcgJHa<wbr>XJ7sgw@mail.gmail.com</a>><br>
> Content-Type: text/plain; charset="utf-8"<br>
><br>
> I believe you have asked this question before.<br>
><br>
> ****ncl-talk is not a statistics forum. ****<br>
> * ***Please talk to a statistician****<br>
><br>
> ====<br>
> (1) Possibly:<br>
> You could use *esacr*<br>
> <<a href="http://www.ncl.ucar.edu/Document/Functions/Built-in/esacr.shtml" target="_blank">http://www.ncl.ucar.edu/<wbr>Document/Functions/Built-in/<wbr>esacr.shtml</a>> or<br>
> *esacr_n*<br>
> <<a href="http://www.ncl.ucar.edu/Document/Functions/Built-in/esacr_n.shtml" target="_blank">http://www.ncl.ucar.edu/<wbr>Document/Functions/Built-in/<wbr>esacr_n.shtml</a>><br>
> (esacr_n is available in NCL 6.5.0 and later) on the filtered series to get<br>
> the lag_1 autocorrelation coefficients.<br>
><br>
> r_sst = esacr(sst,1)<br>
> r1_sst = r_sst(1) ; scalar; r1_sst(1)<br>
> r1_sst@long_name = "Lag-1 autocorrelation: sst<br>
> print(r1_sst)<br>
> <wbr> ; pre(lat,lon,time) ... time is<br>
> rightmost dimension<br>
> r_pre = esacr(pre,1) ; r_pre(2,lat,lon,time)<br>
> r1_pre = r_pre(1,:,:) ; r1_pre(nlat,mlom)<br>
> r1_pre@long_name = "Lag-1 autocorrelation: pre"<br>
> printVarSummary(r1_pre)<br>
> printMinMax(r1_pre)<br>
><br>
><br>
> r1_sst *:=* conform(r1_pre, r1_sst, -1) ; := overwrite<br>
> printVarSummary(r1_sst) <wbr> ; (nlat,mlon)<br>
><br>
> r1_sst_pre = r1_sst*r1_pre ; array (grid point-by-grid<br>
> point) multiply<br>
><br>
> Ndof = N*(1-r1_sst_pre)/(1+r1_sst_<wbr>pre), where N is the original sample<br>
> size of time series<br>
><br>
> printVarSummary(Ndof) <wbr> ; (nlat,mlon)<br>
><br>
> printMinMax(Ndof,0)<br>
><br>
><br>
> ====<br>
> (2)<br>
> Perhaps, a better approach:<br>
><br>
> DOI: 10.1016/S0275-1062(04)90014-8<br>
> (2004) Determination of the degree of freedom of digital filtered time<br>
> series with an application to the correlation analysis between the length<br>
> of day and the Southern oscillation index<br>
> ====<br>
><br>
> Again, it is best to talk with a statistician.<br>
><br>
><br>
> On Wed, Dec 2, 2020 at 5:26 PM dickson mbigi via ncl-talk <<br>
> <a href="mailto:ncl-talk@mailman.ucar.edu" target="_blank">ncl-talk@mailman.ucar.edu</a>> wrote:<br>
><br>
> > Hi everyone,<br>
> > I have sst(time) and pre(lon,lat,time) low pass filtered data sets. I can<br>
> > calculate spatial correlation, but for the significance test using<br>
> > Student's t- test I need to use effective degrees of freedom because my<br>
> > data have been filtered. I went through NCL website and found<br>
> ''equivalent<br>
> > sample size'' function which I think is quite different from the<br>
> effective<br>
> > degrees of freedom. Is there a function or a way to use Effective Degree<br>
> of<br>
> > freedom to perform significance tests in spatial correlation analysis?<br>
> ><br>
> > Ndof =N(1-r1r2)/(1+r1r2), where N is sample size, r1&r2 are the lag-1<br>
> > autocorrelations of the two time series.<br>
> ><br>
> > Thanks in advance.<br>
> > Dickson.<br>
> > ______________________________<wbr>_________________<br>
> > ncl-talk mailing list<br>
> > <a href="mailto:ncl-talk@mailman.ucar.edu" target="_blank">ncl-talk@mailman.ucar.edu</a><br>
> > List instructions, subscriber options, unsubscribe:<br>
> > <a href="https://mailman.ucar.edu/mailman/listinfo/ncl-talk" target="_blank">https://mailman.ucar.edu/<wbr>mailman/listinfo/ncl-talk</a><br>
> -------------- next part --------------<br>
> An HTML attachment was scrubbed...<br>
> URL: <<br>
> <a href="https://mailman.ucar.edu/pipermail/ncl-talk/attachments/20201203/7b26972c/attachment-0001.html" target="_blank">
https://mailman.ucar.edu/<wbr>pipermail/ncl-talk/<wbr>attachments/20201203/7b26972c/<wbr>attachment-0001.html</a><br>
> ><br>
><br>
> ------------------------------<br>
><br>
> Message: 4<br>
> Date: Thu, 3 Dec 2020 13:21:04 -0500<br>
> From: Anahita Amiri Farahani <<a href="mailto:aamir003@ucr.edu" target="_blank">aamir003@ucr.edu</a>><br>
> To: "ncl-talk [ncl-talk]" <<a href="mailto:ncl-talk@ucar.edu" target="_blank">ncl-talk@ucar.edu</a>><br>
> Subject: [ncl-talk] Plot csv file<br>
> Message-ID:<br>
> <<br>
> <a href="mailto:CAABdVry-zwn-y4omPNi2VNYVJPQOUP_W5ZqEUb7ZhsBTphScvA@mail.gmail.com" target="_blank">CAABdVry-zwn-<wbr>y4omPNi2VNYVJPQOUP_<wbr>W5ZqEUb7ZhsBTphScvA@mail.<wbr>gmail.com</a>><br>
> Content-Type: text/plain; charset="utf-8"<br>
><br>
> Hello all,<br>
><br>
> I tried to read and plot the csv data, but I faced some errors. I've<br>
> attached both data and the code.<br>
><br>
> Thank you,<br>
> ana<br>
> -------------- next part --------------<br>
> An HTML attachment was scrubbed...<br>
> URL: <<br>
> <a href="https://mailman.ucar.edu/pipermail/ncl-talk/attachments/20201203/a266e1eb/attachment.html" target="_blank">
https://mailman.ucar.edu/<wbr>pipermail/ncl-talk/<wbr>attachments/20201203/a266e1eb/<wbr>attachment.html</a><br>
> ><br>
> -------------- next part --------------<br>
> A non-text attachment was scrubbed...<br>
> Name: Book4.csv<br>
> Type: text/csv<br>
> Size: 1320725 bytes<br>
> Desc: not available<br>
> URL: <<br>
> <a href="https://mailman.ucar.edu/pipermail/ncl-talk/attachments/20201203/a266e1eb/attachment.csv" target="_blank">
https://mailman.ucar.edu/<wbr>pipermail/ncl-talk/<wbr>attachments/20201203/a266e1eb/<wbr>attachment.csv</a><br>
> ><br>
> -------------- next part --------------<br>
> A non-text attachment was scrubbed...<br>
> Name: test.ncl<br>
> Type: application/octet-stream<br>
> Size: 2564 bytes<br>
> Desc: not available<br>
> URL: <<br>
> <a href="https://mailman.ucar.edu/pipermail/ncl-talk/attachments/20201203/a266e1eb/attachment.obj" target="_blank">
https://mailman.ucar.edu/<wbr>pipermail/ncl-talk/<wbr>attachments/20201203/a266e1eb/<wbr>attachment.obj</a><br>
> ><br>
><br>
> ------------------------------<br>
><br>
> Subject: Digest Footer<br>
><br>
> ______________________________<wbr>_________________<br>
> ncl-talk mailing list<br>
> <a href="mailto:ncl-talk@mailman.ucar.edu" target="_blank">ncl-talk@mailman.ucar.edu</a><br>
> List instructions, subscriber options, unsubscribe:<br>
> <a href="https://mailman.ucar.edu/mailman/listinfo/ncl-talk" target="_blank">https://mailman.ucar.edu/<wbr>mailman/listinfo/ncl-talk</a><br>
><br>
> ------------------------------<br>
><br>
> End of ncl-talk Digest, Vol 205, Issue 3<br>
> ******************************<wbr>**********<br>
><br>
-------------- next part --------------<br>
An HTML attachment was scrubbed...<br>
URL: <<a href="https://mailman.ucar.edu/pipermail/ncl-talk/attachments/20201204/539c7862/attachment-0001.html" target="_blank">https://mailman.ucar.edu/<wbr>pipermail/ncl-talk/<wbr>attachments/20201204/539c7862/<wbr>attachment-0001.html</a>><br>
<br>
------------------------------<br>
<br>
Message: 3<br>
Date: Fri, 4 Dec 2020 00:05:25 -0500<br>
From: Anahita Amiri Farahani <<a href="mailto:aamir003@ucr.edu" target="_blank">aamir003@ucr.edu</a>><br>
To: Dennis Shea <<a href="mailto:shea@ucar.edu" target="_blank">shea@ucar.edu</a>><br>
Cc: "ncl-talk \[ncl-talk\]" <<a href="mailto:ncl-talk@ucar.edu" target="_blank">ncl-talk@ucar.edu</a>><br>
Subject: Re: [ncl-talk] Plot csv file<br>
Message-ID:<br>
<CAABdVrzKKXHmB--=<wbr>s0q0XHdzDDLG7YJyBQkKZq4THzA=<a href="mailto:574VLg@mail.gmail.com" target="_blank">57<wbr>4VLg@mail.gmail.com</a>><br>
Content-Type: text/plain; charset="utf-8"<br>
<br>
Thank you so much!<br>
<br>
On Thu, Dec 3, 2020 at 7:12 PM Dennis Shea <<a href="mailto:shea@ucar.edu" target="_blank">shea@ucar.edu</a>> wrote:<br>
<br>
> There are several *wrong* assignments. For example, the following is not<br>
> correct.<br>
><br>
> total= new((/5,21488/),typeof(bc),bc@<wbr>_FillValue)<br>
> [SNIP]<br>
> total!0 = "lat"<br>
> total!1 = "lon"<br>
> ======<br>
> The following dimension names would be more appropriate for the 'total'<br>
> variable. There are 5 (=ncol) variables.<br>
><br>
> N = *dimsizes*(lat1)<br>
> total= *new*((/ncol,N/),*typeof*(bc),<wbr>bc@_FillValue)<br>
> total!0 = "variable" ; 0->longitude, 1->latitude, 2->NO,<br>
> 3->NO2, 4->BC<br>
> total!1 = "value"<br>
> =======<br>
> The attached is a modification of the following example.<br>
><br>
> See: *<a href="http://www.ncl.ucar.edu/Applications/station.shtml*" target="_blank">http://www.ncl.ucar.edu/<wbr>Applications/station.shtml*</a><br>
> <<a href="http://www.ncl.ucar.edu/Applications/station.shtml" target="_blank">http://www.ncl.ucar.edu/<wbr>Applications/station.shtml</a>><br>
> Example 1<br>
><br>
><br>
><br>
><br>
> On Thu, Dec 3, 2020 at 11:22 AM Anahita Amiri Farahani via ncl-talk <<br>
> <a href="mailto:ncl-talk@mailman.ucar.edu" target="_blank">ncl-talk@mailman.ucar.edu</a>> wrote:<br>
><br>
>> Hello all,<br>
>><br>
>> I tried to read and plot the csv data, but I faced some errors. I've<br>
>> attached both data and the code.<br>
>><br>
>> Thank you,<br>
>> ana<br>
>> ______________________________<wbr>_________________<br>
>> ncl-talk mailing list<br>
>> <a href="mailto:ncl-talk@mailman.ucar.edu" target="_blank">ncl-talk@mailman.ucar.edu</a><br>
>> List instructions, subscriber options, unsubscribe:<br>
>> <a href="https://mailman.ucar.edu/mailman/listinfo/ncl-talk" target="_blank">https://mailman.ucar.edu/<wbr>mailman/listinfo/ncl-talk</a><br>
><br>
><br>
-------------- next part --------------<br>
An HTML attachment was scrubbed...<br>
URL: <<a href="https://mailman.ucar.edu/pipermail/ncl-talk/attachments/20201204/4f22cf88/attachment-0001.html" target="_blank">https://mailman.ucar.edu/<wbr>pipermail/ncl-talk/<wbr>attachments/20201204/4f22cf88/<wbr>attachment-0001.html</a>><br>
<br>
------------------------------<br>
<br>
Message: 4<br>
Date: Fri, 4 Dec 2020 16:31:01 +0800<br>
From: ali mughal <<a href="mailto:mughalali655@gmail.com" target="_blank">mughalali655@gmail.com</a>><br>
To: Ncl-talk <<a href="mailto:ncl-talk@ucar.edu" target="_blank">ncl-talk@ucar.edu</a>><br>
Subject: [ncl-talk] python transition<br>
Message-ID:<br>
<<a href="mailto:CAB5RZE2H_p3m0YOUDi6sqtPKF%2BZnQ-sPAx-jt6FxgbwXP%2B6LRw@mail.gmail.com" target="_blank">CAB5RZE2H_p3m0YOUDi6sqtPKF+<wbr>ZnQ-sPAx-jt6FxgbwXP+6LRw@mail.<wbr>gmail.com</a>><br>
Content-Type: text/plain; charset="utf-8"<br>
<br>
Dear NCL users<br>
<br>
Could you tell me the equivalent of the following NCL command in python ?<br>
<br>
TC2=TA_MEAN(:,0,:,:)<br>
<br>
where TA_MEAN is a 4d variable with the following dimensions<br>
<br>
Dimensions and sizes: [Time | 745] x [bottom_top | 50] x [south_north |<br>
129] x [west_east | 210])<br>
-------------- next part --------------<br>
An HTML attachment was scrubbed...<br>
URL: <<a href="https://mailman.ucar.edu/pipermail/ncl-talk/attachments/20201204/87497f4a/attachment-0001.html" target="_blank">https://mailman.ucar.edu/<wbr>pipermail/ncl-talk/<wbr>attachments/20201204/87497f4a/<wbr>attachment-0001.html</a>><br>
<br>
------------------------------<br>
<br>
Message: 5<br>
Date: Fri, 4 Dec 2020 09:27:36 -0500<br>
From: Anil Kumar - NOAA Affiliate <<a href="mailto:anil.kumar@noaa.gov" target="_blank">anil.kumar@noaa.gov</a>><br>
To: <a href="mailto:ncl-talk@mailman.ucar.edu" target="_blank">ncl-talk@mailman.ucar.edu</a><br>
Subject: [ncl-talk] wrfout file reading<br>
Message-ID:<br>
<CA+8gui_--oMeV9bJXmhjJoG-<wbr>cRCMsVpNwAcu+aE+n=<a href="mailto:cx18rRhw@mail.gmail.com" target="_blank">cx18rRhw@<wbr>mail.gmail.com</a>><br>
Content-Type: text/plain; charset="utf-8"<br>
<br>
Hi,<br>
I am trying to read multiple wrfout files. I am reading okay..no problem<br>
with the code extracting variables.<br>
Problem comes, when each file has multiple times in it and then I don't<br>
know how to extract the time series of variables .<br>
Below is the code, please let me know how to modify code to read many times<br>
within each file.<br>
************************<br>
fs1 = systemfunc("ls ../WRFV3/run/wrfout_d01*")<br>
nfs1= dimsizes(fs1)<br>
f1 = addfiles(fs1+".nc","r")<br>
ntimes1 = dimsizes(f1) ; number of times in the file(s)<br>
<br>
loc1 = wrf_user_ij_to_ll(f1, 593., 546., True)<br>
print("lon/lat locations are: " + loc)<br>
uu1 = new((/ntimes1/),float)<br>
vv1 = new((/ntimes1/),float)<br>
psfc1 = new((/ntimes1/),float)<br>
i1=0<br>
do while (i1.le.ntimes1-1)<br>
uu1(i1) = f1[i1]->U(:,0,546,593) ; (time, lat,lon) ; (2,64,128)<br>
vv1(i1) = f1[i1]->V(:,0,546,593) ; V10(:,29.301,-94.797)<br>
psfc1(i1) = f1[i1]->PSFC(:,546,593)<br>
i1 = i1 + 1<br>
end do<br>
model_wspd1 = sqrt(uu1^2+vv1^2) ;wind_speed(uu,vv)<br>
model_wdir1 = wind_direction(uu1,vv1,0)<br>
model_psfc1 = psfc1/100.<br>
************************<br>
-- <br>
Dr. Anil Kumar<br>
Environmental Modeling Center/NCEP/NWS/NOAA<br>
College Park, MD, USA<br>
-------------- next part --------------<br>
An HTML attachment was scrubbed...<br>
URL: <<a href="https://mailman.ucar.edu/pipermail/ncl-talk/attachments/20201204/3deb1c85/attachment-0001.html" target="_blank">https://mailman.ucar.edu/<wbr>pipermail/ncl-talk/<wbr>attachments/20201204/3deb1c85/<wbr>attachment-0001.html</a>><br>
<br>
------------------------------<br>
<br>
Message: 6<br>
Date: Fri, 4 Dec 2020 17:42:27 +0000 (UTC)<br>
From: Ehsan Taghizadeh <<a href="mailto:ehsantaghizadeh@yahoo.com" target="_blank">ehsantaghizadeh@yahoo.com</a>><br>
To: Anil Kumar - NOAA Affiliate <<a href="mailto:anil.kumar@noaa.gov" target="_blank">anil.kumar@noaa.gov</a>><br>
Cc: Ncl-talk <<a href="mailto:ncl-talk@ucar.edu" target="_blank">ncl-talk@ucar.edu</a>><br>
Subject: Re: [ncl-talk] wrfout file reading<br>
Message-ID: <<a href="mailto:2131133709.2884490.1607103747892@mail.yahoo.com" target="_blank">2131133709.2884490.<wbr>1607103747892@mail.yahoo.com</a>><br>
Content-Type: text/plain; charset="utf-8"<br>
<br>
Dear Dr. AnilAre your wrfout files hourly?However, why you don't use wrf_user_list_times to extract the list of available times?<br>
fs1 = systemfunc("ls ../WRFV3/run/wrfout_d01*")<br>
nfs1= dimsizes(fs1)do i = 0, nfs1-1<br>
?f1 = addfile(fs1(i)+".nc","r") times = wrf_user_list_times(f1) ; get times in the file ntimes = dimsizes(times) ; number of times in the file(s)<br>
end doSincerely<br>
Ehsan<br>
On Friday, December 4, 2020, 05:57:54 PM GMT+3:30, Anil Kumar - NOAA Affiliate via ncl-talk <<a href="mailto:ncl-talk@mailman.ucar.edu" target="_blank">ncl-talk@mailman.ucar.edu</a>> wrote:
<br>
<br>
Hi,I am trying to read multiple wrfout files. I am reading okay..no problem with the code extracting variables.?Problem comes, when each file has multiple times in it and then I don't know how to extract the time series of variables .?Below is the code, please
let me know how to modify code to read many times within each file.************************<wbr>fs1 = systemfunc("ls ../WRFV3/run/wrfout_d01*")<br>
?nfs1= dimsizes(fs1)<br>
?f1 = addfiles(fs1+".nc","r")<br>
? ntimes1 =? dimsizes(f1) ? ? ? ? ; number of times in the file(s)<br>
<br>
loc1 = wrf_user_ij_to_ll(f1, 593., 546., True)<br>
?print("lon/lat locations are: " + loc)<br>
uu1 ? ? ?= new((/ntimes1/),float)<br>
vv1 ? ? ?= new((/ntimes1/),float)<br>
psfc1 ? ? ?= new((/ntimes1/),float)<br>
i1=0<br>
do while (i1.le.ntimes1-1)<br>
uu1(i1) ? ?= f1[i1]->U(:,0,546,593) ? ; (time, lat,lon) ? ?; (2,64,128)<br>
vv1(i1) ? ?= f1[i1]->V(:,0,546,593) ? ? ? ?; V10(:,29.301,-94.797)<br>
psfc1(i1) ?= f1[i1]->PSFC(:,546,593)<br>
i1 = i1 + 1<br>
end do<br>
? ?model_wspd1 = sqrt(uu1^2+vv1^2) ;wind_speed(uu,vv)<br>
? ?model_wdir1 = wind_direction(uu1,vv1,0)<br>
? ?model_psfc1 = psfc1/100.<br>
************************-- <br>
Dr. Anil KumarEnvironmental Modeling Center/NCEP/NWS/NOAA<br>
College Park, MD, USA??<br>
<br>
______________________________<wbr>_________________<br>
ncl-talk mailing list<br>
<a href="mailto:ncl-talk@mailman.ucar.edu" target="_blank">ncl-talk@mailman.ucar.edu</a><br>
List instructions, subscriber options, unsubscribe:<br>
<a href="https://mailman.ucar.edu/mailman/listinfo/ncl-talk" target="_blank">https://mailman.ucar.edu/<wbr>mailman/listinfo/ncl-talk</a>
<br>
-------------- next part --------------<br>
An HTML attachment was scrubbed...<br>
URL: <<a href="https://mailman.ucar.edu/pipermail/ncl-talk/attachments/20201204/fc1b9e52/attachment-0001.html" target="_blank">https://mailman.ucar.edu/<wbr>pipermail/ncl-talk/<wbr>attachments/20201204/fc1b9e52/<wbr>attachment-0001.html</a>><br>
<br>
------------------------------<br>
<br>
Message: 7<br>
Date: Fri, 4 Dec 2020 13:01:45 -0500<br>
From: Anil Kumar - NOAA Affiliate <<a href="mailto:anil.kumar@noaa.gov" target="_blank">anil.kumar@noaa.gov</a>><br>
To: Ehsan Taghizadeh <<a href="mailto:ehsantaghizadeh@yahoo.com" target="_blank">ehsantaghizadeh@yahoo.com</a>><br>
Cc: Ncl-talk <<a href="mailto:ncl-talk@ucar.edu" target="_blank">ncl-talk@ucar.edu</a>><br>
Subject: Re: [ncl-talk] wrfout file reading<br>
Message-ID:<br>
<CA+8gui_xL-OFWfeLrL8YsQ+x0=<wbr>oZXYty6y=<a href="mailto:LHssjCvY21ijWhg@mail.gmail.com" target="_blank">LHssjCvY21ijWhg@mail.<wbr>gmail.com</a>><br>
Content-Type: text/plain; charset="utf-8"<br>
<br>
Yes, wrf outputs are hourly files. Each hourly file has 10 multiple times<br>
(6 mins interval).<br>
<br>
Thanks,<br>
Anil<br>
<br>
<br>
On Fri, Dec 4, 2020 at 12:42 PM Ehsan Taghizadeh <<a href="mailto:ehsantaghizadeh@yahoo.com" target="_blank">ehsantaghizadeh@yahoo.com</a>><br>
wrote:<br>
<br>
> Dear Dr. Anil<br>
> Are your wrfout files hourly?<br>
> However, why you don't use wrf_user_list_times to extract the list of<br>
> available times?<br>
><br>
> fs1 = systemfunc("ls ../WRFV3/run/wrfout_d01*")<br>
> nfs1= dimsizes(fs1)<br>
> do i = 0, nfs1-1<br>
> f1 = addfile(fs1(i)+".nc","r")<br>
> times = *wrf_user_list_times*(f1) ; get times in the file<br>
><br>
> ntimes = dimsizes <<a href="https://www.ncl.ucar.edu/Document/Functions/Built-in/dimsizes.shtml%3e(times" target="_blank">https://www.ncl.ucar.edu/<wbr>Document/Functions/Built-in/<wbr>dimsizes.shtml>(times</a>) ; number of times in the file(s)<br>
> end do<br>
><br>
> *Sincerely*<br>
> *Ehsan*<br>
><br>
> On Friday, December 4, 2020, 05:57:54 PM GMT+3:30, Anil Kumar - NOAA<br>
> Affiliate via ncl-talk <<a href="mailto:ncl-talk@mailman.ucar.edu" target="_blank">ncl-talk@mailman.ucar.edu</a>> wrote:<br>
><br>
><br>
> Hi,<br>
> I am trying to read multiple wrfout files. I am reading okay..no problem<br>
> with the code extracting variables.<br>
> Problem comes, when each file has multiple times in it and then I don't<br>
> know how to extract the time series of variables .<br>
> Below is the code, please let me know how to modify code to read many<br>
> times within each file.<br>
> ************************<br>
> fs1 = systemfunc("ls ../WRFV3/run/wrfout_d01*")<br>
> nfs1= dimsizes(fs1)<br>
> f1 = addfiles(fs1+".nc","r")<br>
> ntimes1 = dimsizes(f1) ; number of times in the file(s)<br>
><br>
> loc1 = wrf_user_ij_to_ll(f1, 593., 546., True)<br>
> print("lon/lat locations are: " + loc)<br>
> uu1 = new((/ntimes1/),float)<br>
> vv1 = new((/ntimes1/),float)<br>
> psfc1 = new((/ntimes1/),float)<br>
> i1=0<br>
> do while (i1.le.ntimes1-1)<br>
> uu1(i1) = f1[i1]->U(:,0,546,593) ; (time, lat,lon) ; (2,64,128)<br>
> vv1(i1) = f1[i1]->V(:,0,546,593) ; V10(:,29.301,-94.797)<br>
> psfc1(i1) = f1[i1]->PSFC(:,546,593)<br>
> i1 = i1 + 1<br>
> end do<br>
> model_wspd1 = sqrt(uu1^2+vv1^2) ;wind_speed(uu,vv)<br>
> model_wdir1 = wind_direction(uu1,vv1,0)<br>
> model_psfc1 = psfc1/100.<br>
> ************************<br>
> --<br>
> Dr. Anil Kumar<br>
> Environmental Modeling Center/NCEP/NWS/NOAA<br>
> College Park, MD, USA<br>
><br>
><br>
> ______________________________<wbr>_________________<br>
> ncl-talk mailing list<br>
> <a href="mailto:ncl-talk@mailman.ucar.edu" target="_blank">ncl-talk@mailman.ucar.edu</a><br>
> List instructions, subscriber options, unsubscribe:<br>
> <a href="https://mailman.ucar.edu/mailman/listinfo/ncl-talk" target="_blank">https://mailman.ucar.edu/<wbr>mailman/listinfo/ncl-talk</a><br>
><br>
<br>
<br>
-- <br>
Dr. Anil Kumar<br>
Environmental Modeling Center/NCEP/NWS/NOAA<br>
College Park, MD, USA<br>
-------------- next part --------------<br>
An HTML attachment was scrubbed...<br>
URL: <<a href="https://mailman.ucar.edu/pipermail/ncl-talk/attachments/20201204/f6a4a763/attachment-0001.html" target="_blank">https://mailman.ucar.edu/<wbr>pipermail/ncl-talk/<wbr>attachments/20201204/f6a4a763/<wbr>attachment-0001.html</a>><br>
<br>
------------------------------<br>
<br>
Message: 8<br>
Date: Fri, 4 Dec 2020 13:05:47 -0500<br>
From: Anil Kumar - NOAA Affiliate <<a href="mailto:anil.kumar@noaa.gov" target="_blank">anil.kumar@noaa.gov</a>><br>
To: Ehsan Taghizadeh <<a href="mailto:ehsantaghizadeh@yahoo.com" target="_blank">ehsantaghizadeh@yahoo.com</a>><br>
Cc: Ncl-talk <<a href="mailto:ncl-talk@ucar.edu" target="_blank">ncl-talk@ucar.edu</a>><br>
Subject: Re: [ncl-talk] wrfout file reading<br>
Message-ID:<br>
<CA+8gui8kW-L=<a href="mailto:eBdVhSv6BK5fXgdanjfRg_118O%2BTRXUozYQ8UQ@mail.gmail.com" target="_blank">eBdVhSv6BK5fXgda<wbr>njfRg_118O+TRXUozYQ8UQ@mail.<wbr>gmail.com</a>><br>
Content-Type: text/plain; charset="utf-8"<br>
<br>
Yes, Hourly wrf outputs.<br>
<br>
and yes when I extract times using *wrf_user_list_times*(f1) that works<br>
fine but only times.<br>
but how to extract variables like U10 time series?<br>
<br>
Thanks,<br>
Anil<br>
<br>
<br>
<br>
On Fri, Dec 4, 2020 at 12:42 PM Ehsan Taghizadeh <<a href="mailto:ehsantaghizadeh@yahoo.com" target="_blank">ehsantaghizadeh@yahoo.com</a>><br>
wrote:<br>
<br>
> Dear Dr. Anil<br>
> Are your wrfout files hourly?<br>
> However, why you don't use wrf_user_list_times to extract the list of<br>
> available times?<br>
><br>
> fs1 = systemfunc("ls ../WRFV3/run/wrfout_d01*")<br>
> nfs1= dimsizes(fs1)<br>
> do i = 0, nfs1-1<br>
> f1 = addfile(fs1(i)+".nc","r")<br>
> times = *wrf_user_list_times*(f1) ; get times in the file<br>
><br>
> ntimes = dimsizes <<a href="https://www.ncl.ucar.edu/Document/Functions/Built-in/dimsizes.shtml%3e(times" target="_blank">https://www.ncl.ucar.edu/<wbr>Document/Functions/Built-in/<wbr>dimsizes.shtml>(times</a>) ; number of times in the file(s)<br>
> end do<br>
><br>
> *Sincerely*<br>
> *Ehsan*<br>
><br>
> On Friday, December 4, 2020, 05:57:54 PM GMT+3:30, Anil Kumar - NOAA<br>
> Affiliate via ncl-talk <<a href="mailto:ncl-talk@mailman.ucar.edu" target="_blank">ncl-talk@mailman.ucar.edu</a>> wrote:<br>
><br>
><br>
> Hi,<br>
> I am trying to read multiple wrfout files. I am reading okay..no problem<br>
> with the code extracting variables.<br>
> Problem comes, when each file has multiple times in it and then I don't<br>
> know how to extract the time series of variables .<br>
> Below is the code, please let me know how to modify code to read many<br>
> times within each file.<br>
> ************************<br>
> fs1 = systemfunc("ls ../WRFV3/run/wrfout_d01*")<br>
> nfs1= dimsizes(fs1)<br>
> f1 = addfiles(fs1+".nc","r")<br>
> ntimes1 = dimsizes(f1) ; number of times in the file(s)<br>
><br>
> loc1 = wrf_user_ij_to_ll(f1, 593., 546., True)<br>
> print("lon/lat locations are: " + loc)<br>
> uu1 = new((/ntimes1/),float)<br>
> vv1 = new((/ntimes1/),float)<br>
> psfc1 = new((/ntimes1/),float)<br>
> i1=0<br>
> do while (i1.le.ntimes1-1)<br>
> uu1(i1) = f1[i1]->U(:,0,546,593) ; (time, lat,lon) ; (2,64,128)<br>
> vv1(i1) = f1[i1]->V(:,0,546,593) ; V10(:,29.301,-94.797)<br>
> psfc1(i1) = f1[i1]->PSFC(:,546,593)<br>
> i1 = i1 + 1<br>
> end do<br>
> model_wspd1 = sqrt(uu1^2+vv1^2) ;wind_speed(uu,vv)<br>
> model_wdir1 = wind_direction(uu1,vv1,0)<br>
> model_psfc1 = psfc1/100.<br>
> ************************<br>
> --<br>
> Dr. Anil Kumar<br>
> Environmental Modeling Center/NCEP/NWS/NOAA<br>
> College Park, MD, USA<br>
><br>
><br>
> ______________________________<wbr>_________________<br>
> ncl-talk mailing list<br>
> <a href="mailto:ncl-talk@mailman.ucar.edu" target="_blank">ncl-talk@mailman.ucar.edu</a><br>
> List instructions, subscriber options, unsubscribe:<br>
> <a href="https://mailman.ucar.edu/mailman/listinfo/ncl-talk" target="_blank">https://mailman.ucar.edu/<wbr>mailman/listinfo/ncl-talk</a><br>
><br>
<br>
<br>
-- <br>
Dr. Anil Kumar<br>
Environmental Modeling Center/NCEP/NWS/NOAA<br>
College Park, MD, USA<br>
-------------- next part --------------<br>
An HTML attachment was scrubbed...<br>
URL: <<a href="https://mailman.ucar.edu/pipermail/ncl-talk/attachments/20201204/4a7be921/attachment-0001.html" target="_blank">https://mailman.ucar.edu/<wbr>pipermail/ncl-talk/<wbr>attachments/20201204/4a7be921/<wbr>attachment-0001.html</a>><br>
<br>
------------------------------<br>
<br>
Subject: Digest Footer<br>
<br>
______________________________<wbr>_________________<br>
ncl-talk mailing list<br>
<a href="mailto:ncl-talk@mailman.ucar.edu" target="_blank">ncl-talk@mailman.ucar.edu</a><br>
List instructions, subscriber options, unsubscribe:<br>
<a href="https://mailman.ucar.edu/mailman/listinfo/ncl-talk" target="_blank">https://mailman.ucar.edu/<wbr>mailman/listinfo/ncl-talk</a><br>
<br>
------------------------------<br>
<br>
End of ncl-talk Digest, Vol 205, Issue 5<br>
******************************<wbr>**********<u></u><u></u></p>
<p class="MsoNormal"><u></u> <u></u></p>
</div>
</div>
</blockquote></div>