Skip to content

Commit

Permalink
Merge branch 'bishtgautam/lnd/tcs-fix' into next (PR #6273)
Browse files Browse the repository at this point in the history
The TCS_MONTH_BEGIN variable is written and read from the ELM restart file.

[BFB]
  • Loading branch information
rljacob committed Mar 1, 2024
2 parents 3c4fa6f + e9ba2e6 commit 7850f9a
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
2 changes: 1 addition & 1 deletion components/elm/src/biogeochem/CNPBudgetMod.F90
Original file line number Diff line number Diff line change
Expand Up @@ -1200,7 +1200,7 @@ subroutine CBudget_SetEndingMonthlyStates(bounds, col_cs, grc_cs)
associate( &
begcb => col_cs%begcb , & ! Input : [real(r8) (:) ] carbon mass begining of the time step
endcb => col_cs%endcb , & ! Input : [real(r8) (:) ] carbon mass begining of the time step
tcs_month_end_grc => grc_cs%tcs_month_beg & ! Output: [real(r8) (:) ] grid-level carbon mass at the begining of a month
tcs_month_end_grc => grc_cs%tcs_month_end & ! Output: [real(r8) (:) ] grid-level carbon mass at the ending of a month
)

! Get current and previous dates to determine if a new month started
Expand Down
4 changes: 4 additions & 0 deletions components/elm/src/main/restFileMod.F90
Original file line number Diff line number Diff line change
Expand Up @@ -404,6 +404,8 @@ subroutine restFile_write( bounds, file, &
call veg_ps%Restart(bounds, ncid, flag='write')
call veg_pf%Restart(bounds, ncid, flag='write')
call crop_vars%Restart(bounds, ncid, flag='write')

call grc_cs%Restart(bounds, ncid, flag='write')
end if


Expand Down Expand Up @@ -627,6 +629,8 @@ subroutine restFile_read( bounds, file, &
call veg_ps%Restart(bounds, ncid, flag='read')
call veg_pf%Restart(bounds, ncid, flag='read')
call crop_vars%Restart(bounds, ncid, flag='read')

call grc_cs%Restart(bounds, ncid, flag='read')
end if

if (use_fates) then
Expand Down

0 comments on commit 7850f9a

Please sign in to comment.