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

large log file and empty lines for inactive cells #19

Open
tomvansteijn opened this issue Mar 8, 2019 · 2 comments
Open

large log file and empty lines for inactive cells #19

tomvansteijn opened this issue Mar 8, 2019 · 2 comments

Comments

@tomvansteijn
Copy link

tomvansteijn commented Mar 8, 2019

Modpath 7.2.001 writes a relatively large logfile containing the connection data for each cell in the model grid. Empty lines are written for each inactive cell. Since this is not very informative (at least for inactive cells) is it possible to make this optional?

For example to add a command line option --no-log to disable writing to a log file, or -no-log-connectivity to disable logging of the cell connection data specifically.

Writing the log file takes a relatively long time. This can be a bother especially when trying various settings for a small number of particles and a large model. Writing the log file takes in such cases more time than the actual particle tracking simulation.

Example of empty lines in the log file for inactive cells:

Get the name of the MODPATH simulation file.
Read the first two records of the simulation file to get mpnamFile and mplistFile ...
Allocate rectangular unstructured grid component.
Allocate time discretization data component ...
Allocate disMf6Grid.
Read DIS binary grid file.
Read time discretization data component ...
 
 ----------------------------------------------------------
 Cell connection data:
 ----------------------------------------------------------
 Format has two lines for each cell, listed by cell number.
 Line 1: Cell connections
 Line 1: Face assignment codes
 ----------------------------------------------------------


 


I use Modflow 6 in combination with Modpath.

@aprovost-usgs
Copy link
Collaborator

In response to the issues and suggestions submitted by @tomvansteijn, the following updates were made:
-- Blank lines are no longer written to the log file for excluded cells (cells with no connections).
-- Two command-line options have been introduced: option "-shortlog" skips output of cell connection data, typically resulting in a much shorter log file, and option "-nolog" cancels output to a log file altogether.

Some details to note:
-- Entry of the simulation file name on the command line is still optional, and if it is not entered on the command line, the user is still prompted for it by MODPATH. If the simulation file name is entered on the command line, it must be the first command-line argument, i.e., it must appear right after the mpath7 command. (To distinguish file names from options, a file name must not begin with a dash.)
-- Options may be listed in any order (but not before the simulation file name, if that is entered on the command line).
-- Neither the "-shortlog" nor the "-logname" option can be used together with the "-nolog" option. Also, multiple instances of the same option are not allowed.
-- The optional log file name (introduced in commit fdb3924 in response to issue #20) must now be preceded by the option indicator "-logname". The default name is still "mpath7.log".
-- Example: The following command line runs MODPATH 7 using simulation file "testrun.mpsim" and writes to log file "testrun.log", skipping output of cell connections:
mpath7 testrun.mpsim -logname testrun.log -shortlog

The updated source code has been posted (culminating in commit 20ae10c), and we're working on a USGS release that includes these updates.

@tomvansteijn
Copy link
Author

Happy to see that the issue is resolved. Many thanks!

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

No branches or pull requests

2 participants