EcoExtreML / STEMMUS_SCOPE

Integrated code of SCOPE and STEMMUS
GNU General Public License v3.0
14 stars 6 forks source link

Variables from STEMMUS_MODFLOW that needs to be included in STEMMUS_SCOPE for BMI purposes #212

Closed MostafaGomaa93 closed 3 months ago

MostafaGomaa93 commented 9 months ago

Hi @yijianzeng and @Lianyu-Yu

Looking at Lianyu code (branch "STEMMUS_MODFLOW_v1.0.0."), in the main script file "MainLoop11.m", lines 85->87, there are the "hBOT" and "IBOT" variables. Those variables are already calculated in a separate function "TIME_INTERPOLATION.m", then they are passed to the main script "MainLoop11.m" and in the boundary condition calculations at the h_BC.m file.

However, those variables are not in STEMMUS_SCOPE source code. As I understand, we need to include these variables in the source code to let STEMMUS receive info from MODFLOW, right? Could you please explain what do "hBOT" and "IBOT" mean?

MostafaGomaa93 commented 9 months ago

@Lianyu-Yu Could you please also explain the meaning of all variables of the "TIME_INTERPOLATION.m" function

T1, T0 ,IP ,BOT ,HPILLAR1N, HPILLAR0, T, DELT, X, NUMNP, Q3DF, ADAPTF

MostafaGomaa93 commented 9 months ago

@Lianyu-Yu Could you aslo please explain what is the functionality of the Diff_moisture_heat.m file?

example, what is the use of hBOT in this line?

Lianyu-Yu commented 9 months ago

Hi @yijianzeng and @Lianyu-Yu

Looking at Lianyu code (branch "STEMMUS_MODFLOW_v1.0.0."), in the main script file "MainLoop11.m", lines 85->87, there are the "hBOT" and "IBOT" variables. Those variables are already calculated in a separate function "TIME_INTERPOLATION.m", then they are passed to the main script "MainLoop11.m" and in the boundary condition calculations at the h_BC.m file.

However, those variables are not in STEMMUS_SCOPE source code. As I understand, we need to include these variables in the source code to let STEMMUS receive info from MODFLOW, right? Could you please explain what do "hBOT" and "IBOT" mean?

"hBOT" is the water head at the bottom soil layer; "IBOT" is the layer index where the current "bottom“ is. please see line 26 of the hBC.m file for how "hBOT" and "IBOT" are used.

Lianyu-Yu commented 9 months ago

@Lianyu-Yu Could you please also explain the meaning of all variables of the "TIME_INTERPOLATION.m" function

T1, T0 ,IP ,BOT ,HPILLAR1N, HPILLAR0, T, DELT, X, NUMNP, Q3DF, ADAPTF

T1, is the end of the current time step; T0, is the start of the current time step; IP, indicate the number of STEMMUS columns for MODFLOW; BOT, is the elevation of the bottom layer of MODFLOW; HPILLAR1N, water heads at the end of the current time step; HPILLAR0, water heads at the start of the current time step; T, is the end of the current time step; DELT, is the time interval of the current time step; X, is the layer thickness of STEMMUS soil layers; NUMNP, is the total soil layers in STEMMUS; Q3DF, indicator for the quasi-3d simulation =1, yes; =0, no; ADAPTF, indicator for the adaptive lower boundary setting, =1, the moving lower boundary scheme is used; =0, the fixed lower boundary scheme is used.

Lianyu-Yu commented 9 months ago

@Lianyu-Yu Could you aslo please explain what is the functionality of the Diff_moisture_heat.m file?

example, what is the use of hBOT in this line?

Diff_moisture_heat.m is to run the Richards' equation and to obtain the updated soil matric potential "hh". hBOT, is the bottom water head, which is used to setup the bottom boundary condition of STEMMUS, please see Line 26 in h_BC.m for how it is used.

MostafaGomaa93 commented 7 months ago

Hi @Lianyu-Yu

Could you please fill in the table with the meaning of the variables of the HYDRUS1RECHARGE

Variable in MainLoop00.m Variable in HYDRUS1RECHARGE Description
Ouput dMOD - Correction term for the recharging water flux
Ouput QQS - Cumulative water flux out of the moving domain
Ouput DW - Vadose zone water amount in the moving balance domain
Ouput RRrN RrNGG the upper boundary water flux at the current timestep
Ouput RrO RrOGG the upper boundary water flux at the old timestep
Ouput ZTB1 ZTB1G the soil layer thickness from the top soil surface to the phreatic surface at the end of time step
Input T1 TEND1/86400 time at the end of the timestep, not in use
Input T0 TTIME time at the start of the time step
Input ITERQ3D ITERQ3D indicator for the quasi-3d iteration simulation
Input IP IP0STm Number of the MODFLOW subzones (STEMMUS soil columns)
Input IGRID IGRID not in use
Input Q3DF Q3DF indicator for the quasi-3d simulation
Input THETA0 THETA0 soil water content at the start of the timestep
Input ICTRL0 ICTRL0 the index of soil layer where the phreatic surface is, at the start of the time step
Input THN STheta_LL soil water content at the end of the timestep
Input T TIME/86400 time step, not in use
Input QS QS cumulative water flux out of the moving domain
Input DT Delt_t/86400 time step, not in use
Input DELT TTEND time step
Input ZTB0 ZTB0G the soil layer thickness from the top soil surface to the phreatic surface at the start of time step
Input HNEW Shh soil matric potential at the end of time step
Input KPILLAR KPILLAR MODFLOW layer number corresponds to STEMMUS soil layers
Input BOT BOTm elevation of MODFLOW bottom
Input RrN RrNG the upper boundary water flux at the current timestep
Input SY SYSTG specific yield
Input SS SSSTG specific storage
Input X XElemnt cumulative soil layer thickness
Input KTN KTN number of MODFLOW timesteps
MostafaGomaa93 commented 7 months ago

Hi @Lianyu-Yu

Could you please explain the difference between the outputs of the functions FINDTABLE and TIME_INTERPLATION? I am still confused about the difference between the two functions

Function Varaiable Meaning
TIME_INTERPOALTION hBOT head of the bottom layer where below that layer is the groundwater zone
TIME_INTERPOALTION IBOT index of the soil layer that includes the groundwater head
FINDTABLE ZTB soil layer thickness from the top of the soil to the phreatic surface
FINDTABLE ICTRL the index of soil layer where the phreatic surface is
Lianyu-Yu commented 7 months ago

Hi @MostafaGomaa93 The explanation of "HYDRUS1RECHARGE.m" corresponds to the Appendix A in the file: https://doi.org/10.5194/gmd-2022-221, or the methodology part in this file: https://doi.org/10.5194/hess-23-637-2019. Hope it is helpful to you.