cesm_hawc.cli¶
The cesm-hawc command-line interface.
cesm-hawc save-inputs --config config.toml --mode {fixed,orbit}
cesm-hawc run --config config.toml --mode {fixed,orbit}Every run processes one model case ([case] in the config) and writes
under out_dir/<case name>/.
fixed: one column at a fixed tangent point and solar geometry, once per history file matched by[case].orbit: observations sampled along a real HAWC orbit ground track and moved onto the case’s dates.
save-inputs only needs the base install (numpy/xarray/scipy) and saves
simulator-ready columns via cesm_hawc.save_inputs.save_column_inputs().
run needs the [sim] extra and runs the forward model, plus the L2
retrieval when run_l2 is set.
Worker functions dispatched to ProcessPoolExecutor (via
cesm_hawc.dispatch.run_jobs) are all module-level (not closures/lambdas)
since the default multiprocessing start method on macOS/Windows (spawn)
cannot pickle a nested function.
build_parser¶
def build_parser() -> argparse.ArgumentParserBuild the cesm-hawc argument parser.
Returns¶
argparse.ArgumentParser — Parser with the
save-inputsandrunsubcommands.
main¶
def main(argv: list[str] | None = None) -> NoneRun the cesm-hawc command.
Parameters¶
argv(list of str, optional) — Command-line arguments, without the program name. Default:sys.argv[1:].
Raises¶
SystemExit— On invalid arguments, a config error, or a missing[sim]extra forrun.