[gradsusr] meteogram prec

Matthias Malik Matthias.Malik at arcor.de
Sat Nov 27 09:12:17 EST 2010


Hi,

you can do that using maskout function.

Here is an example how i do this with the
NCEP GFS Precipitation:

(...)
*
* global mask for precipitation (3hr interval)
* * 
'set dfile 'args
'set lat -90 90'
'set lon -180 180'
'set lev 1000'
'set t 2 65'

'mask=sumg(1,t=1,t-0,2)-sumg(1,t=1,t-1,2)'
_trr = 'tloop(apcp-mask*const(apcp(t-1),0,-u))'
_trrc = 'tloop(acpcp-mask*const(acpcp(t-1),0,-u))'

(...)

after that procedure (inside a grads script function) you
can use the defined global variable as following:

'd '_trr
'd '_trrc


Best regards,
Matthias

Am Samstag, den 27.11.2010, 13:53 +0100 schrieb eric delaere:
> hi
> 
> I have a problem to reproduce the precipitation barbs on a meteogram
> from http://nomads.ncep.noaa.gov:9090/dods/gfs_hd/
> I can draw the barbs (3 hourly) but it seems to be not the correct
> values.
> 
> I already knew that there was a problem with this data, since the 3,
> 9, 15, 21...timesteps gives the precipitation in the last 3 hours, but
> the 6, 12, 18,... timestems gives the prec in the last 6 hours !!
> 
> For the maps, I could resolve this by use a small code:
> 
> if ((uur = '03') | (uur = '09') | (uur = '15') | (uur = '21') | (uur =
> '27') | (uur = '33') | (uur = '39') | (uur = '45') | (uur = '51') |
> (uur = '57') | (uur = '63') | (uur = '69') | (uur = '75') | (uur =
> '81') | (uur = '87')  | (uur = '93'))
> 'define prectemp = apcpsfc'
> 'define prec = apcpsfc'
> endif
> 
> if ((uur = '00') | (uur = '06') | (uur = '12') | (uur = '18') | (uur =
> '24') | (uur = '30') | (uur = '36') | (uur = '42') | (uur = '48') |
> (uur = '54') | (uur = '60') | (uur = '66') | (uur = '72') | (uur =
> '78') | (uur = '84') | (uur = '90')  | (uur = '96'))
> 'define prec = apcpsfc-prectemp'
> 
> But for meteograms, this trick doesn't  work.
> 
> hereafter the source for the meteogram, but with the incorrect
> precipitation values...
> 
> 'set t 1 'n''
> 
> 'q time'
> res = subwrd(result,3)
> datum2 = substr(res,4,9)
> uur =  substr(res,1,2)
> dag = subwrd(result,6)
> fff = substr(dag,1,2)
> 
> 'define t2m0 = 0'
> 
> 'set xlab on'
> 'set ylab on'
> 'set ccolor 2'
> 'set lat 51'
> 'set lon 4'
> 'set axlim -15 15'
> 'set yaxis -15 15 2'
> 'display tmp2m-273.15'
> 
> 'set cmark 0'
> 'set ylab off'
> 'set ccolor 4'
> 'set cthick 6'
> 'set axlim -15 15'
> 'set yaxis -15 15 2'
> 'display t2m0'
> 
> 'set ccolor 7'
> 'set ccolor 4'
> 'set axlim -15 15'
> 'set yaxis -15 15 2'
> 'set cthick 4'
> 'display tw'
> 
> *'set ylpos 0 r'
> *'set xlab on'
> *'set ylab on'
> *'set axlim 0 10'
> *'set yaxis 0 10 1'
> *'set gxout bar'
> *'set barbase 0'
> *'set bargap 50'
> *'set ccolor 11'
> *'set grid off'
> *'display prec'
> 
> The results are uploaded to http://users.fulladsl.be/spb4195/gfs.htm
> 
> Someone has a solution to have the correct precipitation (so, to
> subtract the last 3h prec value from the 6h values)?
> 
> Thx! 
> _______________________________________________
> gradsusr mailing list
> gradsusr at gradsusr.org
> http://gradsusr.org/mailman/listinfo/gradsusr




More information about the gradsusr mailing list