<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<style type="text/css" style="display:none;"><!-- P {margin-top:0;margin-bottom:0;} --></style>
</head>
<body dir="ltr">
<div id="divtagdefaultwrapper" style="font-size:12pt;color:#000000;background-color:#FFFFFF;font-family:Calibri,Arial,Helvetica,sans-serif;">
<div id="divtagdefaultwrapper" style="font-size:12pt;color:#000000;background-color:#FFFFFF;font-family:Calibri,Arial,Helvetica,sans-serif;">
<p><span id="ms-rterangepaste-start"></span></p>
<p class="MsoNormal" align="left"><span style="font-size:10.0pt;font-family:"Times New Roman","serif";mso-fareast-font-family:
"Times New Roman";mso-bidi-font-weight:normal">Hi Mary <o:p></o:p></span></p>
<p class="MsoNormal" align="left"><span style="font-size:10.0pt;font-family:"Times New Roman","serif";mso-fareast-font-family:
"Times New Roman";mso-bidi-font-weight:normal"><o:p> </o:p></span></p>
<p class="MsoNormal" align="left"><span style="font-size:10.0pt;font-family:"Times New Roman","serif";mso-fareast-font-family:
"Times New Roman";mso-bidi-font-weight:normal">It seems like there is a memory problem when I try to use either of the following lines<o:p></o:p></span></p>
<p class="MsoNormal" align="left"><span style="font-size:10.0pt;font-family:"Times New Roman","serif";mso-fareast-font-family:
"Times New Roman";mso-bidi-font-weight:normal"><o:p> </o:p></span></p>
<p class="MsoNormal" align="left"><span style="font-size:10.0pt;font-family:"Times New Roman","serif";mso-fareast-font-family:
"Times New Roman";mso-bidi-font-weight:normal">lat1 = f[0]->XLAT(0,ny,mx)<o:p></o:p></span></p>
<p class="MsoNormal" align="left"><span style="font-size:10.0pt;font-family:"Times New Roman","serif";mso-fareast-font-family:
"Times New Roman";mso-bidi-font-weight:normal">lon1 = f[0]->XLONG(0,ny,mx)<o:p></o:p></span></p>
<p class="MsoNormal" align="left"><span style="font-size:10.0pt;font-family:"Times New Roman","serif";mso-fareast-font-family:
"Times New Roman";mso-bidi-font-weight:normal"><o:p> </o:p></span></p>
<p class="MsoNormal" align="left"><span style="font-size:10.0pt;font-family:"Times New Roman","serif";mso-fareast-font-family:
"Times New Roman";mso-bidi-font-weight:normal">I get the following error<o:p></o:p></span></p>
<p class="MsoNormal" align="left"><span style="font-size:10.0pt;font-family:"Times New Roman","serif";mso-fareast-font-family:
"Times New Roman";mso-bidi-font-weight:normal"><o:p> </o:p></span></p>
<p class="MsoNormal" align="left"><span style="font-size: 10pt; font-family: "Times New Roman", serif; background-image: initial; background-attachment: initial; background-size: initial; background-origin: initial; background-clip: initial; background-position: initial; background-repeat: initial;">fatal:["NclFile.c":2099]:Subscript
out of range, error in subscript #1fatal:Memory allocation failure:[errno=12]fatal:["Execute.c":8575]:Execute: Error occurred at or near line 22 in file wrf_script-r2<br>
<br>
While using the line</span><span style="font-size: 10pt; font-family: "Times New Roman", serif;"> <span style="background-image: initial; background-attachment: initial; background-size: initial; background-origin: initial; background-clip: initial; background-position: initial; background-repeat: initial;"><br>
<br>
lat1 = wrf_user_getvar(f,"lat",0)<br>
lon1 = wrf_user_getvar(f,"lon",0)<br>
<br>
I get the following error<br>
<br>
<!--[if !supportLineBreakNewLine]--><br>
<!--[endif]--></span></span><span style="font-size:10.0pt;font-family:"Times New Roman","serif";
mso-fareast-font-family:"Times New Roman";mso-bidi-font-weight:normal"><o:p></o:p></span></p>
<p class="MsoNormal" align="left" style="background-image: initial; background-attachment: initial; background-size: initial; background-origin: initial; background-clip: initial; background-position: initial; background-repeat: initial;">
<span style="font-size: 10pt; font-family: "Times New Roman", serif;">fatal:Subscript out of range, error in subscript #1<br>
fatal:An error occurred reading u<br>
fatal:["Execute.c":8575]:Execute: Error occurred at or near line 26 in file wrf_script-r2<o:p></o:p></span></p>
<span id="ms-rterangepaste-end"></span><br>
<b style="font-family: Tahoma; font-size: 13px;"></b>
<p></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 color="#1F497D" face="Arial Bold" 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 color="#1F497D" face="Arial Bold" size="2"><span style="font-size:11pt">MSc BSc Mechanical Engineering</span></font><font color="#1F497D" face="Arial,sans-serif" size="1"><span style="font-size:8pt"><br>
</span></font><font color="#AB8303" face="Arial Bold" size="2"><span style="font-size:9pt">PhD Research 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 color="#AB8303" face="Arial Bold" 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 color="#AB8303" face="Arial Bold" size="2"><span style="font-size:9pt">Department of Imaging and Applied Physics</span></font><font color="#AB8303" face="Arial Bold" size="2"><span style="font-size:9pt"><br>
Curtin University</span></font><font color="#AB8303" face="Arial Bold" size="2"><span style="font-size:9pt"><br>
</span></font><font color="#1F497D" face="Calibri,sans-serif" size="2"><span style="font-size:11pt"><br>
</span></font><font color="#1F497D" face="Arial Bold" size="2"><span style="font-size:9pt">Curtin University</span></font><font color="#1F497D" face="Arial Bold" size="2"><span style="font-size:9pt"><br>
</span></font><font color="#AB8303" face="Arial Bold" size="2"><span style="font-size:9pt">Tel |</span></font><font color="#1F497D" face="Arial Bold" size="2"><span style="font-size:9pt"> </span></font><font color="#1F497D" face="Arial,sans-serif" size="2"><span style="font-size:9pt">+61
8 9266 7962</span></font><font color="#1F497D" face="Calibri,sans-serif" size="2"><span style="font-size:9pt"> </span></font><font color="#1F497D" face="Calibri,sans-serif" size="1"><span style="font-size:7pt"><br>
</span></font><font color="#AB8303" face="Arial Bold" size="2"><span style="font-size:9pt">Fax |</span></font><font color="#1F497D" face="Arial Bold" size="2"><span style="font-size:9pt"> </span></font><font color="#1F497D" face="Arial,sans-serif" size="2"><span style="font-size:9pt">+61
8 9266 2377</span></font><font color="#1F497D" face="Arial,sans-serif" size="2"><span style="font-size:9pt"><br>
</span></font><font color="#AB8303" face="Arial Bold" size="2"><span style="font-size:9pt">Mobile |</span></font><font color="#1F497D" face="Calibri,sans-serif" size="2"><span style="font-size:9pt"> </span></font><font color="#1F497D" face="Arial,sans-serif" size="2"><span style="font-size:9pt">0470 237 525</span></font><font color="#1F497D" face="Calibri,sans-serif" size="2"><span style="font-size:9pt"> </span></font><font color="#1F497D" face="Calibri,sans-serif" size="2"><span style="font-size:9pt"><br>
</span></font><font color="#1F497D" face="Calibri,sans-serif" size="2"><span style="font-size:9pt"><br>
</span></font><font color="#AB8303" face="Arial Bold" size="2"><span style="font-size:9pt">Email |</span></font><font color="#1F497D" face="Calibri,sans-serif" size="2"><span style="font-size:9pt"> </span></font><a id="LPNoLP" href="mailto:m.lynch@curtin.edu.au" target="_blank"><font face="Arial,sans-serif" size="2"><span style="font-size:9pt">m.mughal1@postgrad.curtin.edu.au</span></font></a><font color="#1F497D" face="Arial,sans-serif" size="2"><span style="font-size:9pt"> </span></font><font color="#1F497D" face="Arial,sans-serif" size="2"><span style="font-size:9pt"><br>
</span></font><font color="#AB8303" face="Arial Bold" size="2"><span style="font-size:9pt">Web |</span></font><font color="#AB8303" face="Calibri,sans-serif" size="2"><span style="font-size:9pt"> </span></font><a id="LPNoLP" href="http://curtin.edu.au/" 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 color="#1F497D" face="Arial,sans-serif" size="2"><span style="font-size:9pt"><br>
</span></font><font color="#1F497D" face="Calibri,sans-serif" 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 color="#1F497D" face="Calibri,sans-serif" size="1"><span style="font-size:6pt"></span></font><font color="#1F497D" face="Arial,sans-serif" size="1"><span style="font-size:6pt">Curtin University is a trademark of Curtin University of Technology. </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 color="#1F497D" face="Arial,sans-serif" 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 color="#1F497D" face="Arial,sans-serif" 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 color="#1F497D" face="Arial,sans-serif" size="1"><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> Mary Haley <haley@ucar.edu><br>
<b>Sent:</b> Wednesday, 31 August 2016 5:39:29 AM<br>
<b>To:</b> Muhammad Omer Mughal<br>
<b>Cc:</b> ncl-talk@ucar.edu<br>
<b>Subject:</b> Re: [ncl-talk] Adding multiple WRF output files to a script</font>
<div> </div>
</div>
<div>
<div dir="ltr">
<div class="gmail_default" style="font-size:small">You have to be careful when you use "addfile" and "addfiles" interchangeably, because "addfiles" returns a list object, while "addfile" returns a file pointer.</div>
<div class="gmail_default" style="font-size:small"><br>
</div>
<div class="gmail_default" style="font-size:small">In your script, you are using "addfiles" to open a series of files, but then trying to use "f" as if it were a file pointer. </div>
<div class="gmail_default" style="font-size:small"><br>
</div>
<div class="gmail_default" style="font-size:small">It's telling you where the problem is:</div>
<div class="gmail_default" style="font-size:small"><br>
</div>
<div class="gmail_default" style="font-size:small"> lat1 = f->XLAT(0,ny,mx) ; the is the nearest grid point</div>
<div class="gmail_default" style="font-size:small"><br>
</div>
<div class="gmail_default" style="font-size:small">You can't use "f->" syntax with something opened with addfiles.</div>
<div class="gmail_default" style="font-size:small"><br>
</div>
<div class="gmail_default" style="font-size:small">One of these should work:</div>
<div class="gmail_default" style="font-size:small"><br>
</div>
<div class="gmail_default" style="font-size:small"> lat1 = f[0]->XLAT(0,ny,mx)</div>
<div class="gmail_default" style="font-size:small"><br>
</div>
<div class="gmail_default" style="font-size:small">or</div>
<div class="gmail_default" style="font-size:small"><br>
</div>
<div class="gmail_default" style="font-size:small"> lat1 = wrf_user_getvar(f,"lat",0)</div>
<div class="gmail_default" style="font-size:small"><br>
</div>
<div class="gmail_default" style="font-size:small">You will need to fix "lon1" too.</div>
<div class="gmail_default" style="font-size:small"><br>
</div>
<div class="gmail_default" style="font-size:small">--Mary</div>
<div class="gmail_default" style="font-size:small"><br>
</div>
<div class="gmail_default" style="font-size:small"><br>
</div>
</div>
<div class="gmail_extra"><br>
<div class="gmail_quote">On Tue, Aug 30, 2016 at 7:28 AM, Muhammad Omer Mughal <span dir="ltr">
<<a href="mailto:m.mughal1@postgrad.curtin.edu.au" target="_blank">m.mughal1@postgrad.curtin.edu.au</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div>
<div style="font-size:12pt;color:#000000;background-color:#ffffff;font-family:Calibri,Arial,Helvetica,sans-serif">
<p>Hi Mary <br>
</p>
<p><br>
</p>
<p>I tried to use addfiles for just the fourth domain as the wrf output is for the fourth domain is split up into multiple files. I put all the variables in a single file as it would exceed the limit of my computer.</p>
<p><br>
</p>
<p>When I used the script you had sent earlier over just the fourth domain I get the following error.</p>
<p><br>
</p>
<p></p>
<div>fatal:(f) not reference to a valid file<br>
fatal:["Execute.c":8575]:<wbr>Execute: Error occurred at or near line 22 in file wrf_script-r2<br>
</div>
<br>
<p></p>
<p>The script is attached again for convenience.<br>
</p>
<span class="">
<div>
<div 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 color="#1F497D" face="Arial Bold" 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 color="#1F497D" face="Arial Bold" size="2"><span style="font-size:11pt">MSc BSc Mechanical Engineering</span></font><font color="#1F497D" face="Arial,sans-serif" size="1"><span style="font-size:8pt"><br>
</span></font><font color="#AB8303" face="Arial Bold" size="2"><span style="font-size:9pt">PhD Research 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 color="#AB8303" face="Arial Bold" 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 color="#AB8303" face="Arial Bold" size="2"><span style="font-size:9pt">Department of Imaging and Applied Physics</span></font><font color="#AB8303" face="Arial Bold" size="2"><span style="font-size:9pt"><br>
Curtin University</span></font><font color="#AB8303" face="Arial Bold" size="2"><span style="font-size:9pt"><br>
</span></font><font color="#1F497D" face="Calibri,sans-serif" size="2"><span style="font-size:11pt"><br>
</span></font><font color="#1F497D" face="Arial Bold" size="2"><span style="font-size:9pt">Curtin University</span></font><font color="#1F497D" face="Arial Bold" size="2"><span style="font-size:9pt"><br>
</span></font><font color="#AB8303" face="Arial Bold" size="2"><span style="font-size:9pt">Tel |</span></font><font color="#1F497D" face="Arial Bold" size="2"><span style="font-size:9pt"> </span></font><font color="#1F497D" face="Arial,sans-serif" size="2"><span style="font-size:9pt">+61
8 9266 7962</span></font><font color="#1F497D" face="Calibri,sans-serif" size="2"><span style="font-size:9pt"> </span></font><font color="#1F497D" face="Calibri,sans-serif" size="1"><span style="font-size:7pt"><br>
</span></font><font color="#AB8303" face="Arial Bold" size="2"><span style="font-size:9pt">Fax |</span></font><font color="#1F497D" face="Arial Bold" size="2"><span style="font-size:9pt"> </span></font><font color="#1F497D" face="Arial,sans-serif" size="2"><span style="font-size:9pt">+61
8 9266 2377</span></font><font color="#1F497D" face="Arial,sans-serif" size="2"><span style="font-size:9pt"><br>
</span></font><font color="#AB8303" face="Arial Bold" size="2"><span style="font-size:9pt">Mobile |</span></font><font color="#1F497D" face="Calibri,sans-serif" size="2"><span style="font-size:9pt"> </span></font><font color="#1F497D" face="Arial,sans-serif" size="2"><span style="font-size:9pt">0470 237 525</span></font><font color="#1F497D" face="Calibri,sans-serif" size="2"><span style="font-size:9pt"> </span></font><font color="#1F497D" face="Calibri,sans-serif" size="2"><span style="font-size:9pt"><br>
</span></font><font color="#1F497D" face="Calibri,sans-serif" size="2"><span style="font-size:9pt"><br>
</span></font><font color="#AB8303" face="Arial Bold" size="2"><span style="font-size:9pt">Email |</span></font><font color="#1F497D" face="Calibri,sans-serif" size="2"><span style="font-size:9pt"> </span></font><a href="mailto:m.lynch@curtin.edu.au" 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 color="#1F497D" face="Arial,sans-serif" size="2"><span style="font-size:9pt"> </span></font><font color="#1F497D" face="Arial,sans-serif" size="2"><span style="font-size:9pt"><br>
</span></font><font color="#AB8303" face="Arial Bold" size="2"><span style="font-size:9pt">Web |</span></font><font color="#AB8303" face="Calibri,sans-serif" size="2"><span style="font-size:9pt"> </span></font><a href="http://curtin.edu.au/" 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 color="#1F497D" face="Arial,sans-serif" size="2"><span style="font-size:9pt"><br>
</span></font><font color="#1F497D" face="Calibri,sans-serif" 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 color="#1F497D" face="Calibri,sans-serif" size="1"><span style="font-size:6pt"></span></font><font color="#1F497D" face="Arial,sans-serif" size="1"><span style="font-size:6pt">Curtin University is a trademark of Curtin University of Technology. </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 color="#1F497D" face="Arial,sans-serif" 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 color="#1F497D" face="Arial,sans-serif" 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 color="#1F497D" face="Arial,sans-serif" size="1"><span style="font-size:6pt"><br>
</span></font></span></font></div>
</div>
</div>
</div>
</span></div>
<hr style="display:inline-block;width:98%">
<div dir="ltr"><font face="Calibri, sans-serif" style="font-size:11pt" color="#000000"><b>From:</b> Mary Haley <<a href="mailto:haley@ucar.edu" target="_blank">haley@ucar.edu</a>><br>
<b>Sent:</b> Tuesday, 30 August 2016 4:21:58 AM
<div>
<div class="h5"><br>
<b>To:</b> Muhammad Omer Mughal<br>
<b>Cc:</b> <a href="mailto:ncl-talk@ucar.edu" target="_blank">ncl-talk@ucar.edu</a><br>
<b>Subject:</b> Re: [ncl-talk] Adding multiple WRF output files to a script</div>
</div>
</font>
<div> </div>
</div>
<div>
<div class="h5">
<div>
<div dir="ltr">
<div class="gmail_default" style="font-size:small">It appears that you are using "addfiles" to open a bunch of WRF files that are from different domains. I assume these different domain files are of different spatial sizes, and hence addfiles shouldn't be used
to open all of them together.</div>
<div class="gmail_default" style="font-size:small"><br>
</div>
<div class="gmail_default" style="font-size:small">Addfiles is really mean to be used on similar files, for example, files with the same spatial dimensions, but across different times or ensembles.</div>
<div class="gmail_default" style="font-size:small"><br>
</div>
<div class="gmail_default" style="font-size:small">It's not clear to me what you are trying to accomplish with your original script, because you have a couple of calculations, but nothing is really done with them.</div>
<div class="gmail_default" style="font-size:small"><br>
</div>
<div class="gmail_default" style="font-size:small">In any case, I suggest that since you are calling different types of files, you will need to call "addfile" inside the loop for each file, and do the necessary calculation:</div>
<div class="gmail_default" style="font-size:small"><br>
</div>
<div class="gmail_default">
<div class="gmail_default"><font face="monospace, monospace"> FILES = systemfunc (" ls -1 " + DATADir + "wrfout* ")</font></div>
<div class="gmail_default"><font face="monospace, monospace"> nfiles = dimsizes(FILES)</font></div>
<div class="gmail_default"><font face="monospace, monospace"> </font></div>
<div class="gmail_default"><font face="monospace, monospace"> do nf = 0,nfiles-1 ; # of files loop</font></div>
<div class="gmail_default"><font face="monospace, monospace"> f = addfile(FILES(nf))+".nc","r")</font></div>
<div class="gmail_default"><font face="monospace, monospace"> times = wrf_user_list_times(f)</font></div>
<div class="gmail_default"><font face="monospace, monospace"> ntimes = dimsizes(ntimes)</font></div>
<div class="gmail_default"><font face="monospace, monospace"><br>
</font></div>
<div class="gmail_default"><font face="monospace, monospace"> u = wrf_user_getvar(f,"ua",-1) ; u averaged to mass points</font></div>
<div class="gmail_default"><font face="monospace, monospace"> v = wrf_user_getvar(f,"va",-1) ; v averaged to mass points</font></div>
<div class="gmail_default" style="font-size:small">. . .</div>
<div class="gmail_default" style="font-size:small"><br>
</div>
<div class="gmail_default" style="font-size:small"><br>
</div>
</div>
</div>
<div class="gmail_extra"><br>
<div class="gmail_quote">On Mon, Aug 29, 2016 at 6:35 AM, Muhammad Omer Mughal <span dir="ltr">
<<a href="mailto:m.mughal1@postgrad.curtin.edu.au" target="_blank">m.mughal1@postgrad.curtin.<wbr>edu.au</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div>
<div style="font-size:12pt;color:#000000;background-color:#ffffff;font-family:Calibri,Arial,Helvetica,sans-serif">
<p>Hi Mary</p>
<p><br>
</p>
<p>Thanks for the reply. Kindly note intially ntimes was not defined due to error in the line
<br>
</p>
<p><span><br>
</span></p>
<p><span>ntimes = dimsizes(ntimes)</span><br>
</p>
<p>so I changed it to <br>
</p>
<p><span>ntimes = dimsizes(times)</span></p>
<p><span><br>
</span></p>
<p><span>After that I get the error the detail of which is listed in the attached file.</span><br>
</p>
<span>
<p><br>
</p>
<div>
<div 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 color="#1F497D" face="Arial Bold" 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 color="#1F497D" face="Arial Bold" size="2"><span style="font-size:11pt">MSc BSc Mechanical Engineering</span></font><font color="#1F497D" face="Arial,sans-serif" size="1"><span style="font-size:8pt"><br>
</span></font><font color="#AB8303" face="Arial Bold" size="2"><span style="font-size:9pt">PhD Research 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 color="#AB8303" face="Arial Bold" 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 color="#AB8303" face="Arial Bold" size="2"><span style="font-size:9pt">Department of Imaging and Applied Physics</span></font><font color="#AB8303" face="Arial Bold" size="2"><span style="font-size:9pt"><br>
Curtin University</span></font><font color="#AB8303" face="Arial Bold" size="2"><span style="font-size:9pt"><br>
</span></font><font color="#1F497D" face="Calibri,sans-serif" size="2"><span style="font-size:11pt"><br>
</span></font><font color="#1F497D" face="Arial Bold" size="2"><span style="font-size:9pt">Curtin University</span></font><font color="#1F497D" face="Arial Bold" size="2"><span style="font-size:9pt"><br>
</span></font><font color="#AB8303" face="Arial Bold" size="2"><span style="font-size:9pt">Tel |</span></font><font color="#1F497D" face="Arial Bold" size="2"><span style="font-size:9pt"> </span></font><font color="#1F497D" face="Arial,sans-serif" size="2"><span style="font-size:9pt">+61
8 9266 7962</span></font><font color="#1F497D" face="Calibri,sans-serif" size="2"><span style="font-size:9pt"> </span></font><font color="#1F497D" face="Calibri,sans-serif" size="1"><span style="font-size:7pt"><br>
</span></font><font color="#AB8303" face="Arial Bold" size="2"><span style="font-size:9pt">Fax |</span></font><font color="#1F497D" face="Arial Bold" size="2"><span style="font-size:9pt"> </span></font><font color="#1F497D" face="Arial,sans-serif" size="2"><span style="font-size:9pt">+61
8 9266 2377</span></font><font color="#1F497D" face="Arial,sans-serif" size="2"><span style="font-size:9pt"><br>
</span></font><font color="#AB8303" face="Arial Bold" size="2"><span style="font-size:9pt">Mobile |</span></font><font color="#1F497D" face="Calibri,sans-serif" size="2"><span style="font-size:9pt"> </span></font><font color="#1F497D" face="Arial,sans-serif" size="2"><span style="font-size:9pt">0470 237 525</span></font><font color="#1F497D" face="Calibri,sans-serif" size="2"><span style="font-size:9pt"> </span></font><font color="#1F497D" face="Calibri,sans-serif" size="2"><span style="font-size:9pt"><br>
</span></font><font color="#1F497D" face="Calibri,sans-serif" size="2"><span style="font-size:9pt"><br>
</span></font><font color="#AB8303" face="Arial Bold" size="2"><span style="font-size:9pt">Email |</span></font><font color="#1F497D" face="Calibri,sans-serif" size="2"><span style="font-size:9pt"> </span></font><a href="mailto:m.lynch@curtin.edu.au" target="_blank"><font face="Arial,sans-serif" size="2"><span style="font-size:9pt">m.mughal1@postgrad.curtin.ed<wbr>u.au</span></font></a><font color="#1F497D" face="Arial,sans-serif" size="2"><span style="font-size:9pt"> </span></font><font color="#1F497D" face="Arial,sans-serif" size="2"><span style="font-size:9pt"><br>
</span></font><font color="#AB8303" face="Arial Bold" size="2"><span style="font-size:9pt">Web |</span></font><font color="#AB8303" face="Calibri,sans-serif" size="2"><span style="font-size:9pt"> </span></font><a href="http://curtin.edu.au/" 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 color="#1F497D" face="Arial,sans-serif" size="2"><span style="font-size:9pt"><br>
</span></font><font color="#1F497D" face="Calibri,sans-serif" 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 color="#1F497D" face="Calibri,sans-serif" size="1"><span style="font-size:6pt"></span></font><font color="#1F497D" face="Arial,sans-serif" size="1"><span style="font-size:6pt">Curtin University is a trademark of Curtin University of Technology. </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 color="#1F497D" face="Arial,sans-serif" 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 color="#1F497D" face="Arial,sans-serif" 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 color="#1F497D" face="Arial,sans-serif" size="1"><span style="font-size:6pt"><br>
</span></font></span></font></div>
</div>
</div>
</div>
</span></div>
<hr style="display:inline-block;width:98%">
<div dir="ltr"><font face="Calibri, sans-serif" style="font-size:11pt" color="#000000"><b>From:</b> Mary Haley <<a href="mailto:haley@ucar.edu" target="_blank">haley@ucar.edu</a>><br>
<b>Sent:</b> Saturday, 27 August 2016 3:22:53 AM<br>
<b>To:</b> Muhammad Omer Mughal<br>
<b>Cc:</b> <a href="mailto:ncl-talk@ucar.edu" target="_blank">ncl-talk@ucar.edu</a><br>
<b>Subject:</b> Re: [ncl-talk] Adding multiple WRF output files to a script</font>
<div> </div>
</div>
<div>
<div>
<div>
<div dir="ltr">
<div class="gmail_default" style="font-size:small">Dear Muhammad,</div>
<div class="gmail_default" style="font-size:small"><br>
</div>
<div class="gmail_default" style="font-size:small">The script you provided wouldn't run as-is, because you are referencing "times", but never setting it.</div>
<div class="gmail_default" style="font-size:small"><br>
</div>
<div class="gmail_default" style="font-size:small">Also, you are calling "addfiles" inside a do loop across the file names, but addfiles is meant to be used on an array of files.</div>
<div class="gmail_default" style="font-size:small"><br>
</div>
<div class="gmail_default" style="font-size:small">In the future, it would help if you provide the exact error message, and the full script, so we can see what line number the script is failing on.</div>
<div class="gmail_default" style="font-size:small"><br>
</div>
<div class="gmail_default" style="font-size:small">See the attached wrf_script_mod which is a modification of your file. It's likely not going to run, but hopefully it will help you get started in using addfiles correctly.</div>
<div class="gmail_default" style="font-size:small"><br>
</div>
<div class="gmail_default" style="font-size:small">--Mary</div>
<div class="gmail_default" style="font-size:small"><br>
</div>
</div>
<div class="gmail_extra"><br>
<div class="gmail_quote">On Fri, Aug 26, 2016 at 4:08 AM, Muhammad Omer Mughal <span dir="ltr">
<<a href="mailto:m.mughal1@postgrad.curtin.edu.au" target="_blank">m.mughal1@postgrad.curtin.edu<wbr>.au</a>></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 style="font-size:12pt;color:#000000;background-color:#ffffff;font-family:Calibri,Arial,Helvetica,sans-serif">
<p>Hi <br>
</p>
<p><br>
</p>
<p>I am trying to add multiple wrfoutput files in the attached script but I get an error of mismatch dimensions. Can some one help please</p>
<p><br>
</p>
<p><br>
</p>
<p><br>
</p>
<div>
<div 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 BSc 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 Research 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"> </span></font><font face="Arial,sans-serif" size="2" color="#1F497D"><span style="font-size:9pt">+61
8 9266 7962</span></font><font face="Calibri,sans-serif" size="2" color="#1F497D"><span style="font-size:9pt"> </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"> </span></font><font face="Arial,sans-serif" size="2" color="#1F497D"><span style="font-size:9pt">+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"> </span></font><font face="Arial,sans-serif" size="2" color="#1F497D"><span style="font-size:9pt">0470 237 525</span></font><font face="Calibri,sans-serif" size="2" color="#1F497D"><span style="font-size:9pt"> </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"> </span></font><a href="mailto:m.lynch@curtin.edu.au" target="_blank"><font face="Arial,sans-serif" size="2"><span style="font-size:9pt">m.mughal1@postgrad.curtin.ed<wbr>u.au</span></font></a><font face="Arial,sans-serif" size="2" color="#1F497D"><span style="font-size:9pt"> </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"> </span></font><a href="http://curtin.edu.au/" 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" 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. </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>
</div>
<br>
______________________________<wbr>_________________<br>
ncl-talk mailing list<br>
<a href="mailto:ncl-talk@ucar.edu" target="_blank">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/mailma<wbr>n/listinfo/ncl-talk</a><br>
<br>
</blockquote>
</div>
<br>
</div>
</div>
</div>
</div>
</div>
</blockquote>
</div>
<br>
</div>
</div>
</div>
</div>
</div>
</blockquote>
</div>
<br>
</div>
</div>
</div>
</body>
</html>