Settings reference#
Fortran TRACMASS reads its run options from a namelist (namelist.in),
split into groups such as INIT_GRID_TIME, INIT_SEEDING and
INIT_KILLZONES. TRACMASS-JAX reads them from TOML settings files through
tracmass.settings, a Dynaconf object. This
page lists every key, grouped the way the namelist is, and ends with a
namelist-to-settings map.
Every setting is optional. The value of an argument passed to
tracmass.run or to an integrator always wins over the setting of the same
name.
Settings files#
tracmass.settings merges these files, later ones winning:
/etc/tracmass/tracmass.tomland/etc/tracmass/.secrets.toml~/.config/tracmass/tracmass.tomland.secrets.toml./tracmass.tomland./.secrets.tomlin the current directoryevery
trm_*.tomlin the current directory, sorted by file namethe file named by the environment variable
SEAVIEW_SETTINGS_FILE_FOR_DYNACONF, if set
The trm_*.toml files let a script carry its own run settings (for example
trm_omi.toml with an [omi] table) next to a shared tracmass.toml,
without editing the shared file.
Environments#
Each top-level table is an environment. [default] applies to all of them,
and the active environment’s values override it:
[default]
base_output_dir = "/data/raid/trm/"
runmonitor_backend = "rich"
n_particle_batches = 8
[omi]
dtm_start = "2010-06-01"
runtime = "180D"
move_vertically = false
output_name = "trm_omi"
[omi.gcm]
name = "glorys"
subset = { i1 = 2600, i2 = 3700, j1 = 500, j2 = 1600, k1 = 1, k2 = 2 }
[omi.seed]
approach = "ijk"
i_sub_num = 4
j_sub_num = 4
box = { i1 = 2610, i2 = 2620, j1 = 510, j2 = 520, k1 = 1, k2 = 1 }
Activate an environment with tracmass.run(env="omi") or
tracmass.settings.setenv("omi"). Values can also be set from the shell
with the SEAVIEW_ prefix, e.g. SEAVIEW_VERBOSE=true.
Grid and GCM — [env.gcm]#
Fortran: INIT_GRID_DESCRIPTION, INIT_GRID_SIZE, INIT_GRID_SUBDOMAIN.
Key |
Type |
Default |
Description |
|---|---|---|---|
|
str |
— |
Adapter in |
|
int |
none |
0-based slice limits on the model x axis (TRACMASS cells, halo removed). |
|
int |
none |
0-based slice limits on the model y axis. |
|
int |
none |
1-based levels to keep ( |
|
int |
none |
Optional strides. Positions are then in strided-cell units. |
Omitted subset keys, or keys set to "@none", mean “no limit on that
edge”. A subset in x turns off zonal periodicity (iperio = 0). See
Subsets.
Grid sizes (imt, jmt, km), periodicity (iperio, jperio), cell
areas and thicknesses are not settings. The adapter returns them with the
fluxes.
Run time — start, end, direction#
Fortran: INIT_START_DATE, INIT_RUN_TIME, INIT_GRID_TIME.
Key |
Type |
Default |
Description |
|---|---|---|---|
|
date string |
adapter default |
First snapshot of the run. |
|
date string |
— |
Last time of the run. Earlier than |
|
Timedelta string |
— |
Used when |
The GCM output interval (Fortran ngcm_step, ngcm_unit) comes from the
adapter (grid.timestep). The number of windows is
ceil(|dtm_end - dtm_start| / timestep). Without dtm_end a run is one
window.
Integration#
Fortran: INIT_GRID_TIME (iter), INIT_KILLZONES (timax), Makefile
options (w_explicit, time_analytical).
Key |
Type |
Default |
Description |
|---|---|---|---|
|
str |
|
|
|
bool |
|
|
|
int |
|
Split the particles into this many groups, one compiled loop per group, to cap GPU memory. Used by |
|
str |
no limit |
Stop each particle this long after its own release: |
These options have no setting and are passed as arguments, either to the
integrator or through tracmass.run(..., iter_sub=4):
Argument |
Default |
Description |
|---|---|---|
|
|
Sub-steps per GCM window (Fortran |
|
|
|
|
|
Cap on the total number of sub-cycles. |
|
|
Cap per window. Particles still running then stop with reason |
|
|
How strictly slow particles are stopped (reason |
|
|
|
|
|
|
|
no limit |
The same as |
Seeding — [env.seed]#
Fortran: INIT_SEEDING.
Key |
Type |
Default |
Description |
|---|---|---|---|
|
str |
|
|
|
table |
— |
|
|
float |
— |
|
|
path |
— |
|
|
int |
|
Level for 2-D seeding when no |
|
bool |
|
|
|
str |
|
How particles are placed inside a cell: |
|
int |
|
Particles per cell in each direction for |
|
pandas frequency |
— |
Release the particles again every |
See Seeding.
Output and recording#
Fortran: INIT_WRITE_TRAJ.
Key |
Type |
Default |
Description |
|---|---|---|---|
|
str |
— |
File-name stem. Setting it turns on automatic recording. |
|
bool |
|
Turn on automatic recording with the stem |
|
path |
current dir |
Directory for the trajectory files. |
|
bool |
|
Write to |
|
int |
|
Save positions more often during the first windows. |
|
int |
|
Saves per window during ramp-up. |
The file name is
{base_output_dir}[/{sub folder}]/{stem}_{forward|reverse}_{dtm_start}.parquet.
With neither output_name nor auto_record, nothing is written unless you
pass recorder=. See Output.
Monitoring and logging#
Fortran: log_level.
Key |
Type |
Default |
Description |
|---|---|---|---|
|
str |
|
|
|
bool |
|
Time-stamped debug output for every stage of a run. |
Data sources (process-wide)#
The tracmass.seagrid modules, which read the reanalysis data, keep their
own module-level settings dict rather than reading tracmass.toml:
Key |
Default |
Description |
|---|---|---|
|
|
Local cache root: |
|
per adapter |
Dataset name, part of the cache path |
|
per adapter |
Remote server (OPeNDAP / THREDDS / HTTPS) |
|
|
Native output interval of the dataset |
from tracmass.seagrid import glorys
glorys.settings["disk"] = "scratch" # read /data/scratch/mercator/...
Changing these affects every run in the Python process.
Namelist-to-settings map#
Namelist group |
Fortran variable |
TRACMASS-JAX |
|---|---|---|
|
|
The GCM adapter ( |
|
|
Returned by the adapter’s |
|
|
|
|
|
Adapter timestep ( |
|
|
|
|
|
|
|
not needed: dates are |
|
|
|
|
|
not supported |
|
|
|
|
|
|
positions every window; |
|
|
|
|
not needed: Parquet with timestamps, compressed |
|
|
|
|
|
|
|
|
|
|
|
not needed: particles are seeded at cell centres or sub-grid points; direction from |
|
|
direction from the order of |
|
|
|
|
|
|
|
|
not yet; particles stop at domain edges and land |
|
|
not yet |
|
|
|
not yet |
|
|
not yet (analyse the Parquet output instead) |
|
|
not yet |
Makefile |
two-dimensional trajectories |
|
Makefile |
time-analytical scheme |
|