<div dir="ltr"><div><div><div>Hi everyone<br><br></div>I'm using WRF in my work, and I'm trying to make plots of accumulated precipitation over the course of an entire event. I had tried to do this in Python, but NCL works better in this instance.<br><br></div>My problem is that I don't know how to make a running total, so to speak. Without showing my entire program:<br>"...<br> wtsnctrltotal = new((/1015,1359/),float,0)<br> ...<br></div><div>do</div><div>... <br></div><div> wtsnctrlstep = where((notracesnowctrl .gt. 0 .and. wetbulbctrl .gt. 0),notracesnowctrl,0)<br> wtsnctrltotal = wtsnctrltotal + wtsnctrlstep<br>"<br></div><div><br></div><div>The "wtsnctrltotal" is just an empty array to hold the running total.<br>I have "wtsnctrlstep" as the stepwise value for whatever current record number the do loop is working on. This array has the correct values in it, and is working fine.<br><br></div><div>The specific thing that isn't working is that I cannot figure out how to add the step value to the total value, the last line of code. Checking it with PrintVarSummary as well as max/min shows 0 for everything.<br><br></div><div>I've already tried enclosing the right side of the equals with brackets, but no dice. In a very similar program I made in Python, you have a very handy operator for doing this, which is " += ". This adds another value with the variable's value and assigns the new value to the variable. This is what I'd like to do, but I've been searching for a few days and I can't find a way to do such a thing.<br><br></div><div>Of course, I'm probably going about this all wrong. Any suggestions?<br><br><br></div><div>Thank you!<br>
</div></div><div id="DAB4FAD8-2DD7-40BB-A1B8-4E2AA1F9FDF2"><br>
<table style="border-top:1px solid #d3d4de">
<tr>
<td style="width:55px;padding-top:13px"><a href="https://www.avast.com/sig-email?utm_medium=email&utm_source=link&utm_campaign=sig-email&utm_content=webmail" target="_blank"><img src="https://ipmcdn.avast.com/images/icons/icon-envelope-tick-round-orange-animated-no-repeat-v1.gif" alt="" width="46" height="29" style="width: 46px; height: 29px;"></a></td>
<td style="width:470px;padding-top:12px;color:#41424e;font-size:13px;font-family:Arial,Helvetica,sans-serif;line-height:18px">Virus-free. <a href="https://www.avast.com/sig-email?utm_medium=email&utm_source=link&utm_campaign=sig-email&utm_content=webmail" target="_blank" style="color:#4453ea">www.avast.com</a>
</td>
</tr>
</table><a href="#DAB4FAD8-2DD7-40BB-A1B8-4E2AA1F9FDF2" width="1" height="1"></a></div>