Skip to content

Commit

Permalink
Avoid dynamic landunit adjustments for glacier in first timestep
Browse files Browse the repository at this point in the history
Always avoid generating dynamic landunit adjustments for glacier area
changes in the first timestep of a startup or hybrid run - not just for
cold start or interpolated start. See discussion in
ESCOMP#340 for rationale.

Fixes ESCOMP#340
  • Loading branch information
billsacks committed Aug 5, 2018
1 parent e33bbc9 commit bd40dc3
Showing 1 changed file with 14 additions and 11 deletions.
25 changes: 14 additions & 11 deletions src/main/clm_driver.F90
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ module clm_driver
use clm_varctl , only : wrtdia, iulog, use_fates
use clm_varctl , only : use_cn, use_lch4, use_noio, use_c13, use_c14
use clm_varctl , only : use_crop, ndep_from_cpl
use clm_varctl , only : is_cold_start, is_interpolated_start
use clm_time_manager , only : get_nstep, is_beg_curr_day
use clm_time_manager , only : get_prev_date, is_first_step
use clm_varpar , only : nlevsno, nlevgrnd
Expand Down Expand Up @@ -166,14 +165,19 @@ subroutine clm_drv(doalb, nextsw_cday, declinp1, declin, rstwr, nlend, rdate, ro
nclumps = get_proc_clumps()

! ========================================================================
! In the first time step of a run that used cold start or init_interp, glacier areas
! will start at whatever is specified on the surface dataset, because coupling fields
! from GLC aren't received until the run loop. Thus, CLM will see a potentially large,
! fictitious glacier area change in the first time step after cold start or
! init_interp. We don't want this fictitious area change to result in any state or
! flux adjustments. Thus, we apply this area change here, at the start of the driver
! loop, so that in dynSubgrid_driver, it will look like there is no glacier area
! change in the first time step.
! In the first time step of a startup or hybrid run, we want to update CLM's glacier
! areas to match those given by GLC. This is because, in initialization, we do not yet
! know GLC's glacier areas, so CLM's glacier areas are based on the surface dataset
! (for a cold start or init_interp run) or the initial conditions file (in a
! non-init_interp, non-cold start run) - which may not match GLC's glacier areas for
! this configuration. (Coupling fields from GLC aren't received until the run loop.)
! Thus, CLM will see a potentially large, fictitious glacier area change in the first
! time step. We don't want this fictitious area change to result in any state or flux
! adjustments. Thus, we apply this area change here, at the start of the driver loop,
! so that in dynSubgrid_driver, it will look like there is no glacier area change in
! the first time step. (See
! https://github.com/ESCOMP/ctsm/issues/340#issuecomment-410483131 for more
! discussion on this.)
!
! This needs to happen very early in the run loop, before any balance checks are
! initialized, because - by design - this doesn't conserve mass at the grid cell
Expand All @@ -197,8 +201,7 @@ subroutine clm_drv(doalb, nextsw_cday, declinp1, declin, rstwr, nlend, rdate, ro
! are passed to CLM in initialization, then this code block can be removed.
! ========================================================================

need_glacier_initialization = (is_first_step() .and. &
(is_cold_start .or. is_interpolated_start))
need_glacier_initialization = is_first_step()

if (need_glacier_initialization) then
!$OMP PARALLEL DO PRIVATE (nc, bounds_clump)
Expand Down

0 comments on commit bd40dc3

Please sign in to comment.