EcoExtreML / STEMMUS_SCOPE

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

Attempt v.0.2 to modify STEMMUS_SCOPE for MODFLOW coupling #220

Closed MostafaGomaa93 closed 3 months ago

MostafaGomaa93 commented 7 months ago

Hi @SarahAlidoost, @BSchilperoort, @yijianzeng

Here are the modifications made after our last meeting

  1. The function readGroundwaterSettings

    • The name of the function readModflowConfigs.m is changed to readGroundwaterSettings.
    • The dependency of a new config file (e.g. Modflow_config) is removed. Now, the Groundwater coupling will be activated through BMI (as suggested by @BSchilperoort).
    • Also, the name of the coupling variable is changed from ModflowCoupling to GroundwaterCoupling (as suggested by Bart).
    • Currently, the function includes 3 variables (GroundwaterCoupling, headBotmlayer, IndexBotmlayer).
  2. The 3 variables (GroundwaterCoupling, headBotmlayer, IndexBotmlayer) are introduced to the main script at two locations:

    • At initialization (lines 248-252)
    • At model update (lines 336-338) Please let me know if the suggested locations are fine or if we need to shift them elsewhere.
  3. Changes in the setBoundaryCondition (lines 63-66). The changes are mainly if the GroundwaterCoupling is activated, so the NBChB is changed to = 1

  4. Changes in the calculateBoundaryCondition The changes are in lines (18-20) and lines (32-48) for the GroundwaterCoupling

  5. Changes in the solveSoilmoistureBalance (as suggested by Sarah). The changes are:

    • In the input to the function (added two new variables headBotmlayer and indexBotmlayer)
    • At lines (28-30)
    • I am still hesitant about why we need to introduce the headBotmlayer and indexBotmlayer in the solveSoilmoistureBalance function. The function already calls the calculateBoundaryCondition function (line 32) where these two variables are already introduced. Is that due to a BMI purpose? Note that I ran the model with and without this change (adding two variables to the calculateBoundaryCondition function) and no difference in results was detected.
  6. Changes in the STEMMUS_SCOPE_exe I added 4 new variables (lines 28-31) to be exposed to the BMI