Quickstart#

A quick and dirty guide to using the CSAM codebase

Requirements#

To run the code, make sure the following packages are installed, preferably in a virtual environment.

Cartopy==0.21.1
h5py==3.9.0
ipython==8.12.3
matplotlib==3.7.2
netCDF4==1.6.5
noise==1.2.2
numba==0.57.1
numpy==1.24.3
pandas==2.0.3
scikit_learn==1.3.0
scipy==1.12.0

Note

The Sphinx dependencies can be found in docs/conf.py.

Overview#

The CSAM codebase is structured modularly, see Fig. 1 for a graphical overview.

The package wrappers provides interfaces to the core code components in src and vis. For example, it defines the First and Second Approximation steps in the CSAM algorithm and applies the tapering of the physical data. Refer to the APIs for more details.

Helper functions and data structures are provided for the processing of user-defined topographies (src.var.topo), grids (src.var.grid), and input parameters (src.var.params).

These building blocks are the assembled for different kinds of experiments in the user-defined run scripts. Some examples can be found in the subpackage runs.

CSAM program structure

Fig. 1 CSAM program structure#

A first run#

To reproduce the coarse grid study (Coarse Delaunay triangulation (approximately R2B4) in the manuscript):

  1. Make the changes in the user-defined input file, inputs.lam_run. Specifically, enable the switch:

run_case = "R2B4"
  1. Make sure to import the correct user-defined input file. Then execute the run script runs.delaunay_runs:

python3 ./runs/delaunay_runs.py

Alternatively, the run script could be executed via ipython.

Note

The development of the CSAM codebase frontend is currently ongoing. The current design approach of the program structure aims to simplify debugging and diagnostics using an ipython environment.