Define RADIUS 6371220.
Define LENGTH 6000e3
Define LONGITUDE 94.
Define LATITUDE 8.
Define DRY 0.01
Define MAXLEVEL 12
Define LEVEL (fabs (rx) < 0.46 && fabs (ry) < 0.46 ? MAXLEVEL : 5)
1 0 GfsRiver GfsBox GfsGEdge {} {
PhysicalParams {
L = LENGTH
g = 9.81
}
MetricLonLat M RADIUS
MapTransform { tx = LONGITUDE ty = LATITUDE }
Time { end = 36000 }
GModule terrain
GModule okada
Refine 5
VariableTerrain Zb {
basename = etopo1
} {
reconstruct = 1
}
AdvectionParams { gradient = gfs_center_sweby_gradient }
Init {} { D = 0 }
InitOkada D {
x = 94.57 y = 3.83
depth = 11.4857e3
strike = 323 dip = 12 rake = 90
length = 220e3 width = 130e3
U = 18
}
Init { start = 0 } { P = MAX (0., D - Zb) }
EventList { start = 212 step = 6 end = 272 } {
Init {} { D = 0 }
InitOkada D {
x = 93.90 y = 5.22
depth = 11.4857e3
strike = 348 dip = 12 rake = 90
length = 150e3 width = 130e3
U = 23
}
}
AdaptGradient { start = 212 istep = 1 end = 272 } {
cmax = 0.05 cfactor = 2
minlevel = 5 maxlevel = LEVEL
} D
Init { start = 272 } { P = (P < DRY ? P : MAX (0., P + D)) }
EventList { start = 528 step = 6 end = 588 } {
Init {} { D = 0 }
InitOkada D {
x = 93.21 y = 7.41
depth = 12.525e3
strike = 338 dip = 12 rake = 90
length = 390e3 width = 120e3
U = 12
}
}
AdaptGradient { start = 528 istep = 1 end = 588 } {
cmax = 0.05 cfactor = 2
minlevel = 5 maxlevel = LEVEL
} D
Init { start = 588 } { P = (P < DRY ? P : MAX (0., P + D)) }
EventList { start = 853 step = 6 end = 913 } {
Init {} { D = 0 }
InitOkada D {
x = 92.60 y = 9.70
depth = 15.12419e3
strike = 356 dip = 12 rake = 90
length = 150e3 width = 95e3
U = 12
}
}
AdaptGradient { start = 853 istep = 1 end = 913 } {
cmax = 0.05 cfactor = 2
minlevel = 5 maxlevel = LEVEL
} D
Init { start = 913 } { P = (P < DRY ? P : MAX (0., P + D)) }
EventList { start = 1213 step = 6 end = 1273 } {
Init {} { D = 0 }
InitOkada D {
x = 92.87 y = 11.70
depth = 15.12419e3
strike = 10 dip = 12 rake = 90
length = 350e3 width = 95e3
U = 12
}
}
AdaptGradient { start = 1213 istep = 1 end = 1273 } {
cmax = 0.05 cfactor = 2
minlevel = 5 maxlevel = LEVEL
} D
Init { start = 1273 } { P = (P < DRY ? P : MAX (0., P + D)) }
VariableBoolean Atime
Init {} {
P = MAX (0., D - Zb)
Pmax = 0.
Atime = -1.
}
Init { istep = 1 } {
Hwet = (P > DRY ? H : NODATA)
Pmax = (P > DRY && H > Pmax ? H : Pmax)
Atime = (Atime >= 0. ? Atime : P > DRY && fabs (H) > 5e-2 ? t : -1.)
U = P > DRY ? U/(1. + dt*Velocity*1e-3/P) : 0
V = P > DRY ? V/(1. + dt*Velocity*1e-3/P) : 0
}
AdaptGradient { istep = 1 } {
cmax = 0.05 cfactor = 2
minlevel = 5 maxlevel = LEVEL
} (P < DRY ? 0. : P + Zb)
AdaptError { istep = 1 } {
cmax = 0.05
minlevel = 5 maxlevel = LEVEL
} Pmax
Global {
}
Include output.gfs
OutputLocation { start = 6900 } jason.txt jason.xy
OutputTime { istep = 1 } stderr
OutputBalance { istep = 1 } stderr
OutputTiming { istep = 100 } stderr
EventScript { istep = 100 } { rm -f snapshot-*.gfs }
OutputSimulation { istep = 100 } snapshot-%ld.gfs
OutputSimulation { istep = 20 } stdout
OutputSimulation { step = 900 } sim-%g.gfs
EventScript { step = 900} { gzip -f sim-*.gfs }
OutputScalarStats { istep = 1 } p { v = P }
OutputScalarNorm { istep = 1 } u { v = Velocity }
OutputScalarNorm { istep = 1 } U { v = U }
OutputScalarNorm { istep = 1 } V { v = V }
OutputScalarNorm { istep = 1 } hwet { v = Hwet }
GModule gfsview
OutputView { step = 60 } { ppm2mpeg > h.mpg } {
width = 800 height = 700
} h.gfv
OutputView { start = 7200 } { convert ppm:- eps2:h.eps } {
width = 800 height = 700
} h.gfv
OutputView { step = 60 } { ppm2mpeg > level.mpg } {
width = 800 height = 700
} level.gfv
OutputView { start = 7200 } { convert ppm:- eps2:level.eps } {
width = 800 height = 700
} level.gfv
OutputPPM { step = 60 } { ppm2mpeg > velocity.mpg } {
maxlevel = 10
v = Velocity
min = 0 max = 0.25
}
OutputPPM { step = 60 } { ppm2mpeg > zb.mpg } {
maxlevel = 10
v = Zb
}
OutputView { start = end } { convert ppm:- eps2:hmax.eps } {
width = 1600 height = 1600
} hmax.gfv
OutputView { start = end } { convert ppm:- eps2:hmax-detail.eps } {
width = 1600 height = 1600
} hmax-detail.gfv
EventScript { start = end } {
gnuplot <<EOF
set term postscript eps color lw 2 size 5,2 18
set size ratio 0.4
set output 'hani.eps'
plot [3:5]'hanires.txt' u 1:(\$2/100.) w lp t 'observed' ps 2, \
'hani.txt' u (\$3/3600.):7 w l t 'modelled'
set output 'male.eps'
plot [3:5]'maleres.txt' u 1:(\$2/100.) w lp t 'observed' ps 2, \
'male.txt' u (\$3/3600.):7 w l t 'modelled'
set output 'gana.eps'
plot [3:5]'ganares.txt' u 1:(\$2/100.) w lp t 'observed' ps 2, \
'gana.txt' u (\$3/3600.):7 w l t 'modelled'
set output 'dieg.eps'
plot [3:5]'diegres.txt' u 1:(\$2/100.) w lp t 'observed' ps 2, \
'dieg.txt' u (\$3/3600.):7 w l t 'modelled'
set output 'colo.eps'
plot [2.5:4.5]'colores.txt' u 1:(\$2/100.) w lp t 'observed' ps 2, \
'colo.txt' u (\$3/3600.):7 w l t 'modelled'
set output 'jason.eps'
set xlabel 'Latitude (deg)'
set ylabel 'Elevation (m)'
plot [-6:20][-1:1]'jasonres.txt' u 2:4 w l t 'observed', \
'jason.txt' u 3:(\$3 > 19.2 ? 0 : \$8) w l t 'modelled'
EOF
}
} {
dry = DRY
}
GfsBox {
top = Boundary {
BcSubcritical V -Zb
}
bottom = Boundary {
BcSubcritical V -Zb
}
right = Boundary {
BcSubcritical U -Zb
}
left = Boundary {
BcSubcritical U -Zb
}
}