[gradsusr] Ensemble Graphs
Chorley Weather
weatherstu at chorleyweather.com
Thu Feb 11 07:16:02 EST 2016
Thank you,
That's fine, the errors I am getting relate to the args. Error: Non
numeric args to numeric operation. Error line 16. Here is the section of
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'
'sdfopen
http://nomads.ncep.noaa.gov:9090/dods/gens/gens'date'/gep_all_'hour'z'
*All GEFS members
'sdfopen
http://nomads.ncep.noaa.gov:9090/dods/gfs_0p25/gfs'date'/gfs_0p25_'hour'z'
*GFS oper
* Get the Time axis info
tsize = subwrd(_tdef,2)
_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)
* Get info from the descriptor file
'q ctlinfo'
_ctl = result
_undef = getctl(undef)
_tdef = getctl(tdef)
_zdef = getctl(zdef)
maps = 3
* Get the Time axis info
tsize = subwrd(_tdef,2)
_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)
Stuart.
On 11-02-2016 10:46, Chorley Weather wrote:
> Hi,
>
> Thanks for the detailed information, I have tried these ways of getting them to run together but getting a few errors, would be be possible to see one of your scripts. I understand they maybe private so perhaps email me direct at weatherstu at chorleyweather.com.
>
> Many thanks
>
> Stuart.
>
> On 11-02-2016 08:40, dzengiz.tafa at telenet.be wrote:
>
>> Hi
>>
>> You need to open 2 files (3 if you want the control to be yet a different curve)
>>
>> in my scripts I do it this way
>>
>> ///
>> 'sdfopen http://nomads.ncep.noaa.gov:9090/dods/gens/gens'date'/gep_all_'hour'z' *All GEFS members
>> 'sdfopen http://nomads.ncep.noaa.gov:9090/dods/gens/gens'date'/gec00_'hour'z' * GEFS control
>> 'sdfopen http://nomads.ncep.noaa.gov:9090/dods/gfs_0p25/gfs'date'/gfs_0p25_'hour'z' *GFS oper
>> ///
>>
>> Just replace date with a date string like 20160211 and hour like 00 (run of 00Z). If you are not using opendap, just use the 'open' command, followed by the ctl file you created using grib2ctl & gribmap
>>
>> Then the trick is to use the 3 files that are opened. They are opened in the order provided so
>> * The file-connection with all the members is file number 1
>> * The file-connection with the control is file number 2 &
>> * The file-connection with the operational forecast is file number 3
>>
>> Then you can play with the data.
>>
>> eg.
>>
>> Set a member value (1 to 20) and when defining a variable, use the grib var name followed by the opendap connection, or file number. In this case 1, because this is the file connection containing all the members
>>
>> ///
>> * Member 2, (member 1 is the control in the opendap)
>> 'set e 2'
>> 'define temp2m_mem2 = tmp2m.1-273.15'
>> 'd temp2m_mem1'
>> ///
>>
>> Do this for all the members of choice.
>>
>> For the mean, just calculate a mean value, summing up all the seperate members & deviding them by the amount of members used in the sum.
>>
>> ///
>> 'define mean = (temp2m_mem2 + temp2m_mem3 + ... +temp2m_mem21)/20'
>> 'd mean'
>> ///
>>
>> If you want to use the Operational run data or the Control data as used in this example, you can use replace the .1 as in the member example with .2 or .3, according to your files being opened in your version of the script. In the example provided this translates into
>>
>> ///
>> 'define temp2_oper = tmp2m.3-273.15'
>> 'd temp2_oper'
>> ///
>>
>> As an attachment, I provided the output I get using this method & it pretty much resembles what you would like to create. Hope this helps.
>>
>> Best regards
>>
>> -------------------------
>>
>> VAN: "Chorley Weather" <weatherstu at chorleyweather.com>
>> AAN: "GrADS Users Forum" <gradsusr at gradsusr.org>
>> VERZONDEN: Woensdag 10 februari 2016 13:13:50
>> ONDERWERP: [gradsusr] Ensemble Graphs
>>
>> Hi all,
>>
>> I am in the process of developing GEFS ensemble graphs similar to the image, however, I am stuck on how to run the GEFS mean (red line) and also I'm unsure on how to run the GFS (Black Line) along side the GEFS. Can anybody shed some light on this for me please.....Many thanks in advance.
>>
>> ******Email re sent.... forgot to attach image******
>> --
>>
>> Stuart Markham
>>
>> _______________________________________________
>> gradsusr mailing list
>> gradsusr at gradsusr.org
>> http://gradsusr.org/mailman/listinfo/gradsusr
>>
>> _______________________________________________
>> gradsusr mailing list
>> gradsusr at gradsusr.org
>> http://gradsusr.org/mailman/listinfo/gradsusr [1]
>
> --
>
> Stuart Markham
--
Stuart Markham
Links:
------
[1] http://gradsusr.org/mailman/listinfo/gradsusr
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://gradsusr.org/pipermail/gradsusr/attachments/20160211/594fbbde/attachment-0001.html
-------------- next part --------------
A non-text attachment was scrubbed...
Name: ens_2mtemp_kortrijk.png
Type: image/png
Size: 41892 bytes
Desc: not available
Url : http://gradsusr.org/pipermail/gradsusr/attachments/20160211/594fbbde/attachment-0001.png
-------------- next part --------------
A non-text attachment was scrubbed...
Name: blocked.gif
Type: image/gif
Size: 118 bytes
Desc: not available
Url : http://gradsusr.org/pipermail/gradsusr/attachments/20160211/594fbbde/attachment-0002.gif
-------------- next part --------------
A non-text attachment was scrubbed...
Name: blocked.gif
Type: image/gif
Size: 118 bytes
Desc: not available
Url : http://gradsusr.org/pipermail/gradsusr/attachments/20160211/594fbbde/attachment-0003.gif
More information about the gradsusr
mailing list