Skip to content

Commit

Permalink
Merge branch 'peterdschwartz/lnd/add-endwb-restart-to-maint' (PR #6206)
Browse files Browse the repository at this point in the history
Add endwb to ELM restart file in maint-2.0.

[BFB]
Fixes #6195
  • Loading branch information
rljacob authored Feb 13, 2024
2 parents b583f7d + 5a3fe89 commit d2ec49b
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 2 deletions.
2 changes: 1 addition & 1 deletion cime_config/testmods_dirs/allactive/wcprodssp/user_nl_elm
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
! fsurdat used is not the same file for the reference historical run (as recorded in elm.r's global attribute)

CHECK_FINIDAT_FSURDAT_CONSISTENCY = .false.

finidat = "$DIN_LOC_ROOT/e3sm_init/V2.SSP370_SSP585.ne30pg2_EC30to60E2r2/v2.LR.historical_0101/2015-01-01-00000/v2.LR.historical_0101.elm.r.noNaN.2015-01-01-00000.nc"
hist_dov2xy = .true.,.true.
hist_fincl2 = 'H2OSNO', 'FSNO', 'QRUNOFF', 'QSNOMELT', 'FSNO_EFF', 'SNORDSL', 'SNOW', 'FSDS', 'FSR', 'FLDS', 'FIRE', 'FIRA'
hist_mfilt = 1,365
Expand Down
9 changes: 8 additions & 1 deletion components/elm/src/data_types/ColumnDataType.F90
Original file line number Diff line number Diff line change
Expand Up @@ -1698,7 +1698,7 @@ subroutine col_ws_restart(this, bounds, ncid, flag, watsat_input)
! Read/Write column water state information to/from restart file.
!
! !USES:
use elm_varctl, only : use_lake_wat_storage
use elm_varctl, only : use_lake_wat_storage, do_budgets
!
! !ARGUMENTS:
class(column_water_state) :: this
Expand All @@ -1723,6 +1723,13 @@ subroutine col_ws_restart(this, bounds, ncid, flag, watsat_input)
this%h2osfc(bounds%begc:bounds%endc) = 0.0_r8
end if

if(do_budgets) then
call restartvar(ncid=ncid, flag=flag, varname='ENDWB', xtype=ncd_double, &
dim1name='column', &
long_name='water balance at end of timestep', units='kg/m2', &
interpinic_flag='interp', readvar=readvar, data=this%endwb)
end if

call restartvar(ncid=ncid, flag=flag, varname='H2OSOI_LIQ', xtype=ncd_double, &
dim1name='column', dim2name='levtot', switchdim=.true., &
long_name='liquid water', units='kg/m2', &
Expand Down

0 comments on commit d2ec49b

Please sign in to comment.