@@ -205,6 +205,7 @@ lsm_aux_vars(m::LandModel) = (
205
205
:T_sfc ,
206
206
:ϵ_sfc ,
207
207
:α_sfc ,
208
+ :α_ground ,
208
209
)
209
210
210
211
"""
@@ -213,8 +214,28 @@ lsm_aux_vars(m::LandModel) = (
213
214
The types of the additional auxiliary variables that are
214
215
included in the land model.
215
216
"""
216
- lsm_aux_types (m:: LandModel{FT} ) where {FT} =
217
- (FT, FT, FT, FT, FT, FT, FT, FT, FT, FT, FT, FT, FT, FT, FT, FT, FT, FT, FT)
217
+ lsm_aux_types (m:: LandModel{FT} ) where {FT} = (
218
+ FT,
219
+ FT,
220
+ FT,
221
+ FT,
222
+ FT,
223
+ FT,
224
+ FT,
225
+ FT,
226
+ FT,
227
+ FT,
228
+ FT,
229
+ FT,
230
+ FT,
231
+ FT,
232
+ FT,
233
+ FT,
234
+ FT,
235
+ FT,
236
+ FT,
237
+ NamedTuple{(:PAR , :NIR ), Tuple{FT, FT}},
238
+ )
218
239
219
240
"""
220
241
lsm_aux_domain_names(m::LandModel)
@@ -242,6 +263,7 @@ lsm_aux_domain_names(m::LandModel) = (
242
263
:surface ,
243
264
:surface ,
244
265
:surface ,
266
+ :surface ,
245
267
)
246
268
247
269
"""
@@ -555,12 +577,11 @@ end
555
577
PrognosticGroundConditions{FT <: AbstractFloat, F <: Union{FT, ClimaCore.Fields.Field}} <: Canopy.AbstractGroundConditions
556
578
557
579
A type of Canopy.AbstractGroundConditions to use when the soil model is prognostic and
558
- of type `EnergyHydrology`. This is required because the canopy model needs albedo of the ground
559
- in order to compute its update_aux! function, and that function must only depend on the canopy model.
580
+ of type `EnergyHydrology`, and the snow model is prognostic and included.
560
581
561
- In the future, we will allocate space for albedo in the cache. In that case, we would *not*
562
- store them here, twice. `PrognosticGroundConditions` would
563
- then just be a flag, essentially .
582
+ The canopy model needs albedo of the ground
583
+ in order to compute its update_aux! function, and that function must only depend on the canopy model.
584
+ Because of this, α_snow must be stored in this struct until it is stored in the cache .
564
585
565
586
Note that this struct is linked with the EnergyHydrology model. If we ever had a different
566
587
soil model, we might need to construct a different `PrognosticGroundConditions` because
582
603
t,
583
604
)
584
605
585
- A method of Canopy.ground_albedo_PAR for a prognostic soil/snow.
606
+ A method of Canopy.ground_albedo_PAR for a prognostic soil/snow. This function is called in
607
+ the Canopy update_aux! function.
586
608
"""
587
609
function Canopy. ground_albedo_PAR (
588
610
prognostic_land_components:: Val{(:canopy, :snow, :soil, :soilco2)} ,
@@ -591,8 +613,10 @@ function Canopy.ground_albedo_PAR(
591
613
p,
592
614
t,
593
615
)
594
- return @. (1 - p. snow. snow_cover_fraction) * p. soil. PAR_albedo +
595
- p. snow. snow_cover_fraction * ground. α_snow
616
+ @. p. α_ground. PAR =
617
+ (1 - p. snow. snow_cover_fraction) * p. soil. PAR_albedo +
618
+ p. snow. snow_cover_fraction * ground. α_snow
619
+ return p. α_ground. PAR
596
620
end
597
621
598
622
"""
604
628
t,
605
629
)
606
630
607
- A method of Canopy.ground_albedo_NIR for a prognostic soil/snow.
631
+ A method of Canopy.ground_albedo_NIR for a prognostic soil/snow. This function is called in
632
+ the Canopy update_aux! function.
608
633
"""
609
634
function Canopy. ground_albedo_NIR (
610
635
prognostic_land_components:: Val{(:canopy, :snow, :soil, :soilco2)} ,
@@ -613,8 +638,10 @@ function Canopy.ground_albedo_NIR(
613
638
p,
614
639
t,
615
640
)
616
- return @. (1 - p. snow. snow_cover_fraction) * p. soil. NIR_albedo +
617
- p. snow. snow_cover_fraction * ground. α_snow
641
+ @. p. α_ground. NIR =
642
+ (1 - p. snow. snow_cover_fraction) * p. soil. NIR_albedo +
643
+ p. snow. snow_cover_fraction * ground. α_snow
644
+ return p. α_ground. NIR
618
645
end
619
646
620
647
"""
0 commit comments