<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=us-ascii">
</head>
<body>
<style type="text/css" style="display:none;"><!-- P {margin-top:0;margin-bottom:0;} --></style>
<div id="divtagdefaultwrapper" style="font-size:12pt;color:#000000;font-family:Calibri,Arial,Helvetica,sans-serif;">
<p>Hi Denis&nbsp;</p>
<p><br>
</p>
<p>I meant that I want to change location of&nbsp;lat longs in the scripts &nbsp;one by one to get a wind speed at each location. Is it possible to do it for 365 locations or do I have to run the script each time for each location</p>
<p><br>
</p>
<div id="Signature">
<div id="divtagdefaultwrapper" style="font-size:12pt; color:#000000; background-color:#FFFFFF; font-family:Calibri,Arial,Helvetica,sans-serif">
<div style="font-family:Tahoma; font-size:13px">
<div style="font-family:Tahoma; font-size:13px"><b><br>
</b></div>
<div style="color:rgb(33,33,33); font-family:wf_segoe-ui_normal,'Segoe UI','Segoe WP',Tahoma,Arial,sans-serif; font-size:15.4545450210571px; margin:0px; background-color:rgb(255,255,255)">
<font face="Times New Roman,serif" size="3"><span style="font-size:12pt"><font face="Arial Bold" size="2" color="#1F497D"><span style="font-size:11pt">Muhammad Omer Mughal</span></font></span></font></div>
<div style="color:rgb(33,33,33); font-family:wf_segoe-ui_normal,'Segoe UI','Segoe WP',Tahoma,Arial,sans-serif; font-size:15.4545450210571px; margin:0px; background-color:rgb(255,255,255)">
<font face="Times New Roman,serif" size="3"><span style="font-size:12pt"><font face="Arial Bold" size="2" color="#1F497D"><span style="font-size:11pt">MSc&nbsp;BSc&nbsp;Mechanical Engineering</span></font><font face="Arial,sans-serif" size="1" color="#1F497D"><span style="font-size:8pt"><br>
</span></font><font face="Arial Bold" size="2" color="#AB8303"><span style="font-size:9pt">PhD&nbsp;&nbsp;Research&nbsp;Scholar</span></font></span></font></div>
<div style="color:rgb(33,33,33); font-family:wf_segoe-ui_normal,'Segoe UI','Segoe WP',Tahoma,Arial,sans-serif; font-size:15.4545450210571px; margin:0px; background-color:rgb(255,255,255)">
<font face="Times New Roman,serif" size="3"><span style="font-size:12pt"><font face="Arial Bold" size="2" color="#AB8303"><span style="font-size:9pt">Remote Sensing and Satellite Research Group</span></font></span></font></div>
<div style="color:rgb(33,33,33); font-family:wf_segoe-ui_normal,'Segoe UI','Segoe WP',Tahoma,Arial,sans-serif; font-size:15.4545450210571px; margin:0px; background-color:rgb(255,255,255)">
<font face="Times New Roman,serif" size="3"><span style="font-size:12pt"><font face="Arial Bold" size="2" color="#AB8303"><span style="font-size:9pt">Department of Imaging and Applied Physics</span></font><font face="Arial Bold" size="2" color="#AB8303"><span style="font-size:9pt"><br>
Curtin University</span></font><font face="Arial Bold" size="2" color="#AB8303"><span style="font-size:9pt"><br>
</span></font><font face="Calibri,sans-serif" size="2" color="#1F497D"><span style="font-size:11pt"><br>
</span></font><font face="Arial Bold" size="2" color="#1F497D"><span style="font-size:9pt">Curtin University</span></font><font face="Arial Bold" size="2" color="#1F497D"><span style="font-size:9pt"><br>
</span></font><font face="Arial Bold" size="2" color="#AB8303"><span style="font-size:9pt">Tel |</span></font><font face="Arial Bold" size="2" color="#1F497D"><span style="font-size:9pt">&nbsp;</span></font><font face="Arial,sans-serif" size="2" color="#1F497D"><span style="font-size:9pt">&#43;61
 8 9266 7962</span></font><font face="Calibri,sans-serif" size="2" color="#1F497D"><span style="font-size:9pt">&nbsp;</span></font><font face="Calibri,sans-serif" size="1" color="#1F497D"><span style="font-size:7pt"><br>
