Skip to content

Commit f8e3d59

Browse files
authored
Merge pull request #968 from CliMA/js/landhydrology
rename LandHydrologyModel as SoilSnowModel
2 parents c44b057 + 0f820cd commit f8e3d59

File tree

3 files changed

+24
-24
lines changed

3 files changed

+24
-24
lines changed

experiments/integrated/fluxnet/snow_soil/simulation.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,7 @@ land_input = (
9999
domain = land_domain,
100100
runoff = ClimaLand.Soil.SurfaceRunoff(),
101101
)
102-
land = ClimaLand.LandHydrologyModel{FT}(;
102+
land = ClimaLand.SoilSnowModel{FT}(;
103103
land_args = land_input,
104104
soil_model_type = soil_model_type,
105105
soil_args = soil_args,

src/integrated/soil_snow_model.jl

Lines changed: 22 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
1-
export LandHydrologyModel
1+
export SoilSnowModel
22
using ClimaCore.Operators: column_integral_definite!
33

44

55
"""
6-
struct LandHydrologyModel{
6+
struct SoilSnowModel{
77
FT,
88
SnM <: Snow.SnowModel{FT},
99
SoM <: Soil.EnergyHydrology{FT},
@@ -18,7 +18,7 @@ A concrete type of land model used for simulating systems with
1818
snow and soil (and eventually rivers).
1919
$(DocStringExtensions.FIELDS)
2020
"""
21-
struct LandHydrologyModel{
21+
struct SoilSnowModel{
2222
FT,
2323
SnM <: Snow.SnowModel{FT},
2424
SoM <: Soil.EnergyHydrology{FT},
@@ -30,7 +30,7 @@ struct LandHydrologyModel{
3030
end
3131

3232
"""
33-
LandHydrologyModel{FT}(;
33+
SoilSnowModel{FT}(;
3434
land_args::NamedTuple = (;),
3535
snow_model_type::Type{SnM},
3636
snow_args::NamedTuple = (;),
@@ -44,13 +44,13 @@ end
4444
4545
A constructor for the `LandHydrology`, which takes in the concrete model
4646
type and required arguments for each component, constructs those models,
47-
and constructs the `LandHydrologyModel` from them.
47+
and constructs the `SoilSnowModel` from them.
4848
4949
Each component model is constructed with everything it needs to be stepped
5050
forward in time, including boundary conditions, source terms, and interaction
5151
terms.
5252
"""
53-
function LandHydrologyModel{FT}(;
53+
function SoilSnowModel{FT}(;
5454
land_args::NamedTuple = (;),
5555
snow_model_type::Type{SnM},
5656
snow_args::NamedTuple = (;),
@@ -95,16 +95,16 @@ function LandHydrologyModel{FT}(;
9595
snow_args...,
9696
)
9797

98-
return LandHydrologyModel{FT, typeof(snow), typeof(soil)}(snow, soil)
98+
return SoilSnowModel{FT, typeof(snow), typeof(soil)}(snow, soil)
9999
end
100100

101101
"""
102-
lsm_aux_vars(m::LandHydrologyModel)
102+
lsm_aux_vars(m::SoilSnowModel)
103103
104104
The names of the additional auxiliary variables that are
105105
included in the integrated Soil-Snow model.
106106
"""
107-
lsm_aux_vars(m::LandHydrologyModel) = (
107+
lsm_aux_vars(m::SoilSnowModel) = (
108108
:excess_water_flux,
109109
:excess_heat_flux,
110110
:atmos_energy_flux,
@@ -116,21 +116,21 @@ lsm_aux_vars(m::LandHydrologyModel) = (
116116
:effective_soil_sfc_depth,
117117
)
118118
"""
119-
lsm_aux_types(m::LandHydrologyModel)
119+
lsm_aux_types(m::SoilSnowModel)
120120
121121
The types of the additional auxiliary variables that are
122122
included in the integrated Soil-Snow model.
123123
"""
124-
lsm_aux_types(m::LandHydrologyModel{FT}) where {FT} =
124+
lsm_aux_types(m::SoilSnowModel{FT}) where {FT} =
125125
(FT, FT, FT, FT, FT, FT, FT, FT, FT)
126126

127127
"""
128-
lsm_aux_domain_names(m::LandHydrologyModel)
128+
lsm_aux_domain_names(m::SoilSnowModel)
129129
130130
The domain names of the additional auxiliary variables that are
131131
included in the integrated Soil-Snow model.
132132
"""
133-
lsm_aux_domain_names(m::LandHydrologyModel) = (
133+
lsm_aux_domain_names(m::SoilSnowModel) = (
134134
:surface,
135135
:surface,
136136
:surface,
@@ -144,7 +144,7 @@ lsm_aux_domain_names(m::LandHydrologyModel) = (
144144

145145
"""
146146
make_update_boundary_fluxes(
147-
land::LandHydrologyModel{FT, SnM, SoM},
147+
land::SoilSnowModel{FT, SnM, SoM},
148148
) where {
149149
FT,
150150
SnM <: Snow.SnowModel{FT},
@@ -154,7 +154,7 @@ lsm_aux_domain_names(m::LandHydrologyModel) = (
154154
A method which makes a function; the returned function
155155
updates the additional auxiliary variables for the integrated model,
156156
as well as updates the boundary auxiliary variables for all component
157-
models.
157+
models.
158158
159159
This function is called each ode function evaluation, prior to the tendency function
160160
evaluation.
@@ -167,7 +167,7 @@ completely melts in a step. In this case, that excess must go to the soil for co
167167
4. Compute the net flux for the atmosphere, which is useful for assessing conservation.
168168
"""
169169
function make_update_boundary_fluxes(
170-
land::LandHydrologyModel{FT, SnM, SoM},
170+
land::SoilSnowModel{FT, SnM, SoM},
171171
) where {FT, SnM <: Snow.SnowModel{FT}, SoM <: Soil.EnergyHydrology{FT}}
172172
update_soil_bf! = make_update_boundary_fluxes(land.soil)
173173
update_snow_bf! = make_update_boundary_fluxes(land.snow)
@@ -225,15 +225,15 @@ end
225225
"""
226226
update_soil_snow_ground_heat_flux!(p, Y, soil_params, snow_params, soil_domain, FT)
227227
228-
Computes and updates `p.ground_heat_flux` with the ground heat flux. We approximate this
228+
Computes and updates `p.ground_heat_flux` with the ground heat flux. We approximate this
229229
as
230230
F_g = - κ_eff (T_snow - T_soil)/Δz_eff,
231231
232232
where:
233233
κ_eff = κ_soil * κ_snow / (κ_snow * Δz_soil / 2 + κ_soil * Δz_snow / 2)* (Δz_soil + Δz_snow)/2
234234
Δz_eff =( Δz_soil + Δz_snow)/2
235235
236-
This is what JULES does to compute the diffusive heat flux between snow and soil, for example,
236+
This is what JULES does to compute the diffusive heat flux between snow and soil, for example,
237237
see equation 24 and 25, with k=N, of Best et al, Geosci. Model Dev., 4, 677–699, 2011
238238
239239
However, this is for a multi-layer snow model, with
@@ -315,15 +315,15 @@ end
315315
t,
316316
) where {FT}
317317
318-
A method of `snow_boundary_fluxes!` which computes
318+
A method of `snow_boundary_fluxes!` which computes
319319
the boundary fluxes for the snow model accounting
320320
for a heat flux between the soil and snow.
321321
322-
The snow surface is
322+
The snow surface is
323323
assumed to be bare (no vegetation).
324324
325325
Currently this is almost identical to the method for snow alone,
326-
except for the inclusion of the ground heat flux (precomputed by
326+
except for the inclusion of the ground heat flux (precomputed by
327327
the integrated land model). However, this will change more if e.g.
328328
we allow for transmission of radiation through the snowpack.
329329
"""
@@ -456,7 +456,7 @@ function ClimaLand.source!(
456456
_ρ_l / _ρ_i * heaviside(z + 2 * Δz_top) # only apply to top layer, recall that z is negative
457457
end
458458

459-
function ClimaLand.get_drivers(model::LandHydrologyModel)
459+
function ClimaLand.get_drivers(model::SoilSnowModel)
460460
return (
461461
model.snow.boundary_conditions.atmos,
462462
model.snow.boundary_conditions.radiation,

test/integrated/soil_snow.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ snow_params =
8282
ClimaLand.Snow.SnowParameters{FT}(Δt; earth_param_set = earth_param_set)
8383

8484
# Land model
85-
land_model = ClimaLand.LandHydrologyModel{FT}(;
85+
land_model = ClimaLand.SoilSnowModel{FT}(;
8686
land_args = (atmos = atmos, radiation = radiation, domain = domain),
8787
snow_model_type = ClimaLand.Snow.SnowModel,
8888
snow_args = (parameters = snow_params,),

0 commit comments

Comments
 (0)