diff --git a/.gitmodules b/.gitmodules index 9c5ab48276..f52e927a81 100644 --- a/.gitmodules +++ b/.gitmodules @@ -68,7 +68,7 @@ fxDONOTUSEurl = https://github.com/ESCOMP/mizuRoute [submodule "ccs_config"] path = ccs_config url = https://github.com/NorESMhub/ccs_config_noresm.git -fxtag = ccs_config_noresm0.0.55 +fxtag = ccs_config_noresm0.0.56 fxrequired = ToplevelRequired # Standard Fork to compare to with "git fleximod test" to ensure personal forks aren't committed fxDONOTUSEurl = https://github.com/NorESMhub/ccs_config_noresm @@ -92,7 +92,7 @@ fxDONOTUSEurl = https://github.com/NorESMhub/CMEPS.git [submodule "cdeps"] path = components/cdeps url = https://github.com/NorESMhub/CDEPS.git -fxtag = cdeps1.0.83_noresm_v2 +fxtag = cdeps1.0.88_noresm_v0 fxrequired = ToplevelRequired # Standard Fork to compare to with "git fleximod test" to ensure personal forks aren't committed fxDONOTUSEurl = https://github.com/NorESMhub/CDEPS.git diff --git a/ccs_config b/ccs_config index 62af5049e4..ef35067b9a 160000 --- a/ccs_config +++ b/ccs_config @@ -1 +1 @@ -Subproject commit 62af5049e4fbea2168e3807bc9a97c32841fbe7f +Subproject commit ef35067b9af27febd91f7abd46625e14e23a7851 diff --git a/components/cdeps b/components/cdeps index 7ee2cf7954..5414f59503 160000 --- a/components/cdeps +++ b/components/cdeps @@ -1 +1 @@ -Subproject commit 7ee2cf7954b1c18181652ed9b6ec26a8c31cb147 +Subproject commit 5414f59503f08461e25705f22970112510056935 diff --git a/src/biogeophys/SoilTemperatureMod.F90 b/src/biogeophys/SoilTemperatureMod.F90 index 09cb0067c4..2ffc2c23d1 100644 --- a/src/biogeophys/SoilTemperatureMod.F90 +++ b/src/biogeophys/SoilTemperatureMod.F90 @@ -78,7 +78,7 @@ module SoilTemperatureMod ! !PRIVATE MEMBER FUNCTIONS: private :: SoilThermProp ! Set therm conduct. and heat cap of snow/soil layers private :: PhaseChangeH2osfc ! When surface water freezes move ice to bottom snow layer - private :: PhaseChange_beta ! Calculation of the phase change within snow and soil layers + private :: PhaseChange ! Calculation of the phase change within snow and soil layers private :: BuildingHAC ! Building Heating and Cooling for simpler method (introduced in CLM4.5) real(r8), private, parameter :: thin_sfclayer = 1.0e-6_r8 ! Threshold for thin surface layer @@ -517,7 +517,7 @@ subroutine SoilTemperature(bounds, num_urbanl, filter_urbanl, num_urbanc, filter dhsdT(bounds%begc:bounds%endc), & waterstatebulk_inst, waterdiagnosticbulk_inst, waterfluxbulk_inst, temperature_inst,energyflux_inst) - call Phasechange_beta (bounds, num_nolakec, filter_nolakec, & + call Phasechange (bounds, num_nolakec, filter_nolakec, & dhsdT(bounds%begc:bounds%endc), & soilstate_inst, waterstatebulk_inst, waterdiagnosticbulk_inst, waterfluxbulk_inst, energyflux_inst, temperature_inst) @@ -1131,7 +1131,7 @@ subroutine PhaseChangeH2osfc (bounds, num_nolakec, filter_nolakec, & end subroutine PhaseChangeH2osfc !----------------------------------------------------------------------- - subroutine Phasechange_beta (bounds, num_nolakec, filter_nolakec, dhsdT, & + subroutine Phasechange (bounds, num_nolakec, filter_nolakec, dhsdT, & soilstate_inst, waterstatebulk_inst, waterdiagnosticbulk_inst, waterfluxbulk_inst, energyflux_inst, temperature_inst) ! ! !DESCRIPTION: @@ -1187,7 +1187,7 @@ subroutine Phasechange_beta (bounds, num_nolakec, filter_nolakec, dhsdT, & !----------------------------------------------------------------------- - call t_startf( 'PhaseChangebeta' ) + call t_startf( 'PhaseChange' ) ! Enforce expected array sizes SHR_ASSERT_ALL_FL((ubound(dhsdT) == (/bounds%endc/)), sourcefile, __LINE__) @@ -1280,7 +1280,6 @@ subroutine Phasechange_beta (bounds, num_nolakec, filter_nolakec, dhsdT, & ! If ice exists above melt point, melt some to liquid. if (h2osoi_ice(c,j) > 0._r8 .and. t_soisno(c,j) > tfrz) then imelt(c,j) = 1 - ! tinc(c,j) = t_soisno(c,j) - tfrz tinc(c,j) = tfrz - t_soisno(c,j) t_soisno(c,j) = tfrz endif @@ -1289,7 +1288,6 @@ subroutine Phasechange_beta (bounds, num_nolakec, filter_nolakec, dhsdT, & ! If liquid exists below melt point, freeze some to ice. if (h2osoi_liq(c,j) > 0._r8 .AND. t_soisno(c,j) < tfrz) then imelt(c,j) = 2 - ! tinc(c,j) = t_soisno(c,j) - tfrz tinc(c,j) = tfrz - t_soisno(c,j) t_soisno(c,j) = tfrz endif @@ -1311,7 +1309,6 @@ subroutine Phasechange_beta (bounds, num_nolakec, filter_nolakec, dhsdT, & if (h2osoi_ice(c,j) > 0. .AND. t_soisno(c,j) > tfrz) then imelt(c,j) = 1 - ! tinc(c,j) = t_soisno(c,j) - tfrz tinc(c,j) = tfrz - t_soisno(c,j) t_soisno(c,j) = tfrz endif @@ -1335,7 +1332,6 @@ subroutine Phasechange_beta (bounds, num_nolakec, filter_nolakec, dhsdT, & if (h2osoi_liq(c,j) > supercool(c,j) .AND. t_soisno(c,j) < tfrz) then imelt(c,j) = 2 - ! tinc(c,j) = t_soisno(c,j) - tfrz tinc(c,j) = tfrz - t_soisno(c,j) t_soisno(c,j) = tfrz endif @@ -1344,7 +1340,6 @@ subroutine Phasechange_beta (bounds, num_nolakec, filter_nolakec, dhsdT, & if (h2osno_no_layers(c) > 0._r8 .AND. j == 1) then if (t_soisno(c,j) > tfrz) then imelt(c,j) = 1 - ! tincc,j) = t_soisno(c,j) - tfrz tinc(c,j) = tfrz - t_soisno(c,j) t_soisno(c,j) = tfrz endif @@ -1439,14 +1434,16 @@ subroutine Phasechange_beta (bounds, num_nolakec, filter_nolakec, dhsdT, & heatr = 0._r8 if (xm(c,j) > 0._r8) then !if there is excess heat to melt the ice h2osoi_ice(c,j) = max(0._r8, wice0(c,j)-xm(c,j)) - heatr = hm(c,j) - hfus*(wice0(c,j)-h2osoi_ice(c,j))/dtime - xm2(c,j) = xm(c,j) - h2osoi_ice(c,j) !excess ice melting - if (h2osoi_ice(c,j) == 0._r8) then ! this might be redundant - if (excess_ice(c,j) >= 0._r8 .and. xm2(c,j)>0._r8 .and. j>=2) then ! if there is excess ice to melt - excess_ice(c,j) = max(0._r8,wexice0(c,j) - xm2(c,j)) - heatr = hm(c,j) - hfus * (wexice0(c,j)-excess_ice(c,j)+wice0(c,j)-h2osoi_ice(c,j)) / dtime + xm2(c,j) = xm(c,j) - wice0(c,j) ! Leftover melt + if (j>=1) then ! soil + if (excess_ice(c,j) >= 0._r8 .and. xm2(c,j)>0._r8) then ! if there is excess ice to melt + excess_ice(c,j) = max(0._r8,wexice0(c,j) - xm2(c,j)) endif - endif !end of excess ice block + heatr = hm(c,j) - hfus * (wexice0(c,j)-excess_ice(c,j)+ & + wice0(c,j)-h2osoi_ice(c,j)) / dtime + else !snow + heatr = hm(c,j) - hfus * (wice0(c,j)-h2osoi_ice(c,j)) / dtime + endif else if (xm(c,j) < 0._r8) then if (j <= 0) then h2osoi_ice(c,j) = min(wmass0(c,j), wice0(c,j)-xm(c,j)) ! snow @@ -1536,10 +1533,10 @@ subroutine Phasechange_beta (bounds, num_nolakec, filter_nolakec, dhsdT, & end if end do - call t_stopf( 'PhaseChangebeta' ) + call t_stopf( 'PhaseChange' ) end associate - end subroutine Phasechange_beta + end subroutine Phasechange !----------------------------------------------------------------------- subroutine ComputeGroundHeatFluxAndDeriv(bounds, &