<html><head><meta http-equiv="Content-Type" content="text/html; charset=Windows-1252" /></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;">Thanks Jennifer. I wrote something similar and it appears to be working. <br>
Appreciate everyone's help! Many thanks. <br>
<br><br><div class="gmail_quote">On October 14, 2016 12:40:16 PM PDT, Jennifer M Adams <jadams21@gmu.edu> wrote:<blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
Mark,
<div>Below is the bit of code I use to ’normalize' precip accumulations from the GFS for the meteograms. (I write out a new file.) The records alternate between 3hr and 6hr accumulations, so you may have to adapt for your data and your particular needs. The
full code source is <a href="ftp://cola.gmu.edu/pub/jma/meteograms/meteogram_subset_GDS.gs">
ftp://cola.gmu.edu/pub/jma/meteograms/meteogram_subset_GDS.gs</a></div>
<div>—Jennifer</div>
<div>p.s. I also use t=1 as the initialization time and p is alwasy undefined at t=1, but I write it out anyway. </div>
<div>
<pre><span style="font-size: 14px;">* Write out the precip variables
'set fwrite mysubsetp.dat'
'set t 1'
'd p'
t=2
while (t<=tmax-1)
* these are 3-hourly accumulations
'set t 't
'd p'
* these are 6-hourly accumulations
* so we must subtract the previous 3hr totals
'set t 't+1
'd p-p(t-1) '
t=t+2
endwhile
'disable fwrite’
</span></pre>
<pre><br /></pre>
<div><br />
</div>
<div>
<div>On Oct 14, 2016, at 1:49 PM, Mark Sponsler <<a href="mailto:msponsler@COMCAST.NET">msponsler@COMCAST.NET</a>> wrote:</div>
<br class="Apple-interchange-newline" />
<blockquote type="cite">
<div>Thanks Jeff! Perfect - that is what I needed. </div>
<div></div>
<div>Let me go play with my script. Bet I made a logic error somewhere. </div>
<div></div>
<div>Thanks again!</div>
<div></div>
<div></div>
<div><span style="font-size: small;">Thanks,<br />
Mark</span></div>
<div></div>
<div></div>
<div>----- Original Message -----<br />
From: Jeff Duda <<a href="mailto:jeffduda319@gmail.com">jeffduda319@gmail.com</a>><br />
To: GrADS Users Forum <<a href="mailto:gradsusr@gradsusr.org">gradsusr@gradsusr.org</a>><br />
Sent: Fri, 14 Oct 2016 17:32:12 -0000 (UTC)<br />
Subject: Re: [gradsusr] NAM and APCPSFC data</div>
<div></div>
<div dir="ltr">
<div>
<div>
<div>
<div>
<div>
<div>
<div>
<div>
<div>
<div>
<div>
<div>
<div>
<div>'set t 2'</div>
'd apcpsfc'</div>
should display 1-hr precip accumulation between f00 and f01<br />
<div></div>
</div>
'set t 3'</div>
'd apcpsfc'</div>
should display 2-hr precip accumulation between f00 and f02<br />
<div></div>
</div>
'set t 4'</div>
'd apcpsfc'</div>
should display 3-hr precip accumulation between f00 and f03<br />
<div></div>
</div>
'set t 5'</div>
'd apcpsfc'</div>
should display 1-hr precip accumulation between f03 and f04<br />
<div></div>
...<br />
...<br />
...<br />
<div></div>
</div>
and so on.<br />
<div></div>
</div>
If you want to display 1-hr precip at "off" hours (not f01, f04, f07, ...) then yes, you need to display the difference over consecutive hours.
<br />
f02: 'set t 3' ; 'd apcpsfc - apcpsfc(t-1)'<br />
f03: 'set t 4' ; 'd apcpsfc - apcpsfc(t-1)'<br />
<div></div>
Notice how the pattern is the same despite the particular time. The only exception is at f01, f04, f07, ... when you just display apcpsfc without any subtraction.<br />
<div></div>
You appear to have this idea. Is this not getting you the results you expect?<br />
<div></div>
</div>
Jeff</div>
<div class="gmail_extra"><br />
<div class="gmail_quote">On Fri, Oct 14, 2016 at 12:26 PM, Mark Sponsler <span dir="ltr">
<<a href="mailto:msponsler@comcast.net" target="_blank">msponsler@comcast.net</a>></span> wrote:<br />
<blockquote class="gmail_quote" style="margin: 0 0 0 .8ex; border-left: 1px #ccc solid; padding-left: 1ex;">
<div>Hi Jeff,</div>
<div>Thanks for the info. </div>
<div></div>
<div>Yeah, I use the first time step which of course has no precip data in it. So the cycle would start with t = 2.</div>
<div></div>
<div>Just to confirm, for either the 1 hr NAM or the 3 hr NAM, I simply should use the below logic and all should be good?</div>
<div></div>
<div>In other words, the 1 hr NAM accumulates in 3 time step sequential bundles (timesteps 2,3,4 refresh then 5,6,7, refresh etc) and the 3 hr NAM accumulates the same.</div>
<div></div>
<div>Display Time = 2<br />
Time 3 = Time 3 - Time 2<br />
Display Time 3<br />
Time 4 = Time 4 - Time 3<br />
Display Time 4</div>
<div>Display Time = 5</div>
<div>Time 6 = Time 6 - Time 5</div>
<div>Display Time 6</div>
<div>Time 7 = Time 7 - Time 6</div>
<div>Display Time 7</div>
<div></div>
<div>etc...</div>
<div></div>
<div><span style="font-size: small;">Thanks,<br />
Mark</span></div>
<div class="HOEnZb">
<div class="h5">
<div></div>
<div></div>
<div>----- Original Message -----<br />
From: Jeff Duda <<a href="mailto:jeffduda319@gmail.com" target="_blank">jeffduda319@gmail.com</a>><br />
To: GrADS Users Forum <<a href="mailto:gradsusr@gradsusr.org" target="_blank">gradsusr@gradsusr.org</a>><br />
Sent: Fri, 14 Oct 2016 16:59:14 -0000 (UTC)<br />
Subject: Re: [gradsusr] NAM and APCPSFC data</div>
<div></div>
<div dir="ltr">
<div>
<div>Mark,</div>
<br />
Why do you not think it works the way you described in (1)? That's the way I've always used it, and I've never had a problem. The particular t-index value you use in grads depends on how you setup the control file. If you didn't start the time index at forecast
hour 0, then there will be a phase difference between what you think and what actually works.<br />
<div></div>
</div>
<br />
Jeff Duda</div>
<div class="gmail_extra"><br />
<div class="gmail_quote">On Fri, Oct 14, 2016 at 10:55 AM, Mark Sponsler <span dir="ltr">
<<a href="mailto:msponsler@comcast.net" target="_blank">msponsler@comcast.net</a>></span> wrote:<br />
<blockquote class="gmail_quote" style="margin: 0 0 0 .8ex; border-left: 1px #ccc solid; padding-left: 1ex;">
<div>Hi,<br />
I'm trying to display variable 'apcpsfc' from the 3 hr and 1 hr NAM. The resulting images appear to pulsate/accumulate precip every few images then reset only to accumulate again.<br />
<div></div>
<br />
I've seen the threads in the archive on this issue with HD GFS data, but I'm trying to understand 2 things:<br />
<div></div>
<br />
1) What is the accumulation period for NAM 1 hr and 3 hr data. I was thinking it was every 3 time steps (i.e. excluding time step 1 / 00 hr), it is 2, 3, 4 then reset and start accumulating again for the next 3 time steps 5, 6 and 7). But that doesnt seem
to be the case. <br />
<div></div>
<br />
2) What does it mean to 'normalize' the data? Westly did something in wgrib2 for HD GFS data to normalize it and I was wondering if that was also applicable to NAM data. What is done to mathmatically to get the data to be valid for just a single timestep?.
Can I write something in GRDADS to perform the normalization rather than having to use WGRIB2.
<br />
<div></div>
<br />
Assuming the accumulation theory is correct (that apcpsfc accumulates every three time steps), I've been trying to write code to remove the accumulation by:<br />
<div></div>
<br />
Display Time = 2<br />
Time 3 = Time 3 - Time 2<br />
Display Time 3<br />
Time 4 = Time 4 - Time 3<br />
Display Time 4<br />
<div></div>
<br />
But it doesnt work. <br />
<div></div>
<br />
Any help would be appreciated.<br />
<div></div>
<br />
Thanks,<br />
Mark </div>
<div></div>
<div></div>
<div><span style="font-size: small;">Thanks,<br />
Mark</span></div>
<br />
_______________________________________________<br />
<div></div>
<br />
gradsusr mailing list<br />
<a href="mailto:gradsusr@gradsusr.org" target="_blank">gradsusr@gradsusr.org</a><br />
<a href="http://gradsusr.org/mailman/listinfo/gradsusr" rel="noreferrer" target="_blank">http://gradsusr.org/mailman/listinfo/gradsusr</a><br />
<div></div>
</blockquote>
</div>
<br />
<br clear="all" />
<br />
-- <br />
<div class="m_-6991840824023508013gmail_signature">
<div dir="ltr">
<div>Jeff Duda<br />
Post-doctoral research associate<br />
University of Oklahoma School of Meteorology</div>
</div>
</div>
</div>
<div></div>
<div></div>
</div>
</div>
<br />
_______________________________________________<br />
<div></div>
gradsusr mailing list<br />
<a href="mailto:gradsusr@gradsusr.org" target="_blank">gradsusr@gradsusr.org</a><br />
<a href="http://gradsusr.org/mailman/listinfo/gradsusr" rel="noreferrer" target="_blank">http://gradsusr.org/mailman/listinfo/gradsusr</a><br />
<div></div>
</blockquote>
</div>
<br />
<br clear="all" />
<br />
-- <br />
<div class="gmail_signature">
<div dir="ltr">
<div>Jeff Duda<br />
Post-doctoral research associate<br />
University of Oklahoma School of Meteorology</div>
</div>
</div>
</div>
<div></div>
<div></div>
_______________________________________________<br />
gradsusr mailing list<br />
<a href="mailto:gradsusr@gradsusr.org">gradsusr@gradsusr.org</a><br />
http://gradsusr.org/mailman/listinfo/gradsusr<br />
</blockquote>
</div>
<br />
<div apple-content-edited="true">
<div style="color: rgb(0, 0, 0); letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px; word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;">
<div style="color: rgb(0, 0, 0); letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px; word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;">
<div style="font-size: 12px; orphans: 2; widows: 2;">--</div>
<div style="font-size: 12px; orphans: 2; widows: 2;">Jennifer Miletta Adams<br />
Center for Ocean-Land-Atmosphere Studies (COLA)<br />
George Mason University<br />
<br />
<br />
</div>
</div>
</div>
</div>
<br />
</div>
<p style="margin-top: 2.5em; margin-bottom: 1em; border-bottom: 1px solid #000"></p><pre class="k9mail"><hr /><br />gradsusr mailing list<br />gradsusr@gradsusr.org<br /><a href="http://gradsusr.org/mailman/listinfo/gradsusr">http://gradsusr.org/mailman/listinfo/gradsusr</a><br /></pre></blockquote></div><br>
Thanks,<br>
Mark Sponsler</body></html>