Francesco Danuso
unread,Feb 18, 2012, 9:45:18 AM2/18/12Sign in to reply to author
Sign in to forward
You do not have permission to delete messages in this group
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to SEMoLa
' RainGen: rainfall generator
' Rainy status of the day by a First order Markov Chain
' Rainfall amount by Gamma pdf
' F. Danuso (6/2/2002)
$ vers(1.0) tspan(1,3650)
A Doy=mod(time,365) Day of the year
' Rainfall Event ===========================================
A Day=markov(Dry,Wet\Pdd,Pdw\Pwd,Pww) Rainfall status (1/0)
P Dry=0 Dry status (0)
P Wet=1 Rainy status (1)
' Transition probabilities estimated on a monthly base
' Values estimated by Climak for Padua (1981-88)(Italy)
A Pdd=tab(Doy
\0.90,16\0.92,45\0.84,75\0.79,105\0.70,136\0.79,166\0.86,197\0.85,228\0.88,258\0.86,289\0.89,319\0.89,350)
A Pwd=tab(Doy
\0.48,16\0.51,45\0.51,75\0.48,105\0.39,136\0.65,166\0.79,197\0.70,228\0.50,258\0.71,289\0.51,319\0.45,350)
A Pdw=1-Pdd
A Pww=1-Pwd
' Rainfall amount - Gamma parameters for Padua (Italy) by Climak
a Amount=rGamma(Ag,Bg,0)
A Rain=cond(Day,Amount,0) Rainfall amount (mm/d)
A Ag=tab(Doy
\0.60,16\0.60,45\0.55,75\0.98,105\0.88,136\0.79,166\1.31,197\1.15,228\0.69,258\0.99,289\0.72,319\1.16,350)
A Bg=tab(Doy
\8.10,16\16.26,45\13.94,75\6.13,105\8.04,136\11.59,166\6.23,197\8.64,228\10.33,258\10.95,289\12.66,319\7.72,350)