@@ -859,6 +859,17 @@ Computes turbulent surface fluxes for soil at a point on a surface given
859
859
860
860
This returns an energy flux and a liquid water volume flux, stored in
861
861
a tuple with self explanatory keys.
862
+
863
+ Notes:
864
+ In this function, we call SF twice - once for ice, and once for water.
865
+ We then combine the fluxes from them to get the total SH, LH.
866
+ The vapor fluxes are applied to ice and water differently - as either a source term
867
+ or a boundary condition- so they are kept separate.
868
+
869
+ For ice, we supply a beta factor and do not need an additional surface resistance,
870
+ and so we use the output of surface_conditions directly.
871
+ For water, we do, and it's a little complicated how we handle it.
872
+ But once we correct E, we compute SH and LH the same as SurfaceFluxes.jl does.
862
873
"""
863
874
function soil_turbulent_fluxes_at_a_point (
864
875
T_sfc:: FT ,
@@ -881,24 +892,31 @@ function soil_turbulent_fluxes_at_a_point(
881
892
γT_ref:: FT ,
882
893
earth_param_set:: P ,
883
894
) where {FT <: AbstractFloat , P}
895
+ # Parameters
896
+ surface_flux_params = LP. surface_fluxes_parameters (earth_param_set)
884
897
thermo_params = LP. thermodynamic_parameters (earth_param_set)
898
+ _LH_v0:: FT = LP. LH_v0 (earth_param_set)
899
+ _ρ_liq:: FT = LP. ρ_cloud_liq (earth_param_set)
900
+
901
+ # Atmos air state
902
+ state_air = SurfaceFluxes. StateValues (
903
+ h_air - d_sfc - h_sfc,
904
+ SVector {2, FT} (u_air, 0 ),
905
+ thermal_state_air,
906
+ )
907
+ q_air:: FT =
908
+ Thermodynamics. total_specific_humidity (thermo_params, thermal_state_air)
909
+
885
910
# Estimate surface air density
886
911
ρ_sfc:: FT = ClimaLand. compute_ρ_sfc (thermo_params, thermal_state_air, T_sfc)
887
- # Compute saturated specific humidities at surface over ice and liquid water
888
- q_sat_ice:: FT = Thermodynamics. q_vap_saturation_generic (
889
- thermo_params,
890
- T_sfc,
891
- ρ_sfc,
892
- Thermodynamics. Ice (),
893
- )
912
+
913
+ # Now compute surface fluxes from liquid water component:
894
914
q_sat_liq:: FT = Thermodynamics. q_vap_saturation_generic (
895
915
thermo_params,
896
916
T_sfc,
897
917
ρ_sfc,
898
918
Thermodynamics. Liquid (),
899
919
)
900
-
901
- # Evaporation:
902
920
thermal_state_sfc:: Thermodynamics.PhaseEquil{FT} =
903
921
Thermodynamics. PhaseEquil_ρTq (thermo_params, ρ_sfc, T_sfc, q_sat_liq)# use to get potential evaporation E0, r_ae (weak dependence on q).
904
922
@@ -916,12 +934,6 @@ function soil_turbulent_fluxes_at_a_point(
916
934
SVector {2, FT} (0 , 0 ),
917
935
thermal_state_sfc,
918
936
)
919
- state_air = SurfaceFluxes. StateValues (
920
- h_air - d_sfc - h_sfc,
921
- SVector {2, FT} (u_air, 0 ),
922
- thermal_state_air,
923
- )
924
-
925
937
# State containers
926
938
states = SurfaceFluxes. ValuesOnly (
927
939
state_air,
@@ -930,21 +942,9 @@ function soil_turbulent_fluxes_at_a_point(
930
942
z_0b,
931
943
gustiness = gustiness,
932
944
)
933
- surface_flux_params = LP. surface_fluxes_parameters (earth_param_set)
934
- conditions = SurfaceFluxes. surface_conditions (
935
- surface_flux_params,
936
- states;
937
- tol_neutral = SFP. cp_d (surface_flux_params) / 100000 ,
938
- )
939
- _LH_v0:: FT = LP. LH_v0 (earth_param_set)
940
- _ρ_liq:: FT = LP. ρ_cloud_liq (earth_param_set)
941
- cp_m:: FT = Thermodynamics. cp_m (thermo_params, thermal_state_air)
942
- T_air:: FT = Thermodynamics. air_temperature (thermo_params, thermal_state_air)
943
- ρ_air:: FT = Thermodynamics. air_density (thermo_params, thermal_state_air)
944
- q_air:: FT =
945
- Thermodynamics. total_specific_humidity (thermo_params, thermal_state_air)
946
-
947
- ΔT:: FT = T_air - T_sfc
945
+ scheme = SurfaceFluxes. PointValueScheme ()
946
+ conditions =
947
+ SurfaceFluxes. surface_conditions (surface_flux_params, states, scheme)
948
948
r_ae_liq:: FT = 1 / (conditions. Ch * SurfaceFluxes. windspeed (states))
949
949
950
950
E0:: FT =
@@ -970,9 +970,22 @@ function soil_turbulent_fluxes_at_a_point(
970
970
else
971
971
Ẽ *= 0 # condensation, set to zero
972
972
end
973
- H_liq:: FT = - ρ_air * cp_m * ΔT / r_ae_liq
974
973
975
- # Sublimation:
974
+ # sensible heat flux
975
+ SH_liq = SurfaceFluxes. sensible_heat_flux (
976
+ surface_flux_params,
977
+ conditions. Ch,
978
+ states,
979
+ scheme,
980
+ )
981
+
982
+ # Repeat for ice component:
983
+ q_sat_ice:: FT = Thermodynamics. q_vap_saturation_generic (
984
+ thermo_params,
985
+ T_sfc,
986
+ ρ_sfc,
987
+ Thermodynamics. Ice (),
988
+ )
976
989
thermal_state_sfc =
977
990
Thermodynamics. PhaseEquil_ρTq (thermo_params, ρ_sfc, T_sfc, q_sat_ice)
978
991
β_i:: FT = FT (1 )
@@ -996,25 +1009,28 @@ function soil_turbulent_fluxes_at_a_point(
996
1009
beta = β_i,
997
1010
gustiness = gustiness,
998
1011
)
999
- conditions = SurfaceFluxes. surface_conditions (
1000
- surface_flux_params,
1001
- states;
1002
- tol_neutral = SFP. cp_d (surface_flux_params) / 100000 ,
1003
- )
1012
+ conditions =
1013
+ SurfaceFluxes. surface_conditions (surface_flux_params, states, scheme)
1004
1014
S:: FT =
1005
1015
SurfaceFluxes. evaporation (surface_flux_params, states, conditions. Ch)# sublimation rate, mass flux
1006
1016
S̃:: FT = S / _ρ_liq
1007
1017
1008
1018
r_ae_ice:: FT = 1 / (conditions. Ch * SurfaceFluxes. windspeed (states))
1009
- H_ice:: FT = - ρ_air * cp_m * ΔT / r_ae_ice
1019
+ # sensible heat flux from ice
1020
+ SH_ice = SurfaceFluxes. sensible_heat_flux (
1021
+ surface_flux_params,
1022
+ conditions. Ch,
1023
+ states,
1024
+ scheme,
1025
+ )
1010
1026
1011
- # Heat fluxes
1027
+ # Heat fluxes for soil
1012
1028
LH:: FT = _LH_v0 * (Ẽ + S̃) * _ρ_liq
1013
- H :: FT = (H_ice + H_liq ) / 2
1029
+ SH :: FT = (SH_ice + SH_liq ) / 2
1014
1030
r_ae:: FT = 2 * r_ae_liq * r_ae_ice / (r_ae_liq + r_ae_ice) # implied by definition of H
1015
1031
return (
1016
1032
lhf = LH,
1017
- shf = H ,
1033
+ shf = SH ,
1018
1034
vapor_flux_liq = Ẽ,
1019
1035
r_ae = r_ae,
1020
1036
vapor_flux_ice = S̃,
0 commit comments