Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for disabling thermodynamics #389

Closed
wants to merge 2 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 10 additions & 4 deletions columnphysics/icepack_therm_vertical.F90
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -2586,6 +2586,8 @@ subroutine icepack_step_therm1(dt, ncat, nilyr, nslyr, &
l_smliq = c0 l_smliq = c0
if (present(smliqn)) l_smliq = smliqn if (present(smliqn)) l_smliq = smliqn


if (ktherm >= 0) then

!----------------------------------------------------------------- !-----------------------------------------------------------------
! Initialize rate of snow loss to leads ! Initialize rate of snow loss to leads
!----------------------------------------------------------------- !-----------------------------------------------------------------
Expand Down Expand Up @@ -2624,6 +2626,7 @@ subroutine icepack_step_therm1(dt, ncat, nilyr, nslyr, &
enddo enddo
endif endif


endif ! ktherm >= 0


!----------------------------------------------------------------- !-----------------------------------------------------------------
! Update the neutral drag coefficients to account for form drag ! Update the neutral drag coefficients to account for form drag
Expand Down Expand Up @@ -2655,6 +2658,7 @@ subroutine icepack_step_therm1(dt, ncat, nilyr, nslyr, &
! Compute lateral and bottom heat fluxes. ! Compute lateral and bottom heat fluxes.
!----------------------------------------------------------------- !-----------------------------------------------------------------


if (ktherm >= 0) &
call frzmlt_bottom_lateral (dt, ncat, & call frzmlt_bottom_lateral (dt, ncat, &
nilyr, nslyr, & nilyr, nslyr, &
aice, frzmlt, & aice, frzmlt, &
Expand Down Expand Up @@ -2753,6 +2757,7 @@ subroutine icepack_step_therm1(dt, ncat, nilyr, nslyr, &
! Vertical thermodynamics: Heat conduction, growth and melting. ! Vertical thermodynamics: Heat conduction, growth and melting.
!----------------------------------------------------------------- !-----------------------------------------------------------------


if (ktherm >= 0) then
if (.not.(calc_Tsfc)) then if (.not.(calc_Tsfc)) then


! If not calculating surface temperature and fluxes, set ! If not calculating surface temperature and fluxes, set
Expand Down Expand Up @@ -2853,9 +2858,10 @@ subroutine icepack_step_therm1(dt, ncat, nilyr, nslyr, &
if (icepack_warnings_aborted(subname)) return if (icepack_warnings_aborted(subname)) return
endif endif


endif ! ktherm >= 0
endif ! aicen_init endif ! aicen_init


if (snwgrain .and. use_smliq_pnd) then if (snwgrain .and. use_smliq_pnd .and. ktherm >= 0) then
call drain_snow (nslyr = nslyr, & call drain_snow (nslyr = nslyr, &
vsnon = vsnon(n), & vsnon = vsnon(n), &
aicen = aicen(n), & aicen = aicen(n), &
Expand All @@ -2873,7 +2879,7 @@ subroutine icepack_step_therm1(dt, ncat, nilyr, nslyr, &
!----------------------------------------------------------------- !-----------------------------------------------------------------


!call ice_timer_start(timer_ponds) !call ice_timer_start(timer_ponds)
if (tr_pond) then if (tr_pond .and. ktherm >= 0) then


if (tr_pond_cesm) then if (tr_pond_cesm) then
rfrac = rfracmin + (rfracmax-rfracmin) * aicen(n) rfrac = rfracmin + (rfracmax-rfracmin) * aicen(n)
Expand Down Expand Up @@ -3012,7 +3018,7 @@ subroutine icepack_step_therm1(dt, ncat, nilyr, nslyr, &
! reload snow mass tracers ! reload snow mass tracers
!----------------------------------------------------------------- !-----------------------------------------------------------------


if (snwgrain) then if (snwgrain .and. ktherm >= 0) then
do n = 1, ncat do n = 1, ncat
if (vsnon(n) > puny) then if (vsnon(n) > puny) then
do k = 1, nslyr do k = 1, nslyr
Expand Down Expand Up @@ -3074,7 +3080,7 @@ subroutine icepack_step_therm1(dt, ncat, nilyr, nslyr, &
! Calculate ponds from the topographic scheme ! Calculate ponds from the topographic scheme
!----------------------------------------------------------------- !-----------------------------------------------------------------
!call ice_timer_start(timer_ponds) !call ice_timer_start(timer_ponds)
if (tr_pond_topo) then if (tr_pond_topo .and. ktherm >= 0) then
call compute_ponds_topo(dt, ncat, nilyr, & call compute_ponds_topo(dt, ncat, nilyr, &
ktherm, heat_capacity, & ktherm, heat_capacity, &
aice, aicen, & aice, aicen, &
Expand Down
6 changes: 5 additions & 1 deletion configuration/driver/icedrv_RunMod.F90
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -102,6 +102,7 @@ subroutine ice_step
use icedrv_flux, only: init_history_therm, init_history_bgc, & use icedrv_flux, only: init_history_therm, init_history_bgc, &
daidtt, daidtd, dvidtt, dvidtd, dagedtt, dagedtd, init_history_dyn daidtt, daidtd, dvidtt, dvidtd, dagedtt, dagedtd, init_history_dyn
use icedrv_history, only: history_cdf, history_write use icedrv_history, only: history_cdf, history_write
use icepack_parameters, only: ktherm
use icedrv_restart, only: dumpfile, final_restart use icedrv_restart, only: dumpfile, final_restart
use icedrv_restart_bgc, only: write_restart_bgc use icedrv_restart_bgc, only: write_restart_bgc
use icedrv_step, only: prep_radiation, step_therm1, step_therm2, & use icedrv_step, only: prep_radiation, step_therm1, step_therm2, &
Expand Down Expand Up @@ -148,7 +149,7 @@ subroutine ice_step
! Scale radiation fields ! Scale radiation fields
!----------------------------------------------------------------- !-----------------------------------------------------------------


if (calc_Tsfc) call prep_radiation () if (calc_Tsfc .and. ktherm >= 0) call prep_radiation ()


! call icedrv_diagnostics_debug ('post prep_radiation') ! call icedrv_diagnostics_debug ('post prep_radiation')


Expand All @@ -157,8 +158,10 @@ subroutine ice_step
!----------------------------------------------------------------- !-----------------------------------------------------------------


call step_therm1 (dt) ! vertical thermodynamics call step_therm1 (dt) ! vertical thermodynamics
if (ktherm >= 0) then
call biogeochemistry (dt) ! biogeochemistry call biogeochemistry (dt) ! biogeochemistry
call step_therm2 (dt) ! ice thickness distribution thermo call step_therm2 (dt) ! ice thickness distribution thermo
endif


! clean up, update tendency diagnostics ! clean up, update tendency diagnostics
offset = dt offset = dt
Expand Down Expand Up @@ -204,6 +207,7 @@ subroutine ice_step
! albedo, shortwave radiation ! albedo, shortwave radiation
!----------------------------------------------------------------- !-----------------------------------------------------------------


if (ktherm >= 0) &
call step_radiation (dt) call step_radiation (dt)


!----------------------------------------------------------------- !-----------------------------------------------------------------
Expand Down