Skip to content
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

fix(gwf-lak): fix and test lakes set to inactive #1678

Merged
merged 4 commits into from
Apr 19, 2024

Conversation

langevin-usgs
Copy link
Contributor

@langevin-usgs langevin-usgs commented Mar 17, 2024

As mentioned in #1674 setting lake status to inactive does not seem to work properly. The intent of this PR is to fix this issue and test to make sure that when a lake is inactive that all output is set as intended.

The stage table written to the listing file will now look like the following when the lake is inactive:

 LAK PACKAGE (LAK_0) STAGES FOR EACH CONTROL VOLUME   PERIOD      2   STEP        1
 -----------------------------------------------------------------------------------
 NAME                   NUMBER      STAGE     SURFACE AREA WETTED AREA     VOLUME   
 -----------------------------------------------------------------------------------
 LAKE1                    1       1.00000E+30  1.00000E+30  1.00000E+30  1.00000E+30
 -----------------------------------------------------------------------------------

Couple of things to note:

  • The last stage value remains in memory when a lake is inactivated, and it seems like this in-memory stage is used as the initial stage when a lake is turned back on. Not sure if we want to do anything about this, but there is some question as to what we should do with the lake storage term.
  • The qleak variable can probably be eliminated as it is simply equal to -simvals. Qleak wasn't being reset to zero when a lake was inactivated.
  • It looks like we were still solving for lake stage even if a lake was inactive. I added the logic to skip out of the solve loop when a lake was inactive.
  • I removed the old lak_cfupdate remnant as it seems like it is time for this to go.
  • SFR has been updated to make sure inactive reaches work properly. We should also test MAW.
  • We should add a test for these inactive features and make sure they work properly with transport.

@langevin-usgs langevin-usgs marked this pull request as draft March 17, 2024 19:37
@langevin-usgs
Copy link
Contributor Author

Now that #1729 has gone in, the format of the lake dependent variable table has changed to:

 LAK PACKAGE (LAK_0) STAGES FOR EACH CONTROL VOLUME   PERIOD      2   STEP        1
 -----------------------------------------------------------------------------------
 NAME                   NUMBER      STAGE     SURFACE AREA WETTED AREA     VOLUME   
 -----------------------------------------------------------------------------------
 LAKE1                    1        INACTIVE     INACTIVE     INACTIVE     INACTIVE  
 -----------------------------------------------------------------------------------

The budget table shows no flows for period 2 when the lake is inactive

 LAK_0 PACKAGE - SUMMARY OF FLOWS FOR EACH CONTROL VOLUME   PERIOD      2   STEP        1
 ---------------------------------------------------------------------------------------------------------------------------------------------------------
                                                                                                                                                PERCENT   
   NUMBER       GWF        RAINFALL   EVAPORATION     RUNOFF     EXT INFLOW   WITHDRAWAL  EXT OUTFLOW    STORAGE      CONSTANT     IN - OUT    DIFFERENCE 
 ---------------------------------------------------------------------------------------------------------------------------------------------------------
     1       0.0000       0.0000       0.0000       0.0000       0.0000       0.0000       0.0000       0.0000       0.0000       0.0000       0.0000     
 ---------------------------------------------------------------------------------------------------------------------------------------------------------

@langevin-usgs langevin-usgs marked this pull request as ready for review April 19, 2024 19:05
@langevin-usgs langevin-usgs merged commit 82f34c9 into MODFLOW-USGS:develop Apr 19, 2024
17 checks passed
@langevin-usgs langevin-usgs deleted the fix-lak-status branch April 22, 2024 12:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

STATUS INACTIVE in LAK package doesn't seem to work
2 participants