@@ -321,6 +321,7 @@ auxiliary_types(::BucketModel{FT}) where {FT} = (
321
321
FT,
322
322
FT,
323
323
ClimaCore. Geometry. WVector{FT},
324
+ FT,
324
325
)
325
326
auxiliary_vars (:: BucketModel ) = (
326
327
:q_sfc ,
@@ -336,6 +337,7 @@ auxiliary_vars(::BucketModel) = (
336
337
:snow_melt ,
337
338
:infiltration ,
338
339
:top_bc_wvec ,
340
+ :e_per_area ,
339
341
)
340
342
auxiliary_domain_names (:: BucketModel ) = (
341
343
:surface ,
@@ -351,6 +353,7 @@ auxiliary_domain_names(::BucketModel) = (
351
353
:surface ,
352
354
:surface ,
353
355
:surface ,
356
+ :surface ,
354
357
)
355
358
356
359
@@ -497,6 +500,8 @@ function make_update_aux(model::BucketModel{FT}) where {FT}
497
500
model. parameters. W_f,
498
501
) # Equation (2) of the text.
499
502
503
+ # Compute the integrated energy per area
504
+ ClimaLand. total_energy_per_area! (p. bucket. e_per_area, model, Y, p, t)
500
505
end
501
506
return update_aux!
502
507
end
@@ -576,6 +581,38 @@ function surface_air_density(
576
581
return p. bucket. ρ_sfc
577
582
end
578
583
584
+ """
585
+
586
+ ClimaLand.total_energy_per_area!(
587
+ surface_field,
588
+ model::BucketModel,
589
+ Y,
590
+ p,
591
+ t,
592
+ )
593
+
594
+ A function which updates `surface_field` in place with the value for
595
+ the total energy per unit ground area for the `BucketModel`.
596
+ """
597
+ function ClimaLand. total_energy_per_area! (
598
+ surface_field,
599
+ model:: BucketModel ,
600
+ Y,
601
+ p,
602
+ t,
603
+ )
604
+ surface_field .= 0
605
+ ClimaCore. Operators. column_integral_definite! (
606
+ surface_field,
607
+ model. parameters. ρc_soil .* Y. bucket. T,
608
+ )
609
+
610
+ surface_field .+ =
611
+ - LP. LH_f0 (model. parameters. earth_param_set) .*
612
+ LP. ρ_cloud_liq (model. parameters. earth_param_set) .* Y. bucket. σS
613
+ return nothing
614
+ end
615
+
579
616
include (" ./bucket_parameterizations.jl" )
580
617
581
618
end
0 commit comments