-
Notifications
You must be signed in to change notification settings - Fork 357
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
MOSART-sediment traps sediment in reservoirs before their build year #6309
Comments
@tanzeli1982 @hydrotian I could be wrong, but my impression is that MOSART_sediment was integrated before adding the dam_built_year capacity, i.e., when there was no specification of reservoir construction years. In any case, I can certainly give it a try and fix this issue. |
@liho745 I think you are right. |
I've fixed this bug on a branch created off the E3SM master. https://github.com/liho745/E3SM/tree/liho745/river/bug-fix-no-sed-trapping-before-dam-construction. I did not do it on a branch created off the commit introducing MOSART-sediment or dam construction flag, mainly because 1) this bug does not affect any water cycle of BGC cycle campaigns and 2) the MOSART_developer tests are not available on those commits two-year-old. MOSART_developer tests passed on Compy BFB. @hydrotian or @tanzeli1982 do you want to test the science of this bug fix before I issue a PR? |
@liho745, I and @hydrotian found that in riverroute/RtmMod.F90, MOSART_reservoir_sed_init() is called before MOSART restart file is read. As a result, when MOSART_reservoir_sed_init() is called, StorWater%active_stage is always zero. To avoid the issue, MOSART_reservoir_sed_init() should be moved downward in riverroute/RtmMod.F90. |
@liho745 @tanzeli1982 Another way is to add the |
@tanzeli1982 Nice thoughts. I am wondering whether this active_stage value will change during a simulation period which happens to include some dam construction year. In that case, this value should be checked and reset every model year, instead of being set once for all. |
@liho745 The active_stage calculates every month. So I was proposing adding the calculation to I optimistically think it should be fine as the sequence of the calculations would be |
Good thought. I agree that this flag needs to be checked every year. |
@hydrotian Overall, I agree with you. I am wondering whether you want to comment off Line 1914-1916 in the restart block. That restart block (Line 1976-1903) is supposed to be activated only once during the whole simulation. But Line 1914-1916 kind of forces WRM_computeRelease() to be called each time after initialization, hence overriding active_stage setting up during the initialization. |
I and @hydrotian found the issue described in the title. The following fix may work.
--- a/components/mosart/src/riverroute/MOSART_RES_type.F90
+++ b/components/mosart/src/riverroute/MOSART_RES_type.F90
@@ -22,7 +22,7 @@ module MOSART_RES_type
use shr_sys_mod , only : shr_sys_flush, shr_sys_abort
use netcdf
use pio
! !PUBLIC TYPES:
implicit none
@@ -124,7 +124,8 @@ module MOSART_RES_type
Tres_para%Eff_trapping = 0._r8
do iunit=begr,endr
damID = WRMUnit%INVicell(iunit)
@@ -226,4 +227,4 @@ module MOSART_RES_type
!-----------------------------------------------------------------------
The text was updated successfully, but these errors were encountered: