[gradsusr] CFS Pratesfc

Stephen McMillan smcmillan at planalytics.com
Wed May 11 09:54:23 EDT 2016


Stuart,

PRATEsfc, as you know, is in units of kg/m^2/s, which is equivalent to
mm/s.  To get 6-hourly then, you would 'd 6*60*60*PRATEsfc' which would be
6hrs*60mins*60secs.

Have you considered using the apcpsfc variable instead?  It's available in
the operational cfsv2 and is already in 6-hourly amounts of kg/m^2.

Stephen Mc

On Tue, May 10, 2016 at 2:08 PM, Chorley Weather <
weatherstu at chorleyweather.com> wrote:

> Hi all,
>
> 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:
>
>
>
> CTR File:
>
> title CFS_grib.grib2
> * produced by g2ctl v0.0.8.8
> * command line options: -verf CFS_grib.grib2
> * 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)
>
> dtype grib2
> ydef 181 linear -90.000000 1
> xdef 360 linear 0.000000 1.000000
> tdef 180 linear 06Z10may2016 6hr
> * PROFILE hPa
> zdef 3 levels 85000 50000 25000
> options pascals
> vars 12
> HGT500mb 0,100,50000 0,3,5 ** 500 mb Geopotential Height [gpm]
> PRATEsfc 0,1,0 0,1,7 ** surface Precipitation Rate [kg/m^2/s]
> PRMSLmsl 0,101,0 0,3,1 ** mean sea level Pressure Reduced to
>
>
>
> Script:
>
> function main(args)
>
> * Parse the arguments: date, hour
> if (args = '')
> prompt 'Enter forecast date (example, 20110717) --> '
> pull date
> prompt 'Enter forecast hour (example, 00 or 06 or 12 or 18) --> '
> pull hour
> else
> date = subwrd(args,1)
> hour = subwrd(args,2)
> endif
>
> 'reinit'
> 'open CFS_grib.ctl'
>
>
>
>
> * Get info from the descriptor file
> 'q ctlinfo'
> _ctl = result
> _undef = getctl(undef)
> _tdef = getctl(tdef)
> _zdef = getctl(zdef)
>
> maps = 181
>
> * Get the Time axis info
>
>
> _t1 = 1 ;* 2nd half of timeseries
> _t2 = 45
> tsize = _t2 - _t1 + 1
> 'set t '_t1' '_t2
> 'q dims'
> times = sublin(result,5)
> _time1 = subwrd(times,6)
> _time2 = subwrd(times,8)
> _tdim = _time1' '_time2
>
> tincr = subwrd(_tdef,5)
> _tdef = 'tdef 'tsize' linear '_time1' 'tincr
>
> huh = subwrd(_tdef,4)
>
> ****************************************
> * PRECIP & SLP
> ****************************************
> i = 2
> while ( i<maps )
>
> * Set up a few preliminary characteristics
> setmap(0)
> setPRECIPcols(1)
>
> 'set t 'i
>
> 'set gxout shaded'
> 'set csmooth on'
> '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'
> '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'
>
> 'd PRATEsfc'
> --
>
> Regards,
>
> Stuart Markham
>
>
>
> _______________________________________________
> gradsusr mailing list
> gradsusr at gradsusr.org
> http://gradsusr.org/mailman/listinfo/gradsusr
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://gradsusr.org/pipermail/gradsusr/attachments/20160511/fa2002cb/attachment-0001.html 


More information about the gradsusr mailing list