1
+ # # Some site parameters have been taken from
2
+ # # Ma, S., Baldocchi, D. D., Xu, L., Hehn, T. (2007)
3
+ # # Inter-Annual Variability In Carbon Dioxide Exchange Of An
4
+ # # Oak/Grass Savanna And Open Grassland In California, Agricultural
5
+ # # And Forest Meteorology, 147(3-4), 157-171. https://doi.org/10.1016/j.agrformet.2007.07.008
6
+ # # CLM 5.0 Tech Note: https://www2.cesm.ucar.edu/models/cesm2/land/CLM50_Tech_Note.pdf
7
+ # Bonan, G. Climate change and terrestrial ecosystem modeling. Cambridge University Press, 2019.
8
+
1
9
import SciMLBase
2
10
import ClimaTimeSteppers as CTS
3
11
import ClimaComms
@@ -19,6 +27,11 @@ import ClimaParams
19
27
climaland_dir = pkgdir (ClimaLand)
20
28
21
29
FT = Float64
30
+ site_ID = " US-MOz"
31
+ time_offset = 7 # offset from UTC in hrs
32
+ lat = FT (38.7441 ) # degree
33
+ long = FT (- 92.2000 ) # degree
34
+
22
35
earth_param_set = LP. LandParameters (FT)
23
36
# Utility functions for reading in and filling fluxnet data
24
37
include (joinpath (climaland_dir, " experiments/integrated/fluxnet/data_tools.jl" ))
@@ -30,7 +43,7 @@ zmax = FT(0)
30
43
dz_bottom = FT (1.0 )
31
44
dz_top = FT (0.04 )
32
45
33
- land_domain = Column (;
46
+ domain = Column (;
34
47
zlim = (zmin, zmax),
35
48
nelements = nelements,
36
49
dz_tuple = (dz_bottom, dz_top),
@@ -43,13 +56,16 @@ N_days = N_days_spinup + 360
43
56
dt = FT (900 )
44
57
tf = t0 + FT (3600 * 24 * N_days)
45
58
46
- # Read in the parameters for the site
47
- include (
48
- joinpath (
49
- climaland_dir,
50
- " experiments/integrated/fluxnet/snow_soil/parameters_fluxnet.jl" ,
51
- ),
52
- )
59
+
60
+ data_link = " https://caltech.box.com/shared/static/7r0ci9pacsnwyo0o9c25mhhcjhsu6d72.csv"
61
+ # Height of sensor on flux tower
62
+ atmos_h = FT (32 )
63
+
64
+ # Required to use the same met_drivers_FLUXNET script, even though we currently have no canopy
65
+ h_leaf = FT (0 )
66
+ f_root_to_shoot = FT (0 )
67
+ plant_ν = FT (0 )
68
+
53
69
# This reads in the data from the flux tower site and creates
54
70
# the atmospheric and radiative driver structs for the model
55
71
include (
@@ -58,57 +74,54 @@ include(
58
74
" experiments/integrated/fluxnet/met_drivers_FLUXNET.jl" ,
59
75
),
60
76
)
61
-
62
-
63
- # Now we set up the model. For the soil model, we pick
64
- # a model type and model args:
65
- soil_domain = land_domain
66
- soil_albedo = Soil. ConstantTwoBandSoilAlbedo {FT} (;
67
- PAR_albedo = soil_α_PAR,
68
- NIR_albedo = soil_α_NIR,
77
+ forcing = (; atmos, radiation)
78
+ prognostic_land_components = (:snow , :soil )
79
+ α_soil = Soil. ConstantTwoBandSoilAlbedo {FT} (;
80
+ PAR_albedo = FT (0.25 ),
81
+ NIR_albedo = FT (0.25 ),
69
82
)
70
- soil_ps = Soil. EnergyHydrologyParameters (
71
- FT;
72
- ν = soil_ν,
73
- ν_ss_om,
74
- ν_ss_quartz,
75
- ν_ss_gravel,
76
- hydrology_cm = vanGenuchten {FT} (; α = soil_vg_α, n = soil_vg_n),
77
- K_sat = soil_K_sat,
78
- S_s = soil_S_s,
79
- θ_r,
80
- z_0m = z_0m_soil,
81
- z_0b = z_0b_soil,
82
- emissivity = soil_ϵ,
83
- albedo = soil_albedo,
83
+ runoff = ClimaLand. Soil. SurfaceRunoff ()
84
+ retention_parameters = (;
85
+ ν = FT (0.5 ),
86
+ K_sat = FT (0.45 / 3600 / 100 ),
87
+ hydrology_cm = vanGenuchten {FT} (; α = FT (2 ), n = FT (2 )),
88
+ θ_r = FT (0.09 ),
84
89
)
85
-
86
- soil_args = (parameters = soil_ps,)
87
- soil_model_type = Soil. EnergyHydrology
88
-
89
- ρ = 300.0
90
- α = 0.8
91
- snow_parameters = SnowParameters {FT} (
92
- dt;
93
- α_snow = Snow. ConstantAlbedoModel (α),
94
- density = Snow. MinimumDensityModel (ρ),
95
- earth_param_set = earth_param_set,
96
- );
97
- snow_args = (; parameters = snow_parameters);
98
- snow_model_type = Snow. SnowModel
99
- land_input = (
100
- atmos = atmos,
101
- radiation = radiation,
102
- domain = land_domain,
103
- runoff = ClimaLand. Soil. SurfaceRunoff (),
90
+ composition_parameters =
91
+ (; ν_ss_quartz = FT (0.2 ), ν_ss_om = FT (0.0 ), ν_ss_gravel = FT (0.4 ))
92
+ S_s = FT (1e-3 )
93
+ z_0m = FT (0.01 )
94
+ z_0b = FT (0.001 )
95
+ emissivity = FT (0.98 )
96
+ soil_model = Soil. EnergyHydrology (
97
+ FT,
98
+ domain,
99
+ forcing,
100
+ earth_param_set;
101
+ prognostic_land_components,
102
+ albedo = α_soil,
103
+ runoff,
104
+ retention_parameters,
105
+ S_s,
106
+ composition_parameters,
107
+ z_0m,
108
+ z_0b,
109
+ emissivity,
104
110
)
105
- land = ClimaLand. SoilSnowModel {FT} (;
106
- land_args = land_input,
107
- soil_model_type = soil_model_type,
108
- soil_args = soil_args,
109
- snow_args = snow_args,
110
- snow_model_type = snow_model_type,
111
+ α_snow = Snow. ConstantAlbedoModel (0.8 )
112
+ density = Snow. MinimumDensityModel (300.0 )
113
+ snow_model = Snow. SnowModel (
114
+ FT,
115
+ ClimaLand. Domains. obtain_surface_domain (domain),
116
+ forcing,
117
+ earth_param_set,
118
+ dt;
119
+ prognostic_land_components,
120
+ α_snow,
121
+ density,
111
122
)
123
+
124
+ land = ClimaLand. SoilSnowModel (; snow = snow_model, soil = soil_model)
112
125
Y, p, cds = initialize (land)
113
126
exp_tendency! = make_exp_tendency (land)
114
127
imp_tendency! = make_imp_tendency (land)
@@ -131,7 +144,7 @@ T_0 =
131
144
volumetric_heat_capacity .(
132
145
Y. soil. ϑ_l,
133
146
Y. soil. θ_i,
134
- soil_ps . ρc_ds,
147
+ soil_model . parameters . ρc_ds,
135
148
earth_param_set,
136
149
)
137
150
Y. soil. ρe_int =
0 commit comments