<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
</head>
<body>
<br>
<br>
<br>
<br>
Muhammad Omer Mughal<br>
MSc BSc Mechanical Engineering<br>
PhD Research Scholar<br>
Remote Sensing and Satellite Research Group<br>
Department of Imaging and Applied Physics<br>
Curtin University<br>
<br>
Curtin University<br>
Tel | +61 8 9266 7962<br>
Fax | +61 8 9266 2377<br>
Mobile | 0470 237 525<br>
<br>
Email | m.mughal1@postgrad.curtin.edu.au<br>
Web | http://curtin.edu.au<br>
<br>
Curtin University is a trademark of Curtin University of Technology.<br>
CRICOS Provider Code 00301J (WA), 02637B (NSW)<br>
<br>
<br>
<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> Muhammad Omer Mughal<br>
<b>Sent:</b> Wednesday, 31 January 2018 12:17:57 PM<br>
<b>To:</b> ncl-talk@ucar.edu<br>
<b>Subject:</b> script for daily average </font>
<div> </div>
</div>
<style type="text/css" style="display:none">
<!--
p
{margin-top:0;
margin-bottom:0}
-->
</style>
<div dir="ltr">
<div id="x_divtagdefaultwrapper" dir="ltr" style="font-size:12pt; color:#000000; font-family:Calibri,Helvetica,sans-serif">
<p style="margin-top:0; margin-bottom:0">Hi <br>
</p>
<p style="margin-top:0; margin-bottom:0"><br>
</p>
<p style="margin-top:0; margin-bottom:0">I wrote the following script to calculate the daily averages
<br>
</p>
<p style="margin-top:0; margin-bottom:0"><br>
</p>
<p style="margin-top:0; margin-bottom:0"></p>
<div>a=addfile("./wrfout_d05_2016-04-01_00:00:00","r")<br>
tc2= wrf_user_getvar(a,"T2",-1)<br>
tc2_dims=dimsizes(tc2)<br>
ntim=tc2_dims(0)<br>
nlat=tc2_dims(1)<br>
nlon=tc2_dims(2)<br>
<br>
ndays=ntim/24<br>
<br>
tc2D=reshape(tc2,(/ndays,nlat,nlon/))<br>
copy_VarAtts(tc2,tc2D)<br>
tc2_hr_avg=dim_avg_n_Wrap(tc2D,0)<br>
<br>
printVarSummary(tc2_hr)<br>
<br>
</div>
but I am seeing the following error
<p></p>
<p style="margin-top:0; margin-bottom:0"><br>
</p>
<p style="margin-top:0; margin-bottom:0"></p>
<div>input dimension sizes cannot conform to dimensions of input array<br>
<br>
The Var summaries are as follows<br>
<div>Variable: tc2<br>
Type: float<br>
Total Size: 75526920 bytes<br>
18881730 values<br>
Number of Dimensions: 3<br>
Dimensions and sizes: [Time | 697] x [south_north | 129] x [west_east | 210]<br>
Coordinates: <br>
Number Of Attributes: 6<br>
coordinates : XLONG XLAT XTIME<br>
stagger : <br>
units : K<br>
description : TEMP at 2 M<br>
MemoryOrder : XY <br>
FieldType : 104<br>
<br>
</div>
<div>Variable: nlat<br>
Type: integer<br>
Total Size: 4 bytes<br>
1 values<br>
Number of Dimensions: 1<br>
Dimensions and sizes: [1]<br>
Coordinates: <br>
(0) 129</div>
<br>
<br>
<br>
<br>
</div>
<br>
<p></p>
<p style="margin-top:0; margin-bottom:0"><br>
</p>
<div id="x_Signature">
<div id="x_divtagdefaultwrapper" style="font-size:12pt; color:rgb(0,0,0); background-color:rgb(255,255,255); font-family:Calibri,Arial,Helvetica,sans-serif,"EmojiFont","Apple Color Emoji","Segoe UI Emoji",NotoColorEmoji,"Segoe UI Symbol","Android Emoji",EmojiSymbols">
<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 size="3" face="Times New Roman,serif"><span style="font-size:12pt"><font size="2" color="#1F497D" face="Arial Bold"><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 size="3" face="Times New Roman,serif"><span style="font-size:12pt"><font size="2" color="#1F497D" face="Arial Bold"><span style="font-size:11pt">MSc BSc Mechanical Engineering</span></font><font size="1" color="#1F497D" face="Arial,sans-serif"><span style="font-size:8pt"><br>
</span></font><font size="2" color="#AB8303" face="Arial Bold"><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 size="3" face="Times New Roman,serif"><span style="font-size:12pt"><font size="2" color="#AB8303" face="Arial Bold"><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 size="3" face="Times New Roman,serif"><span style="font-size:12pt"><font size="2" color="#AB8303" face="Arial Bold"><span style="font-size:9pt">Department of Imaging and Applied Physics</span></font><font size="2" color="#AB8303" face="Arial Bold"><span style="font-size:9pt"><br>
Curtin University</span></font><font size="2" color="#AB8303" face="Arial Bold"><span style="font-size:9pt"><br>
</span></font><font size="2" color="#1F497D" face="Calibri,sans-serif"><span style="font-size:11pt"><br>
</span></font><font size="2" color="#1F497D" face="Arial Bold"><span style="font-size:9pt">Curtin University</span></font><font size="2" color="#1F497D" face="Arial Bold"><span style="font-size:9pt"><br>
</span></font><font size="2" color="#AB8303" face="Arial Bold"><span style="font-size:9pt">Tel |</span></font><font size="2" color="#1F497D" face="Arial Bold"><span style="font-size:9pt"> </span></font><font size="2" color="#1F497D" face="Arial,sans-serif"><span style="font-size:9pt">+61
8 9266 7962</span></font><font size="2" color="#1F497D" face="Calibri,sans-serif"><span style="font-size:9pt"> </span></font><font size="1" color="#1F497D" face="Calibri,sans-serif"><span style="font-size:7pt"><br>
</span></font><font size="2" color="#AB8303" face="Arial Bold"><span style="font-size:9pt">Fax |</span></font><font size="2" color="#1F497D" face="Arial Bold"><span style="font-size:9pt"> </span></font><font size="2" color="#1F497D" face="Arial,sans-serif"><span style="font-size:9pt">+61
8 9266 2377</span></font><font size="2" color="#1F497D" face="Arial,sans-serif"><span style="font-size:9pt"><br>
</span></font><font size="2" color="#AB8303" face="Arial Bold"><span style="font-size:9pt">Mobile |</span></font><font size="2" color="#1F497D" face="Calibri,sans-serif"><span style="font-size:9pt"> </span></font><font size="2" color="#1F497D" face="Arial,sans-serif"><span style="font-size:9pt">0470 237 525</span></font><font size="2" color="#1F497D" face="Calibri,sans-serif"><span style="font-size:9pt"> </span></font><font size="2" color="#1F497D" face="Calibri,sans-serif"><span style="font-size:9pt"><br>
</span></font><font size="2" color="#1F497D" face="Calibri,sans-serif"><span style="font-size:9pt"><br>
</span></font><font size="2" color="#AB8303" face="Arial Bold"><span style="font-size:9pt">Email |</span></font><font size="2" color="#1F497D" face="Calibri,sans-serif"><span style="font-size:9pt"> </span></font><a href="mailto:m.lynch@curtin.edu.au" target="_blank" id="LPNoLP"><font size="2" face="Arial,sans-serif"><span style="font-size:9pt">m.mughal1@postgrad.curtin.edu.au</span></font></a><font size="2" color="#1F497D" face="Arial,sans-serif"><span style="font-size:9pt"> </span></font><font size="2" color="#1F497D" face="Arial,sans-serif"><span style="font-size:9pt"><br>
</span></font><font size="2" color="#AB8303" face="Arial Bold"><span style="font-size:9pt">Web |</span></font><font size="2" color="#AB8303" face="Calibri,sans-serif"><span style="font-size:9pt"> </span></font><a href="http://curtin.edu.au/" target="_blank" id="LPNoLP"><font size="2" face="Calibri,sans-serif"><span style="font-size:11pt"><font size="2" face="Arial,sans-serif"><span style="font-size:9pt">http://curtin.edu.au</span></font></span></font></a><font size="2" color="#1F497D" face="Arial,sans-serif"><span style="font-size:9pt"><br>
</span></font><font size="1" color="#1F497D" face="Calibri,sans-serif"><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 size="1" color="#1F497D" face="Calibri,sans-serif"><span style="font-size:6pt"></span></font><font size="1" color="#1F497D" face="Arial,sans-serif"><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 size="3" face="Times New Roman,serif"><span style="font-size:12pt"><font size="1" color="#1F497D" face="Arial,sans-serif"><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 size="3" face="Times New Roman,serif"><span style="font-size:12pt"><font size="1" color="#1F497D" face="Arial,sans-serif"><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 size="3" face="Times New Roman,serif"><span style="font-size:12pt"><font size="1" color="#1F497D" face="Arial,sans-serif"><span style="font-size:6pt"><br>
</span></font></span></font></div>
</div>
</div>
</div>
</div>
</div>
</body>
</html>