pyopmnearwell.core.pyopmnearwell module#
Command-line entry point and top-level workflow coordination for pyopmnearwell.
pyopmnearwell supports two connected workflows for near-well OPM Flow models:
Deck generation creates model-specific OPM Flow input and include files from a validated TOML configuration.
Simulation execution runs OPM Flow for the generated deck, either in separate preprocessing and output folders or in a shared folder.
This module parses and validates command-line arguments, initializes the shared configuration dictionary, creates output folders, dispatches the selected deck and simulation workflows, and reports generated files. Configuration handling, deck writing, and simulation execution are implemented in the utility modules.
- main(argv=None)[source]#
Run the pyopmnearwell command-line workflow.
Parse and validate CLI arguments, initialize the shared configuration, create the requested output folders, and dispatch deck generation and OPM Flow execution according to the selected mode.
- load_parser(argv)[source]#
Create the CLI parser and parse pyopmnearwell arguments.
- check_cmdargs(cmdargs)[source]#
Validate pyopmnearwell command-line arguments.
Validation covers the input configuration filename and the output directory.
- Parameters:
cmdargs (argparse.Namespace) -- Parsed command-line arguments.
- Raises:
SystemExit -- If the input filename is empty, does not use the
.tomlextension, or the output directory is empty.- Return type:
None