Skip to content

Python API

Arc(mifn: str = '', args: dict | None = None, quiet: bool = False, processes: int | Literal['auto'] = 1)

High-level ARC runner.

This class provides a lightweight interface for running ARC from Python and is used by the arc console script.

Initialize an Arc instance.

Parameters:

Name Type Description Default
mifn str

Path to an ARC model input file (MIF).

''
args dict or None

Dictionary of key-value pairs corresponding to ARC input-file arguments. Will only be used if mifn is not provided.

None
quiet bool

If True, suppress progress bars and non-error log output.

False
processes int or {'auto'}

Number of worker processes for the per-stream-cell computation. Use "auto" to select serial vs. parallel based on domain size.

1

Returns:

Type Description
None

run()

Run ARC.

Returns:

Type Description
None

Outputs are written to disk based on input-file arguments.

set_log_level(log_level: str) -> 'Arc'

Set ARC's logging verbosity.

Parameters:

Name Type Description Default
log_level ('debug', 'info', 'warn', 'error')

Desired log level.

"debug"

Returns:

Type Description
Arc

Self, for chaining.