Package: cmmpy
READMEThis is the README file for a collection of Python scripts that implement
the Comparison Model Method (CMM,[1],[2],[3]and[4]).For more details about the tests and the methodology, please see the
manuscript “Improving the robustness of the Comparison Model Method
for the identification of hydraulic transmissivities” by A.Comunian
and M.Giudici (submitted toComputers & Geosciences).PurposeThis is a python implementation of the Comparison Model Method (CMM),
a direct method to solve inverse problems in hydrogeology, and in
particular to compute the hydraulic conductivityTof a confined
aquifer given an initial tentative value ofTand one or more
interpolated hydraulic head fieldsh.  This implementation of the
CMM heavily relies on the USGS engines of theModflowfamily (andModflow6in particular) to solve the forward problem, facilitated by the use of
the Python moduleflopy. Nevertheless,
it can be adapted to make use of other engines for the solution of the
forward problem.InstallationRequirementsIn addition to the common Python modulesnumpy,scipyandmatplotlib, this codes requires a recent version offlopy.NoteYou should adapt the name of theModflow6executable name
defined in the JSON configuration file (variableexe_name) provided for the
corresponding test case. For a general example, have a look at the
filecmmpy/test/template/test.json.Download and installThe suggested way is to usepip(which should be also already
available withAnaconda).cmmpyis available at thePython Package Index repository. Therefore, in can be easily
installed (together with its dependencies) with the command:pip install cmmpyAlternatively, if you prefer to download the sources fromhttps://bitbucket.org/alecomunian/cmmpy, you can:Clone or download this repository on your hard drive.If required, unpack it andcd cmmpy.Inside the project directory, from the command line:pip install -e .To check if it worked, open a Python terminal and try:import cmmpyRun the testsMove into the folderŧest.Then, from the shell, use the scriptrun_cmm.pyto run the
corresponding test by providing the name of the JSON parameter file
as unique input argument, like for example:./run_cmm.py template/test.jsonThis should create (in the folder defined by thewdirvariable in the JSON parameter file)
all the output of the selected test.If you want to run multiple test, have a look at the scriptrun_all.py.ContactsThis code was developed by theHydroGeophysics
Lab.of the University of
Milan.  Please do not hesitate to contact us should you require more
information or interested in contributing.References[1]Scarascia, S. and Ponzini, G., “An approximate solution of the
inverse problem in hydraulics” in L’Energia Elettrica (1972),
pp 518–531, Volume 49[2]Ponzini, G. and Crosta, G., “The comparison model method: A new
arithmetic approach to the discrete inverse problem of
groundwater hydrology”, Transport in Porous Media, DOI:10.1007/BF00233178[3]Ponzini, G. and Crosta, G. and Giudici, M. “Identification of
thermal conductivities by temperature gradient profiles;
one-dimensional steady flow”, Geophysics, DOI:10.1190/1.1442691[4]Ponzini, G. and Lozej, A., “Identification of aquifer
transmissivities: The comparison model method”, Water Resources
Research, DOI:10.1029/WR018i003p00597