@@ -9,6 +9,13 @@ using CryoGrid.LiteImplicit
9
9
10
10
# Load forcings and build stratigraphy like before.
11
11
forcings = loadforcings (CryoGrid. Presets. Forcings. Samoylov_ERA_MkL3_CCSM4_long_term);
12
+ soilprofile = SoilProfile (
13
+ 0.0 u " m" => MineralOrganic (por= 0.80 ,sat= 1.0 ,org= 0.75 ),
14
+ 0.1 u " m" => MineralOrganic (por= 0.80 ,sat= 1.0 ,org= 0.25 ),
15
+ 0.4 u " m" => MineralOrganic (por= 0.55 ,sat= 1.0 ,org= 0.25 ),
16
+ 3.0 u " m" => MineralOrganic (por= 0.50 ,sat= 1.0 ,org= 0.0 ),
17
+ 10.0 u " m" => MineralOrganic (por= 0.30 ,sat= 1.0 ,org= 0.0 ),
18
+ )
12
19
tempprofile_linear = TemperatureProfile (
13
20
0.0 u " m" => - 30.0 u " °C" ,
14
21
10.0 u " m" => - 10.0 u " °C" ,
@@ -20,22 +27,19 @@ upperbc = TemperatureBC(forcings.Tair, NFactor())
20
27
initT = initializer (:T , tempprofile_linear)
21
28
heatop = Heat. EnthalpyImplicit ()
22
29
freezecurve = FreeWater ()
23
- strat = @Stratigraphy (
30
+ heat = HeatBalance (heatop; freezecurve)
31
+ soil_layers = map (para -> Ground (para; heat), soilprofile)
32
+ strat = Stratigraphy (
24
33
z_top => Top (upperbc),
25
- 0.0 u " m" => Ground (MineralOrganic (por= 0.80 ,sat= 1.0 ,org= 0.75 ), heat= HeatBalance (heatop; freezecurve)),
26
- 0.1 u " m" => Ground (MineralOrganic (por= 0.80 ,sat= 1.0 ,org= 0.25 ), heat= HeatBalance (heatop; freezecurve)),
27
- 0.4 u " m" => Ground (MineralOrganic (por= 0.55 ,sat= 1.0 ,org= 0.25 ), heat= HeatBalance (heatop; freezecurve)),
28
- 3.0 u " m" => Ground (MineralOrganic (por= 0.50 ,sat= 1.0 ,org= 0.0 ), heat= HeatBalance (heatop; freezecurve)),
29
- 10.0 u " m" => Ground (MineralOrganic (por= 0.30 ,sat= 1.0 ,org= 0.0 ), heat= HeatBalance (heatop; freezecurve)),
34
+ soil_layers,
30
35
z_bot => Bottom (GeothermalHeatFlux (0.053 u " W/m^2" ))
31
36
);
32
37
modelgrid = CryoGrid. Presets. DefaultGrid_2cm
33
38
tile = Tile (strat, modelgrid, initT);
34
39
35
40
# Since the solver can take daily timesteps, we can easily specify longer simulation time spans at minimal cost.
36
- # Here we specify a time span of 5 years.
37
- tspan = (DateTime (2010 ,1 ,1 ), DateTime (2015 ,1 ,1 ))
38
- tspan_sol = convert_tspan (tspan)
41
+ # Here we specify a time span of 20 years.
42
+ tspan = (DateTime (2000 ,1 ,1 ), DateTime (2020 ,1 ,1 ))
39
43
u0, du0 = initialcondition! (tile, tspan);
40
44
prob = CryoGridProblem (tile, u0, tspan, saveat= 24 * 3600.0 , savevars= (:T ,))
41
45
sol = @time solve (prob, LiteImplicitEuler (), dt= 24 * 3600.0 )
0 commit comments