</span></font><font face="Arial Bold" size="2" color="#AB8303"><span style="font-size:9pt">Fax |</span></font><font face="Arial Bold" size="2" color="#1F497D"><span style="font-size:9pt">&nbsp;</span></font><font face="Arial,sans-serif" size="2" color="#1F497D"><span style="font-size:9pt">&#43;61
 8 9266 2377</span></font><font face="Arial,sans-serif" size="2" color="#1F497D"><span style="font-size:9pt"><br>
</span></font><font face="Arial Bold" size="2" color="#AB8303"><span style="font-size:9pt">Mobile |</span></font><font face="Calibri,sans-serif" size="2" color="#1F497D"><span style="font-size:9pt">&nbsp;</span></font><font face="Arial,sans-serif" size="2" color="#1F497D"><span style="font-size:9pt">0470&nbsp;237&nbsp;525</span></font><font face="Calibri,sans-serif" size="2" color="#1F497D"><span style="font-size:9pt">&nbsp;&nbsp;</span></font><font face="Calibri,sans-serif" size="2" color="#1F497D"><span style="font-size:9pt"><br>
</span></font><font face="Calibri,sans-serif" size="2" color="#1F497D"><span style="font-size:9pt"><br>
</span></font><font face="Arial Bold" size="2" color="#AB8303"><span style="font-size:9pt">Email |</span></font><font face="Calibri,sans-serif" size="2" color="#1F497D"><span style="font-size:9pt">&nbsp;</span></font><a href="mailto:m.lynch@curtin.edu.au" target="_blank" id="LPNoLP"><font face="Arial,sans-serif" size="2"><span style="font-size:9pt">m.mughal1@postgrad.curtin.edu.au</span></font></a><font face="Arial,sans-serif" size="2" color="#1F497D"><span style="font-size:9pt">&nbsp;</span></font><font face="Arial,sans-serif" size="2" color="#1F497D"><span style="font-size:9pt"><br>
</span></font><font face="Arial Bold" size="2" color="#AB8303"><span style="font-size:9pt">Web |</span></font><font face="Calibri,sans-serif" size="2" color="#AB8303"><span style="font-size:9pt">&nbsp;</span></font><a href="http://curtin.edu.au/" target="_blank" id="LPNoLP"><font face="Calibri,sans-serif" size="2"><span style="font-size:11pt"><font face="Arial,sans-serif" size="2"><span style="font-size:9pt">http://curtin.edu.au</span></font></span></font></a><font face="Arial,sans-serif" size="2" color="#1F497D"><span style="font-size:9pt"><br>
</span></font><font face="Calibri,sans-serif" size="1" color="#1F497D"><span style="font-size:7pt"><br>
</span></font></span></font></div>
<div style="color:rgb(33,33,33); font-family:wf_segoe-ui_normal,'Segoe UI','Segoe WP',Tahoma,Arial,sans-serif; font-size:15.4545450210571px; margin:0px; background-color:rgb(255,255,255)">
<font face="Calibri,sans-serif" size="1" color="#1F497D"><span style="font-size:6pt"></span></font><font face="Arial,sans-serif" size="1" color="#1F497D"><span style="font-size:6pt">Curtin University is a trademark of Curtin University of Technology.&nbsp;</span></font><br>
</div>
<div style="color:rgb(33,33,33); font-family:wf_segoe-ui_normal,'Segoe UI','Segoe WP',Tahoma,Arial,sans-serif; font-size:15.4545450210571px; margin:0px; background-color:rgb(255,255,255)">
<font face="Times New Roman,serif" size="3"><span style="font-size:12pt"><font face="Arial,sans-serif" size="1" color="#1F497D"><span style="font-size:6pt">CRICOS Provider Code 00301J (WA), 02637B (NSW)</span></font></span></font></div>
<div style="color:rgb(33,33,33); font-family:wf_segoe-ui_normal,'Segoe UI','Segoe WP',Tahoma,Arial,sans-serif; font-size:15.4545450210571px; margin:0px; background-color:rgb(255,255,255)">
<font face="Times New Roman,serif" size="3"><span style="font-size:12pt"><font face="Arial,sans-serif" size="1" color="#1F497D"><span style="font-size:6pt"><br>
</span></font></span></font></div>
<div style="color:rgb(33,33,33); font-family:wf_segoe-ui_normal,'Segoe UI','Segoe WP',Tahoma,Arial,sans-serif; font-size:15.4545450210571px; margin:0px; background-color:rgb(255,255,255)">
<font face="Times New Roman,serif" size="3"><span style="font-size:12pt"><font face="Arial,sans-serif" size="1" color="#1F497D"><span style="font-size:6pt"><br>
</span></font></span></font></div>
</div>
</div>
</div>
</div>
<hr style="display:inline-block;width:98%" tabindex="-1">
<div id="divRplyFwdMsg" dir="ltr"><font face="Calibri, sans-serif" style="font-size:11pt" color="#000000"><b>From:</b> Dennis Shea &lt;shea@ucar.edu&gt;<br>
<b>Sent:</b> Thursday, 20 October 2016 1:38:49 AM<br>
<b>To:</b> Muhammad Omer Mughal<br>
<b>Cc:</b> ncl-talk@ucar.edu<br>
<b>Subject:</b> Re: [ncl-talk] Script for multiple directories and multiple locations</font>
<div>&nbsp;</div>
</div>
<div>
<div dir="ltr">
<div>
<div>
<div>
<div>
<div>
<div>
<div>
<div>
<div>The question is not clear&nbsp; (... a least to me...)<br>
<br>
---<br>
&nbsp;6 ; Make a list of all files we are interested in<br>
&nbsp;7&nbsp;&nbsp; DATADir = &quot;./&quot;<br>
&nbsp;8&nbsp;&nbsp; FILES = systemfunc (&quot; ls -1 &quot; &#43; DATADir &#43; &quot;wrfout_d04* &quot;)<br>
---<br>
<br>
<a href="http://www.ncl.ucar.edu/Document/Functions/Built-in/systemfunc.shtml">http://www.ncl.ucar.edu/Document/Functions/Built-in/systemfunc.shtml</a><br>
</div>
Look at Example 6<br>
<br>
---<br>
</div>
Other options based on the Example 6 which has directories a1, a2, ..., a20<br>
<br>
DATADir&nbsp; = &quot;/Some/dir/with/WRF/data/&quot;<br>
cmd&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; = &quot;find &quot; &#43; DATADir &#43; &quot;a* -type d -print&quot;&nbsp; <br>
dirWRF&nbsp;&nbsp;&nbsp; = systemfunc(cmd)<br>
</div>
<div>print(dirWRF)<br>
</div>
<div><br>
</div>
n_dirWRF = dimsizes(dirWRF)<br>
<br>
</div>
do n=0,n_dirWRF- 1&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ; loop over directories<br>
</div>
<div><br>
&nbsp;&nbsp;&nbsp;&nbsp; f = addfiles(dirWrf(n)&#43;&quot;wrfout_d04*nc&quot;, &quot;r&quot;)<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; :<br>
</div>
end do<br>
<br>
</div>
=====<br>
<br>
</div>
dirWRF = str_split(systemfunc(&quot;echo &quot;&#43; DATADir), &quot; /&quot;)<br>
</div>
print(dirWRF)<br>
<br>
=====<br>
</div>
You can experiment<br>
<div>
<div>
<div>
<div>
<div>
<div>
<div><br>
<div>
<div><br>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<div class="gmail_extra"><br>
<div class="gmail_quote">On Mon, Oct 17, 2016 at 9:12 PM, Muhammad Omer Mughal <span dir="ltr">
&lt;<a href="mailto:m.mughal1@postgrad.curtin.edu.au" target="_blank">m.mughal1@postgrad.curtin.edu.au</a>&gt;</span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div dir="ltr">
<div id="m_-3736560129715140567divtagdefaultwrapper" style="font-size:12pt;color:#000000;font-family:Calibri,Arial,Helvetica,sans-serif">
<p>Hi&nbsp;</p>
<p><br>
</p>
<p>Kindly see the attached script</p>
<p><br>
</p>
<p>On the line number 7 I need to add multiple directories containing the wrfoutdo4 file and&nbsp;</p>
<p><br>
</p>
<p>on line number 26 I need want to write a loop that can change&nbsp;&nbsp;locations one by one and for each location gives the output as wind speed.&nbsp;</p>
<p>I would be grateful for your help and support.</p>
<p><br>
</p>
<div id="m_-3736560129715140567Signature">
<div id="m_-3736560129715140567divtagdefaultwrapper" style="font-size:12pt;color:#000000;background-color:#ffffff;font-family:Calibri,Arial,Helvetica,sans-serif">
<div style="font-family:Tahoma;font-size:13px">
<div style="font-family:Tahoma;font-size:13px"><b><br>
</b></div>
<div style="color:rgb(33,33,33);font-family:wf_segoe-ui_normal,'Segoe UI','Segoe WP',Tahoma,Arial,sans-serif;font-size:15.4545450210571px;margin:0px;background-color:rgb(255,255,255)">
<font face="Times New Roman,serif" size="3"><span style="font-size:12pt"><font face="Arial Bold" color="#1F497D" size="2"><span style="font-size:11pt">Muhammad Omer Mughal</span></font></span></font></div>
<div style="color:rgb(33,33,33);font-family:wf_segoe-ui_normal,'Segoe UI','Segoe WP',Tahoma,Arial,sans-serif;font-size:15.4545450210571px;margin:0px;background-color:rgb(255,255,255)">
<font face="Times New Roman,serif" size="3"><span style="font-size:12pt"><font face="Arial Bold" color="#1F497D" size="2"><span style="font-size:11pt">MSc&nbsp;BSc&nbsp;Mechanical Engineering</span></font><font face="Arial,sans-serif" color="#1F497D" size="1"><span style="font-size:8pt"><br>
</span></font><font face="Arial Bold" color="#AB8303" size="2"><span style="font-size:9pt">PhD&nbsp;&nbsp;Research&nbsp;Scholar</span></font></span></font></div>
<div style="color:rgb(33,33,33);font-family:wf_segoe-ui_normal,'Segoe UI','Segoe WP',Tahoma,Arial,sans-serif;font-size:15.4545450210571px;margin:0px;background-color:rgb(255,255,255)">
<font face="Times New Roman,serif" size="3"><span style="font-size:12pt"><font face="Arial Bold" color="#AB8303" size="2"><span style="font-size:9pt">Remote Sensing and Satellite Research Group</span></font></span></font></div>
<div style="color:rgb(33,33,33);font-family:wf_segoe-ui_normal,'Segoe UI','Segoe WP',Tahoma,Arial,sans-serif;font-size:15.4545450210571px;margin:0px;background-color:rgb(255,255,255)">
<font face="Times New Roman,serif" size="3"><span style="font-size:12pt"><font face="Arial Bold" color="#AB8303" size="2"><span style="font-size:9pt">Department of Imaging and Applied Physics</span></font><font face="Arial Bold" color="#AB8303" size="2"><span style="font-size:9pt"><br>
Curtin University</span></font><font face="Arial Bold" color="#AB8303" size="2"><span style="font-size:9pt"><br>
</span></font><font face="Calibri,sans-serif" color="#1F497D" size="2"><span style="font-size:11pt"><br>
</span></font><font face="Arial Bold" color="#1F497D" size="2"><span style="font-size:9pt">Curtin University</span></font><font face="Arial Bold" color="#1F497D" size="2"><span style="font-size:9pt"><br>
</span></font><font face="Arial Bold" color="#AB8303" size="2"><span style="font-size:9pt">Tel |</span></font><font face="Arial Bold" color="#1F497D" size="2"><span style="font-size:9pt">&nbsp;</span></font><font face="Arial,sans-serif" color="#1F497D" size="2"><span style="font-size:9pt">&#43;61
 8 9266 7962</span></font><font face="Calibri,sans-serif" color="#1F497D" size="2"><span style="font-size:9pt">&nbsp;</span></font><font face="Calibri,sans-serif" color="#1F497D" size="1"><span style="font-size:7pt"><br>
</span></font><font face="Arial Bold" color="#AB8303" size="2"><span style="font-size:9pt">Fax |</span></font><font face="Arial Bold" color="#1F497D" size="2"><span style="font-size:9pt">&nbsp;</span></font><font face="Arial,sans-serif" color="#1F497D" size="2"><span style="font-size:9pt">&#43;61
 8 9266 2377</span></font><font face="Arial,sans-serif" color="#1F497D" size="2"><span style="font-size:9pt"><br>
</span></font><font face="Arial Bold" color="#AB8303" size="2"><span style="font-size:9pt">Mobile |</span></font><font face="Calibri,sans-serif" color="#1F497D" size="2"><span style="font-size:9pt">&nbsp;</span></font><font face="Arial,sans-serif" color="#1F497D" size="2"><span style="font-size:9pt">0470&nbsp;237&nbsp;525</span></font><font face="Calibri,sans-serif" color="#1F497D" size="2"><span style="font-size:9pt">&nbsp;&nbsp;</span></font><font face="Calibri,sans-serif" color="#1F497D" size="2"><span style="font-size:9pt"><br>
</span></font><font face="Calibri,sans-serif" color="#1F497D" size="2"><span style="font-size:9pt"><br>
</span></font><font face="Arial Bold" color="#AB8303" size="2"><span style="font-size:9pt">Email |</span></font><font face="Calibri,sans-serif" color="#1F497D" size="2"><span style="font-size:9pt">&nbsp;</span></font><a href="mailto:m.lynch@curtin.edu.au" id="m_-3736560129715140567LPNoLP" target="_blank"><font face="Arial,sans-serif" size="2"><span style="font-size:9pt">m.mughal1@postgrad.curtin.<wbr>edu.au</span></font></a><font face="Arial,sans-serif" color="#1F497D" size="2"><span style="font-size:9pt">&nbsp;</span></font><font face="Arial,sans-serif" color="#1F497D" size="2"><span style="font-size:9pt"><br>
</span></font><font face="Arial Bold" color="#AB8303" size="2"><span style="font-size:9pt">Web |</span></font><font face="Calibri,sans-serif" color="#AB8303" size="2"><span style="font-size:9pt">&nbsp;</span></font><a href="http://curtin.edu.au/" id="m_-3736560129715140567LPNoLP" target="_blank"><font face="Calibri,sans-serif" size="2"><span style="font-size:11pt"><font face="Arial,sans-serif" size="2"><span style="font-size:9pt">http://curtin.edu.au</span></font></span></font></a><font face="Arial,sans-serif" color="#1F497D" size="2"><span style="font-size:9pt"><br>
</span></font><font face="Calibri,sans-serif" color="#1F497D" size="1"><span style="font-size:7pt"><br>
</span></font></span></font></div>
<div style="color:rgb(33,33,33);font-family:wf_segoe-ui_normal,'Segoe UI','Segoe WP',Tahoma,Arial,sans-serif;font-size:15.4545450210571px;margin:0px;background-color:rgb(255,255,255)">
<font face="Calibri,sans-serif" color="#1F497D" size="1"><span style="font-size:6pt"></span></font><font face="Arial,sans-serif" color="#1F497D" size="1"><span style="font-size:6pt">Curtin University is a trademark of Curtin University of Technology.&nbsp;</span></font><br>
</div>
<div style="color:rgb(33,33,33);font-family:wf_segoe-ui_normal,'Segoe UI','Segoe WP',Tahoma,Arial,sans-serif;font-size:15.4545450210571px;margin:0px;background-color:rgb(255,255,255)">
<font face="Times New Roman,serif" size="3"><span style="font-size:12pt"><font face="Arial,sans-serif" color="#1F497D" size="1"><span style="font-size:6pt">CRICOS Provider Code 00301J (WA), 02637B (NSW)</span></font></span></font></div>
<div style="color:rgb(33,33,33);font-family:wf_segoe-ui_normal,'Segoe UI','Segoe WP',Tahoma,Arial,sans-serif;font-size:15.4545450210571px;margin:0px;background-color:rgb(255,255,255)">
<font face="Times New Roman,serif" size="3"><span style="font-size:12pt"><font face="Arial,sans-serif" color="#1F497D" size="1"><span style="font-size:6pt"><br>
</span></font></span></font></div>
<div style="color:rgb(33,33,33);font-family:wf_segoe-ui_normal,'Segoe UI','Segoe WP',Tahoma,Arial,sans-serif;font-size:15.4545450210571px;margin:0px;background-color:rgb(255,255,255)">
<font face="Times New Roman,serif" size="3"><span style="font-size:12pt"><font face="Arial,sans-serif" color="#1F497D" size="1"><span style="font-size:6pt"><br>
</span></font></span></font></div>
</div>
</div>
</div>
</div>
</div>
<br>
______________________________<wbr>_________________<br>
ncl-talk mailing list<br>
<a href="mailto:ncl-talk@ucar.edu">ncl-talk@ucar.edu</a><br>
List instructions, subscriber options, unsubscribe:<br>
<a href="http://mailman.ucar.edu/mailman/listinfo/ncl-talk" rel="noreferrer" target="_blank">http://mailman.ucar.edu/<wbr>mailman/listinfo/ncl-talk</a><br>
<br>
</blockquote>
</div>
<br>
</div>
</div>
</body>
</html>