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

Adding Modpath7Sim for second time replaces, but does not trigger 'replace' warning #1817

Closed
mbakker7 opened this issue Jun 7, 2023 · 1 comment · Fixed by #1964
Closed
Assignees
Labels
Milestone

Comments

@mbakker7
Copy link
Contributor

mbakker7 commented Jun 7, 2023

In MP7, when a second Modpath7Sim object is added to an MP model, the first one is replaced, but flopy does not give the common WARNING: Package with type XX already exists. Replacing existing package.
This may be useful, especially in this case, as adding several Modpath7Sim to the same model would actually be useful. So it is important to know that is not possible (right now) and that the new Modpath7Sim replaces the old one.

@wpbonelli
Copy link
Member

wpbonelli commented Jun 8, 2023

I think this is a result of different verbosity defaults for mf2005 vs mf6 model base classes. With verbose=True on the Modpath7 instance I get this output from a test run with a duplicated Modpath7Sim (see warning at bottom)

$ python test.py
writing simulation...
  writing simulation name file...
  writing simulation tdis package...
  writing solution package ims...
  writing model ex01_mf6...
    writing model name file...
    writing package dis...
    writing package ic...
    writing package npf...
    writing package rcha_0...
    writing package wel_0...
    writing package riv_0...
INFORMATION: maxbound in ('gwf6', 'riv', 'dimensions') changed to 21 based on size of stress_period_data
    writing package oc...
FloPy is using the following executable to run the model: ../../../../venv/bin/mf6
                                   MODFLOW 6
                U.S. GEOLOGICAL SURVEY MODULAR HYDROLOGIC MODEL
                        VERSION 6.4.1 Release 12/09/2022

   MODFLOW 6 compiled Apr 12 2023 19:02:02 with Intel(R) Fortran Intel(R) 64
   Compiler Classic for applications running on Intel(R) 64, Version 2021.7.0
                             Build 20220726_000000

This software has been approved for release by the U.S. Geological 
Survey (USGS). Although the software has been subjected to rigorous 
review, the USGS reserves the right to update the software as needed 
pursuant to further analysis and review. No warranty, expressed or 
implied, is made by the USGS or the U.S. Government as to the 
functionality of the software and related material nor shall the 
fact of release constitute any such warranty. Furthermore, the 
software is released on condition that neither the USGS nor the U.S. 
Government shall be held liable for any damages resulting from its 
authorized or unauthorized use. Also refer to the USGS Water 
Resources Software User Rights Notice for complete use, copyright, 
and distribution information.

 
 Run start date and time (yyyy/mm/dd hh:mm:ss): 2023/06/08 12:16:05
 
 Writing simulation list file: mfsim.lst
 Using Simulation name file: mfsim.nam
 
    Solving:  Stress period:     1    Time step:     1
 
 Run end date and time (yyyy/mm/dd hh:mm:ss): 2023/06/08 12:16:06
 Elapsed run time:  0.087 Seconds
 
 Normal termination of simulation.
adding Package:  MPBAS
adding Package:  MPSIM

WARNING:
    Two packages of the same type, Replacing existing 'MPSIM' package.

@wpbonelli wpbonelli added this to the 3.4.3 milestone Sep 26, 2023
wpbonelli added a commit that referenced this issue Sep 26, 2023
* consistent with MFSimulation verbosity defaults
* use category=UserWarning for mbase.py warnings
* closes #1817
wpbonelli added a commit that referenced this issue Sep 30, 2023
* consistent with MFSimulation verbosity defaults
* use category=UserWarning for mbase.py warnings
* closes #1817
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants