cathy_tools

Contents

cathy_tools#

Main class controlling the wrapper.

This class is managing three main components:

  1. Reading/writing inputs and output files

We used a generic formalation for the function’s names based on the CATHY files.

Example:#

In order to update the soil file:

update_soil(arguments)

In order to update the atmbc file:

update_atmbc(arguments)

Note that the name of the arguments are similar to the name of the variable to update In order to update the parm file with a new minimum time step DTMIN:

update_parm(DTMIN=1e3)

The update function is composed of three main actions:
  • Set the defaut parameters (it is actually not reading the input file to set the defaut parameters)

  • replace values by the new ones introduced via the function argument

  • write the new file (it overwrites the existing file)

Note also that updating an input file may affect the CATHY.H control file. When needed, the code takes care of updating values of the CATHY.H file retroactivelly.

Remenber to update all your prepo files before calling run_preprocessor(), and all you input files before calling run_processor()

  1. Compiling the fortran files

  2. Running executable

Once all the files were updated, the run_preprocessor() or run_processor() are taking care of recompiling the source files via bash cmd.

Functions

isfile(path)

Test whether a path is a regular file

join(a, *p)

Join two or more pathname components, inserting '/' as needed.

listdir([path])

Return a list containing the names of the files in the directory.

make_console(verbose)

Start up the rich.console.Console instance we'll use.

print(*objects[, sep, end, file, flush])

Print object(s) supplied via positional arguments.

subprocess_run_multi(pathexe_list)

Run multiple exe files in parallel.

Classes

CATHY([dirName, prj_name, notebook, ...])

Main CATHY object.

OrderedDict

Dictionary that remembers insertion order

Rbf(*args, **kwargs)

A class for radial basis function interpolation of functions from N-D scattered data to an M-D domain.

Repo(path, odbt, search_parent_directories, ...)

Represents a git repository and allows you to query references, create commit information, generate diffs, create and clone repositories, and query the log.