mf6rtm.io package
Submodules
mf6rtm.io.externalio module
externalio to write outputs and to write and read phreeqcrm inputs from layered txt files.
- class mf6rtm.io.externalio.Regenerator(wd='.', phinp='phinp.dat', yamlfile='mf6rtm.yaml', dllfile='libmf6.dll')
Bases:
objectA class to regenerate a Mup3d object from a script file.
- add_m0_to_config()
Add the loaded array data to the config dictionary. This method should be called after read_external_files().
- generate_equilibrium_phases_blocks()
Generate equilibrium phases blocks from the config.
- generate_exchange_phases_blocks()
Generate exchange blocks from the config.
- generate_kinetic_phases_blocks()
Generate kinetic phases blocks from the config.
- generate_new_script()
Generate a new script based on the existing script and configuration.
- get_postfix_block(script)
Extract the postfix block from the script.
- get_solution_blocks(script)
Extract solution blocks from the script.
- read_external_files()
Read the external files required for regeneration using numpy. Returns a dictionary with the loaded arrays organized by key, name, and layer.
- read_phinp()
- classmethod regenerate_from_external_files(wd='.', phinpfile='phinp.dat', yamlfile='mf6rtm.yaml', dllfile='libmf6.dll', prefix='_')
Class method to execute the regeneration process.
- update_yaml(filename='_mf6rtm.yaml')
Update the YAML file with the regenerated script and initial conditions.
- validate_external_files()
Validate the existence of external files required for regeneration.
- write_new_script(filename='_phinp.dat')
Write the regenerated script to a file.
- class mf6rtm.io.externalio.SelectedOutput(mf6rtm)
Bases:
object- write_ml_arrays(conc_array, iter, add_var_names=None, fname='_features.csv')
Write total transported component concentrations in mol/L (+ optional vars in mol/L) to CSV for Machine Learning arrays.
- Parameters:
conc_array (array-like) – Main concentrations (ncomps x nxyz).
add_var_names (list of str, optional) – Extra PHREEQC variables to include.
fname (str) – Output filename (relative to model wd).
- Return type:
None
Module contents
Main io module to write and read model files