<div dir="ltr">Stuart,<div><br></div><div>PRATEsfc, as you know, is in units of <span style="font-family:Tahoma,Arial,Helvetica,sans-serif;font-size:13.3333px">kg/m^2/s, which is equivalent to mm/s.  To get 6-hourly then, you would &#39;d 6*60*60*PRATEsfc&#39; which would be 6hrs*60mins*60secs.</span></div><div><span style="font-family:Tahoma,Arial,Helvetica,sans-serif;font-size:13.3333px"><br></span></div><div><font face="Tahoma, Arial, Helvetica, sans-serif"><span style="font-size:13.3333px">Have you considered using the apcpsfc variable instead?  It&#39;s available in the operational cfsv2 and is already in 6-hourly amounts of kg/m^2.</span></font></div><div><font face="Tahoma, Arial, Helvetica, sans-serif"><span style="font-size:13.3333px"><br></span></font></div><div><font face="Tahoma, Arial, Helvetica, sans-serif"><span style="font-size:13.3333px">Stephen Mc</span></font></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Tue, May 10, 2016 at 2:08 PM, Chorley Weather <span dir="ltr">&lt;<a href="mailto:weatherstu@chorleyweather.com" target="_blank">weatherstu@chorleyweather.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><u></u>
<div style="font-size:10pt;font-family:Tahoma,Arial,Helvetica,sans-serif">
<p>Hi all, </p>
<p>Using the cfsv2 45 daily, how would one go about breaking down the pratesfc in to 6hr charts? Sample of scrips and ctr file below:</p>
<p> </p>
<p>CTR File:</p>
<p>title CFS_grib.grib2<br>* produced by g2ctl v0.0.8.8<br>* command line options: -verf CFS_grib.grib2<br>* griddef=1:0:(360 x 181):grid_template=0:winds(N/S): lat-lon grid:(360 x 181) units 1e-06 input WE:NS output WE:SN res 48 lat 90.000000 to -90.000000 by 1.000000 lon 0.000000 to 359.000000 by 1.000000 #points=65160:winds(N/S)</p>
<p>dtype grib2<br>ydef 181 linear -90.000000 1<br>xdef 360 linear 0.000000 1.000000<br>tdef 180 linear 06Z10may2016 6hr<br>* PROFILE hPa<br>zdef 3 levels 85000 50000 25000<br>options pascals<br>vars 12<br>HGT500mb 0,100,50000 0,3,5 ** 500 mb Geopotential Height [gpm]<br>PRATEsfc 0,1,0 0,1,7 ** surface Precipitation Rate [kg/m^2/s]<br>PRMSLmsl 0,101,0 0,3,1 ** mean sea level Pressure Reduced to</p>
<p> </p>
<p>Script:</p>
<p>function main(args)</p>
<p>* Parse the arguments: date, hour<br> if (args = &#39;&#39;)<br> prompt &#39;Enter forecast date (example, 20110717) --&gt; &#39; <br> pull date<br> prompt &#39;Enter forecast hour (example, 00 or 06 or 12 or 18) --&gt; &#39; <br> pull hour<br> else <br> date = subwrd(args,1)<br> hour = subwrd(args,2)<br> endif</p>
<p>&#39;reinit&#39;<br>&#39;open CFS_grib.ctl&#39;</p>
<p> </p>
<p><br>* Get info from the descriptor file<br>&#39;q ctlinfo&#39;<br>_ctl = result<br>_undef = getctl(undef)<br>_tdef = getctl(tdef)<br>_zdef = getctl(zdef)</p>
<p>maps = 181</p>
<p>* Get the Time axis info</p>
<p><br>_t1 = 1 ;* 2nd half of timeseries<br>_t2 = 45<br>tsize = _t2 - _t1 + 1<br>&#39;set t &#39;_t1&#39; &#39;_t2<br>&#39;q dims&#39;<br>times = sublin(result,5)<br>_time1 = subwrd(times,6) <br>_time2 = subwrd(times,8)<br>_tdim = _time1&#39; &#39;_time2</p>
<p>tincr = subwrd(_tdef,5)<br>_tdef = &#39;tdef &#39;tsize&#39; linear &#39;_time1&#39; &#39;tincr</p>
<p>huh = subwrd(_tdef,4)</p>
<p>****************************************<br>* PRECIP &amp; SLP<br>****************************************<br> i = 2<br> while ( i&lt;maps )</p>
<p>* Set up a few preliminary characteristics<br>setmap(0)<br>setPRECIPcols(1)</p>
<p>&#39;set t &#39;i</p>
<p>&#39;set gxout shaded&#39;<br>&#39;set csmooth on&#39;<br>&#39;set clevs 0 0.05 0.25 0.5 0.75 1.5 2 2.5 3 4 5 6 7 8 10 12 14 16 18 20 25 30 35 40 45 50&#39;<br>&#39;set ccols 95 95 95 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85&#39;</p>
<p>&#39;d PRATEsfc&#39;</p><span class="HOEnZb"><font color="#888888">
<div>-- <br>
<p>Regards,</p>
<p>Stuart Markham</p>
<p> </p>
</div>
</font></span></div>
<br>_______________________________________________<br>
gradsusr mailing list<br>
<a href="mailto:gradsusr@gradsusr.org">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>
<br></blockquote></div><br></div>