<div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div>This is a subtle error which I can not seem to isolate. The issue is tha</div><div><br></div><div>dimensions:<br> lon = 192 ;<br> lat = 94 ;<br> <b>level = 1</b> ;<br> time = UNLIMITED ; // (1460 currently)<br>variables:<br> <br> short uwnd(time, <b>level, </b>lat, lon) ;</div><div><br></div><div>===</div><div>It works fine on variable with multiple level. <br></div><div>I speculate that NCL's dimension reduction that leads to the error.</div><div>===</div><div><br></div><div>Fortunately, there is a work-around:</div><div><br></div><div>Change:</div><div> uwnd_practice = short2flt(fil1->uwnd) ; [time | 1460] x <b>[level | 1]</b> x [lat | 94] x [lon | 192]<br></div><div>to<br></div><div> uwnd_practice = short2flt(fil1->uwnd<b>(:,0,:,:)) </b>; [time | 1460] x [lat | 94] x [lon | 192]</div><div><br></div><div>The result will be:</div><div><br></div><div> uwnd_daily: [time | 365] x [lat | 94] x [lon | 192]<br></div></div></div></div></div></div></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Thu, Apr 18, 2019 at 6:42 AM Barry Lynn <<a href="mailto:barry.h.lynn@gmail.com">barry.h.lynn@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr">Hi:<div><br></div><div>Please see here -- the explanation of the error message might be of help.</div><div><br></div><div><a href="https://www.ncl.ucar.edu/Document/Language/error_messages.shtml#AssignMismatch" target="_blank">https://www.ncl.ucar.edu/Document/Language/error_messages.shtml#AssignMismatch</a><br></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Thu, Apr 18, 2019 at 3:18 PM Nkese Mc Shine <<a href="mailto:Nkese.McShine@sta.uwi.edu" target="_blank">Nkese.McShine@sta.uwi.edu</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
<div lang="EN-GB">
<div class="gmail-m_-5400551053473727104gmail-m_-6923184100214285775WordSection1">
<p class="MsoNormal"><span style="font-size:11pt;font-family:Calibri,sans-serif;color:rgb(31,73,125)" lang="EN-US">Hi,<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:11pt;font-family:Calibri,sans-serif;color:rgb(31,73,125)" lang="EN-US">This line causes the error.<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:11pt;font-family:Calibri,sans-serif;color:rgb(31,73,125)" lang="EN-US"><u></u> <u></u></span></p>
<p class="MsoNormal"><span style="font-size:10pt;font-family:Tahoma,sans-serif;color:black">uwnd_daily = calculate_daily_values(uwnd_practice, "avg", 0, opt)<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:10pt;font-family:Tahoma,sans-serif;color:black"><u></u> <u></u></span></p>
<p class="MsoNormal"><span style="font-size:11pt;font-family:Calibri,sans-serif;color:rgb(31,73,125)" lang="EN-US">Regards,<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:11pt;font-family:Calibri,sans-serif;color:rgb(31,73,125)" lang="EN-US">Nkese.<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:11pt;font-family:Calibri,sans-serif;color:rgb(31,73,125)" lang="EN-US"><u></u> <u></u></span></p>
<p class="MsoNormal"><b><span style="font-size:11pt;font-family:Calibri,sans-serif" lang="EN-US">From:</span></b><span style="font-size:11pt;font-family:Calibri,sans-serif" lang="EN-US"> Barry Lynn <<a href="mailto:barry.h.lynn@gmail.com" target="_blank">barry.h.lynn@gmail.com</a>>
<br>
<b>Sent:</b> Thursday, April 18, 2019 8:16 AM<br>
<b>To:</b> Nkese Mc Shine <<a href="mailto:Nkese.McShine@sta.uwi.edu" target="_blank">Nkese.McShine@sta.uwi.edu</a>><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] Daily averages from 6 hourly data<u></u><u></u></span></p>
<p class="MsoNormal"><u></u> <u></u></p>
<div>
<p class="MsoNormal">Hello:<u></u><u></u></p>
<div>
<p class="MsoNormal"><u></u> <u></u></p>
</div>
<div>
<p class="MsoNormal">What line causes your error?<u></u><u></u></p>
</div>
</div>
<p class="MsoNormal"><u></u> <u></u></p>
<div>
<div>
<p class="MsoNormal">On Thu, Apr 18, 2019 at 2:52 PM Nkese Mc Shine <<a href="mailto:Nkese.McShine@sta.uwi.edu" target="_blank">Nkese.McShine@sta.uwi.edu</a>> wrote:<u></u><u></u></p>
</div>
<blockquote style="border-color:currentcolor currentcolor currentcolor rgb(204,204,204);border-style:none none none solid;border-width:medium medium medium 1pt;padding:0in 0in 0in 6pt;margin-left:4.8pt;margin-right:0in">
<div>
<div>
<p class="MsoNormal"><span style="font-size:10pt;font-family:Tahoma,sans-serif;color:black">Good morning,<br>
<br>
I have 6 hourly wind data and I am trying to get the daily averages however I am getting and error when I use calculate_daily_values. I have ncl 6.6.2 installed, can anyone help me? Below is the script used and the output.<br>
<br>
Script:<br>
fil1 = addfile("/media/wind/NCEP-DOE_Reanalysis_2/<a href="http://uwnd.10m.gauss.1979.nc" target="_blank">uwnd.10m.gauss.1979.nc</a>","r")<br>
uwnd_practice = short2flt(fil1->uwnd)<br>
<br>
<br>
printVarSummary(uwnd_practice)<br>
printMinMax(uwnd_practice, True)<br>
<br>
opt = True<br>
opt@nval_crit = 4<br>
<br>
uwnd_daily = calculate_daily_values(uwnd_practice, "avg", 0, opt)<br>
printVarSummary(uwnd_daily)<br>
printMinMax(uwnd_daily, True)<br>
<br>
<br>
Output:<br>
Variable: uwnd_practice<br>
Type: float<br>
Total Size: 105400320 bytes<br>
26350080 values<br>
Number of Dimensions: 4<br>
Dimensions and sizes: [time | 1460] x [level | 1] x [lat | 94] x [lon | 192]<br>
Coordinates: <br>
time: [1569072..1577826]<br>
level: [10..10]<br>
lat: [88.542..-88.542]<br>
lon: [ 0..358.125]<br>
Number Of Attributes: 19<br>
long_name : 6-Hourly Forecast of U-wind at 10 m<br>
unpacked_valid_range : ( -120, 120 )<br>
actual_range : ( -38.15, 46.84 )<br>
units : m/s<br>
precision : 2<br>
least_significant_digit : 1<br>
GRIB_id : 33<br>
GRIB_name : U GRD<br>
var_desc : u-wind<br>
dataset : NCEP/DOE AMIP-II Reanalysis (Reanalysis-2)<br>
level_desc : 10 m<br>
statistic : Individual Obs<br>
parent_stat : Other<br>
standard_name : eastward_wind<br>
_FillValue_original : -32767<br>
_FillValue : -32767<br>
missing_value_original : 32766<br>
valid_range : ( -120, 120 )<br>
missing_value : -32767<br>
(0) <br>
(0) 6-Hourly Forecast of U-wind at 10 m (m/s) : min=-38.15 max=46.84<br>
<br>
fatal:["NclVar.c":1390]:Assignment type mismatch, right hand side can't be coerced to type of left hand side<br>
fatal:["NclAtt.c":262]:Attribute assignment type mismatch.<br>
<br>
fatal:["Execute.c":8637]:Execute: Error occurred at or near line 19034 in file $NCARG_ROOT/lib/ncarg/nclscripts/csm/contributed.ncl<br>
<br>
fatal:["Execute.c":8637]:Execute: Error occurred at or near line 35 in file dailyaverages2.ncl<br>
<br>
<br>
Regards,<br>
Nkese.<u></u><u></u></span></p>
</div>
<p class="MsoNormal">CONFIDENTIALITY: This email (including any attachments) may contain confidential, proprietary and/or privileged information. Any duplication, copying, distribution, dissemination, transmission, disclosure or use in any manner of this email
(including any attachments) without the authorisation of the sender is strictly prohibited. If you receive this email (including any attachments) in error, please notify the sender and delete this email (including any attachments) from your system. Thank you.
<u></u><u></u></p>
</div>
<p class="MsoNormal">_______________________________________________<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" target="_blank">http://mailman.ucar.edu/mailman/listinfo/ncl-talk</a><u></u><u></u></p>
</blockquote>
</div>
<p class="MsoNormal"><br clear="all">
<u></u><u></u></p>
<div>
<p class="MsoNormal"><u></u> <u></u></p>
</div>
<p class="MsoNormal">-- <u></u><u></u></p>
<div>
<div>
<div>
<div>
<p class="MsoNormal">Barry H. Lynn, Ph.D<u></u><u></u></p>
<div>
<div>
<p class="MsoNormal">Senior Associate Scientist, Lecturer,<u></u><u></u></p>
</div>
<div>
<div>
<p class="MsoNormal"><span style="color:rgb(136,136,136)">The Institute of the Earth Science, <br>
The Hebrew University of Jerusalem, <br>
Givat Ram, Jerusalem 91904, Israel </span><u></u><u></u></p>
</div>
<p class="MsoNormal"><span style="color:rgb(136,136,136)">Tel: 972 547 231 170<br>
Fax: (972)-25662581</span><u></u><u></u></p>
</div>
</div>
<div>
<p class="MsoNormal"><u></u> <u></u></p>
</div>
<div>
<p class="MsoNormal" style="margin-bottom:12pt">C.E.O, Weather It Is, LTD<br>
Weather and Climate Focus<br>
<a href="http://weather-it-is.com" target="_blank">http://weather-it-is.com</a><br>
Jerusalem, Israel<br>
Local: 02 930 9525<br>
Cell: 054 7 231 170<br>
Int-IS: x972 2 930 9525<u></u><u></u></p>
</div>
</div>
</div>
</div>
</div>
</div>
CONFIDENTIALITY: This email (including any attachments) may contain confidential, proprietary and/or privileged information. Any duplication, copying, distribution, dissemination, transmission, disclosure or use in any manner of this email (including any attachments)
without the authorisation of the sender is strictly prohibited. If you receive this email (including any attachments) in error, please notify the sender and delete this email (including any attachments) from your system. Thank you.
</div>
</blockquote></div><br clear="all"><div><br></div>-- <br><div dir="ltr" class="gmail-m_-5400551053473727104gmail_signature"><div dir="ltr"><div><div dir="ltr">Barry H. Lynn, Ph.D<div><div>Senior Associate Scientist, Lecturer,</div><div><div><span style="color:rgb(136,136,136)">The Institute of the Earth Science, </span><br style="color:rgb(136,136,136)"><span style="color:rgb(136,136,136)">The Hebrew University of Jerusalem, </span><br style="color:rgb(136,136,136)"><span style="color:rgb(136,136,136)">Givat Ram, Jerusalem 91904, Israel </span><br style="color:rgb(136,136,136)"></div><span style="color:rgb(136,136,136)">Tel: 972 547 231 170</span><br style="color:rgb(136,136,136)"><span style="color:rgb(136,136,136)">Fax: (972)-25662581</span></div></div><div><span style="color:rgb(136,136,136)"><br></span></div><div>C.E.O, Weather It Is, LTD<br>Weather and Climate Focus<br><a href="http://weather-it-is.com" target="_blank">http://weather-it-is.com</a><br>Jerusalem, Israel<br>Local: 02 930 9525<br>Cell: 054 7 231 170<br>Int-IS: x972 2 930 9525<br><br></div></div></div></div></div>
_______________________________________________<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/mailman/listinfo/ncl-talk</a><br>
</blockquote></div>