Configuration#

config.yaml is blocks, each a field of ProjectConfig:

mets:
  hrrr: /path/to/hrrr_arl
models:
  hysplit: {n_hours: -24, numpar: 200}
variants:
  hrrr: {}
  hrrr-long: {n_hours: -72}
execution:
  backend: local
output: output

mets names the meteorology (for HYSPLIT, MetConfig). models names the transport models, each block with that model’s settings (HysplitConfig for hysplit). stages names what is made from each simulation’s particles after the model runs, each block with the import path of its stage’s class and then the stage’s settings. A stage’s block is named for its stage, which is also the name of its folder in the output directory and of its column in project.status(). Without a stages block, a project makes particles only. variants says what runs, and execution where (ExecutionConfig). Each class lives next to the code that uses it (runtraj.execution.config, runtraj.models.hysplit).

No setting sits at the top level. One written there is refused with a message that names its block, such as 'n_hours' is a hysplit setting. Write it under models: hysplit:. A key may be written once in each block: YAML would keep the last of two, so runtraj refuses the file and names the line of the second. Each page below lists its fields with their defaults and is generated from the code.

A config runs code#

A class in a model’s or a stage’s block, and a transform’s kind, name a Python object by its import path. runtraj imports that module and calls the object, which is how a project uses a model or a stage from any installed package. runtraj does not check what the path names: any installed module is imported and any callable is called, even by runtraj check. So treat a config.yaml as you would a Python script, and run one only if you would run a script from the same person.

A service that runs configs other people send should not pass their YAML to runtraj. Build the ProjectConfig yourself from the fields you allow, with the import paths you choose.

Every key#

These tables are generated from the code, so they always match the installed version.

Top level#

The blocks, and where the results go.

Parameter

Description

Default

mets

Meteorology by name, such as hrrr: the folder of its files, or a mapping of its settings. At least one is required. Each is checked by the met config of the transport model that reads it (runtraj.models.hysplit.MetConfig for HYSPLIT).

{}

models

Transport models by name, each a block of its settings: the defaults of every variant that runs it. A block named hysplit is that built-in model. Any other model class gets a block of any name that gives its import path as class, such as class: mypkg.models.MyModel. A model has one block. Left out, the project runs HYSPLIT with its defaults.

{'hysplit': {}}

stages

What is made from each simulation’s results after the transport model runs, by name, each a block that gives the stage’s import path as class and then its settings. A block is named for its stage: PYSTILT’s footprint, for example, is the block footprint with class: stilt.footprint.FootprintStage. A stage runs for every variant, unless the variant sets it to null. Left out, the project makes particles only.

{}

variants

Variants by name, each a set of overrides of the defaults. A variant’s own keys are met (needed with several mets unless the variant has a met’s name), model (the name of its models block, needed with several), realizations (run N times, realization k with seed + k, as one ensemble), and stages (a stage’s settings to change, by the stage’s name, or null for a variant without it). Every other key is a setting of its model. Variants with the same transport settings share one transport model run and differ in what their stages make from it. At least one is required: hrrr: {} runs the defaults.

{}

execution

Where the releases run and with what resources, such as backend: slurm and its options.

ExecutionConfig(backend='local', local=LocalConfig(cpus=1, fetch=True), slurm=SlurmCo...

output

Directory the results go to, relative to the project directory unless absolute. A URL such as s3://bucket/output puts it on an object store. Several projects can name the same directory and share runs.

'output'

HYSPLIT#

The keys of the hysplit block under models:, the transport model’s settings (HYSPLIT Integration). They are the defaults of every variant that runs HYSPLIT, and a variant may override any of them by writing the key itself. Every key but n_hours has the default below, so a block may be as short as hysplit: {n_hours: -24}; n_hours has no default, and a config without it is refused. capemin, kblt, kmixd, krand and vscales are unset unless given: HYSPLIT chooses them when it runs.

Parameter

Description

Default

n_hours

Length of each simulation, in hours. Negative runs backward in time. It has no default: a config must say it.

Required

seed

Random seed for a reproducible run. Different seeds give different runs. Requires krand: 2. HYSPLIT 5.1.0 ignores the seed under krand 4 and 10 to 13, and under 1 uses it only for the initial turbulent velocity. Must be 0 or more: runtraj writes it to SETUP.CFG as -(seed + 1), because HYSPLIT reseeds its generator only from a negative value and gives every SEED of 0 or more the same stream, so a seed and its negative would give the same run. Realization k of a variant runs with seed + k, so realization 0 shares the unperturbed run’s seed.

None

mode

What HYSPLIT makes: particles, the particle table; concentration, grids of each pollutant’s concentration (grids and pollutants); or trajectory, the trajectory table, from HYSPLIT’s trajectory program hyts_std.

'particles'

pollutants

The pollutants of a concentration run, each released at every release location and counted on every grid. At least one in mode: concentration; none otherwise.

[]

grids

The grids of a concentration run. At least one in mode: concentration; none otherwise.

[]

conversions

The conversions of a concentration run with ichem: 2, each from one of pollutants to another. At least one with ichem: 2; none otherwise.

[]

ichem

HYSPLIT’s ICHEM, which in mode: concentration changes what a run counts: 0 concentration (the default); 1 a grid for each release location; 2 pollutants that convert (conversions); 5 deposition of whole particles by probability; 6 mass divided by air density; 9 a lowest level that follows the mixed layer; 10 a grid for each emission cycle (qcycle). The particles mode is ICHEM=8, the only value it takes, and a trajectory run reads none.

None

numpar

Number of particles released per simulation. More particles sample the turbulence better and take longer to run.

2500

directory

The HYSPLIT folder as unpacked: runtraj runs exec/hycs_std under it and reads the data tables (ASCDATA.CFG, LANDUSE.ASC, ROUGLEN.ASC, TERRAIN.ASC) from its bdyfiles/. Unset, the first hycs_std on PATH runs, with the tables of a bdyfiles/ folder beside its folder; runtraj includes neither. The SHA-256 of hycs_std and of each table is part of each run’s settings, so runs of different builds are kept apart.

None

varsiwant

Particle variables hycs_std writes to the trajectory output, by the lowercase four-letter names HYSPLIT reads. Each is a column of the particles under the same name, except indx, time, long, and lati. zcfx is the vertical displacement by convective flux along the trajectory, in m. The default is HYSPLIT’s own list of 20.

['time', 'indx', 'long', 'lati', 'zagl', 'sigw', 'tlgr', 'zsfc', 'temp', 'samt', 'foo...

capemin

Convection option. -1 turns convection off, -2 uses the Grell scheme, and a positive value mixes vertically when CAPE exceeds it, in J/kg. Unset, HYSPLIT chooses -2 with ICHEM=8.

None

cmass

Compute grid concentrations (0) or grid mass (1). Read only for HYSPLIT’s concentration grids (mode: concentration), where 1 makes each cell hold mass, not mass per volume, and counts no deposition at z = 0.

0

conage

Particle age at which particles and puffs convert, in hours, when initd is 3 or 4.

24

cpack

Packing of the binary concentration grid: 0 every point, 1 only nonzero points. Unset, HYSPLIT chooses 1. Read only for HYSPLIT’s concentration grids (mode: concentration), where 2, one point per grid, is refused: runtraj does not read its file.

None

delt

Integration time step, in minutes. 0 lets HYSPLIT choose; a negative value sets the minimum step. With ICHEM=8 HYSPLIT always steps 1 minute, so this setting has no effect.

0.0

dxf

Horizontal x offset factor for HYSPLIT’s meteorological ensemble.

1.0

dyf

Horizontal y offset factor for HYSPLIT’s meteorological ensemble.

1.0

dzf

Vertical offset factor for HYSPLIT’s meteorological ensemble (0.01 is about 250 m).

0.01

efile

Name of a time-varying emissions file. Blank uses none.

''

emisshrs

Duration of the particle release, in hours.

0.01

frhmax

Maximum horizontal puff-rounding parameter. Used only for puffs, when initd is not 0.

3.0

frhs

Horizontal puff-rounding fraction for merging. Used only for puffs, when initd is not 0.

1.0

frme

Mass-rounding fraction for enhanced puff merging. Used only for puffs, when initd is not 0.

0.1

frmr

Mass-removal fraction for enhanced puff merging. Used only for puffs, when initd is not 0.

0.0

frts

Temporal puff-rounding fraction. Used only for puffs, when initd is not 0.

0.1

frvs

Vertical puff-rounding fraction. Used only for puffs, when initd is not 0.

0.01

hscale

Horizontal Lagrangian timescale, in seconds.

10800.0

initd

Initial distribution: 0 3D particles, 1 and 2 3D puffs, 3 and 4 puffs horizontally and particles vertically. Other values are HYSPLIT’s conversions and special modes.

0

k10m

Use the 10 m winds and 2 m temperature as the lowest meteorology level (1) or skip them (0).

1

kagl

Trajectory heights above ground (1) or above sea level (0). Read only by HYSPLIT’s trajectory model, not by hycs_std. In mode: trajectory runtraj always writes 1, and refuses another value.

0

kbls

Derive boundary-layer stability from surface fluxes (1) or from wind and temperature profiles (2).

1

kblt

Boundary-layer turbulence scheme: 1 Beljaars, 2 Kantha-Clayson, 3 TKE, 4 measured variances, 5 Hanna. Unset, HYSPLIT chooses 5 with ICHEM=8.

None

kdef

Horizontal turbulence from vertical mixing (0) or wind deformation (1).

0

khinp

Age, in hours, given to particles read from pinpf. 0 keeps their own age.

0

khmax

Maximum particle age, in hours. HYSPLIT drops a particle older than this.

9999

kmix0

Minimum mixed-layer depth, in meters. 0 by default in mode: trajectory, as in hyts_std.

150

kmixd

Mixed-layer depth source: 0 from the meteorology, 1 from the temperature profile, 2 from the TKE profile, 3 from a modified Richardson number. Unset, HYSPLIT chooses 3 with ICHEM=8.

None

kpuff

Horizontal puff growth: linear (0) or empirical (1). Used only for puffs, when initd is not 0.

0

krand

How HYSPLIT draws the random numbers for turbulence. 0, or unset, picks 2 when numpar is 5000 or less and 1 otherwise. 1 uses a precomputed table. 2 draws them during the run and is the only mode that uses seed. 3 uses no random numbers (a diagnostic mode). 4 draws them during the run from a clock-based seed, so every run differs; there are about 5000 possible seeds. 10 to 13 are modes 0 to 3 with a random initial seed. HYSPLIT does not check this value and other values silently break the turbulence, so runtraj rejects them.

None

krnd

Enhanced puff-merging interval, in hours. Used only for puffs, when initd is not 0.

6

kspl

Standard puff-splitting interval, in hours. Used only for puffs, when initd is not 0.

1

kwet

Precipitation for wet removal from the meteorology (1) or from an external file (2). Read only for deposition, which runtraj’s CONTROL turns off.

1

kzmix

Vertical mixing adjustment: 0 none, 1 a single PBL-average value, 2 scale by tvmix.

0

maxdim

Maximum number of pollutants carried on one particle.

1

maxpar

Maximum number of particles in a simulation. Unset gives every release location its full share: numpar for one location, n \* (numpar // n + 1) for n; and a concentration run, which releases over many time steps, numpar and HYSPLIT’s rounding for each emission cycle. A set value that stops a multipoint release before its last location fails the run.

None

mgmin

Minimum meteorological subgrid size, in grid points.

10

mhrs

Trajectory restart duration limit, in hours. Read only by HYSPLIT’s trajectory model, not by hycs_std.

0

nbptyp

Number of particle-size bins per pollutant type.

1

ncycl

Cycle time of the particle dump file, in hours.

0

ndump

Interval between particle dumps to poutf, in hours. 0 writes none. runtraj does not keep the dump file.

0

ninit

Particle initialization from pinpf: 0 none, 1 once at the start, 2 add every hour, 3 replace every hour. A file that does not exist is skipped.

1

nstr

Trajectory restart interval, in hours. Read only by HYSPLIT’s trajectory model, not by hycs_std. Refused in mode: trajectory, where each release starts its own trajectories.

0

nturb

Turbulence on (0) or off (1).

0

nver

Trajectory vertical split number. Read only by HYSPLIT’s trajectory model, not by hycs_std. Refused in mode: trajectory.

0

outdt

Interval between particle outputs in the particle file, in minutes. 0 writes every time step. HYSPLIT writes no particles for a negative value, so it is refused. Only at 0 does runtraj check where the particles of a run that stopped early ended, to tell met that ran out from particles that left the met’s domain.

0

p10f

Dust threshold velocity sensitivity factor, read only by HYSPLIT’s dust emission module.

1.0

pinbc

Particle input file for time-varying boundary conditions.

'PARINBC'

pinpf

Particle input file read at initialization (ninit).

'PARINIT'

poutf

Particle dump output file (ndump).

'PARDUMP'

qcycle

Emission cycling period, in hours. 0 turns cycling off.

0.0

rhb

Relative humidity that defines a cloud base, in percent, for wet removal.

80

rht

Relative humidity that defines a cloud top, in percent, for wet removal.

60

splitf

Factor for the automatic horizontal splitting size. A negative value turns the automatic sizing off. Used only for puffs, when initd is not 0.

1.0

tkerd

Ratio w’²/(u’²+v’²) of TKE components when unstable.

0.18

tkern

Ratio w’²/(u’²+v’²) of TKE components when stable.

0.18

tlfrac

Fraction of the vertical Lagrangian timescale used as the time step of the dispersion scheme.

0.1

tout

Trajectory output interval, in minutes: the time between the rows of a trajectory. Read only in mode: trajectory, where it is 60 by default, and under an hour must divide 60 (HYSPLIT lowers any other to one that does).

0

tm_tpot

Write the potential temperature along each trajectory (1), as tpot, in K. In mode: trajectory only.

0

tm_tamb

Write the air temperature along each trajectory (1), as temp, in K. In mode: trajectory only.

0

tm_rain

Write the rainfall along each trajectory (1), as rain, in mm per hour. In mode: trajectory only.

0

tm_mixd

Write the mixed-layer depth along each trajectory (1), as mlht, in m. In mode: trajectory only.

0

tm_relh

Write the relative humidity along each trajectory (1), as relh, in percent. In mode: trajectory only.

0

tm_sphu

Write the specific humidity along each trajectory (1), as sphu, in g/kg. In mode: trajectory only.

0

tm_mixr

Write the water vapor mixing ratio along each trajectory (1), as mixr, in g/kg. In mode: trajectory only.

0

tm_terr

Write the terrain height along each trajectory (1), as zsfc, in m above sea level. In mode: trajectory only.

0

tm_dswf

Write the downward shortwave flux along each trajectory (1), as dswf, in W/m2. In mode: trajectory only.

0

tratio

Advection stability ratio: the fraction of a grid cell a particle may move in one time step.

0.75

tvmix

Vertical mixing scale factor, used by the kzmix scaling modes.

1.0

veght

Height below which HYSPLIT counts a particle’s time toward its foot: the depth surface fluxes are mixed through. A value of 1 or less is a fraction of the mixed-layer height; a larger value is meters above ground.

0.5

vscale

Vertical Lagrangian timescale, in seconds.

200.0

vscaleu

Vertical Lagrangian timescale in an unstable boundary layer, in seconds.

200.0

vscales

Vertical Lagrangian timescale in a stable boundary layer, in seconds. -1 uses the Hanna timescale, which varies with the turbulence, and then vscaleu is not used. Unset, HYSPLIT chooses -1 with ICHEM=8.

None

w_option

Vertical motion method: 0 the meteorology’s vertical velocity, 1 isobaric, 2 isentropic, 3 constant density, 4 constant sigma.

0

wbbh

Height at which the fixed vertical velocity switches from rise to fall, in meters. Used by vertical motion option 9.

0.0

wbwf

Fixed fall velocity, in m/s. Used by vertical motion options 9 and 10.

0.0

wbwr

Fixed rise velocity, in m/s. Used by vertical motion option 9.

0.0

wvert

Interpolate WRF fields vertically with the WRF scheme instead of HYSPLIT’s.

True

z_top

Top of HYSPLIT’s computational domain, in meters above ground.

25000.0

ziscale

Factor applied to the mixed-layer height, written to HYSPLIT’s ZICONTROL file. 1.0 leaves it unscaled. A single value applies to every hour of the run. A list gives one factor per hour from the release (at most 150), and later hours are unscaled. HYSPLIT applies kmix0 after the factor, so the mixed layer never drops below kmix0. A negative value uses the meteorology’s own PBL height where the met files carry one.

1.0

siguverr

Standard deviation of the horizontal wind error, in m/s.

None

tluverr

Correlation timescale of the horizontal wind error, in minutes.

None

zcoruverr

Vertical correlation length of the horizontal wind error, in meters.

None

horcoruverr

Horizontal correlation length of the horizontal wind error, in km.

None

sigzierr

Standard deviation of the mixed-layer height error, in percent.

None

tlzierr

Correlation timescale of the mixed-layer height error, in minutes.

None

horcorzierr

Horizontal correlation length of the mixed-layer height error, in km.

None

The keys of one entry under pollutants:, in mode: concentration (Concentration Grids).

Parameter

Description

Default

name

Up to four letters or digits: HYSPLIT’s identifier, and the name of the pollutant’s variable in each grid. Not lat, lon, z or time, which name the grid’s coordinates.

Required

rate

Emission rate, per hour, at each release location. Its mass unit is the concentration’s: 1 per hour for an hour gives a mass of 1.

1.0

hours

How long the pollutant is released, in hours, from the release time.

1.0

particle_diameter

Particle diameter, in micrometers. 0 for a gas.

0.0

particle_density

Particle density, in g/cm3. 0 for a gas.

0.0

particle_shape

Particle shape factor. 0 for a gas.

0.0

deposition_velocity

Dry deposition velocity, in m/s. 0 for none, or to compute it from the settings below.

0.0

molecular_weight

Molecular weight, in g/mol, for the resistance method.

0.0

surface_reactivity

Surface reactivity ratio, for the resistance method.

0.0

diffusivity_ratio

Diffusivity ratio, for the resistance method.

0.0

henry_effective

Effective Henry’s constant, in M/atm, for the resistance method.

0.0

henry

Henry’s constant for wet removal of a gas, in M/atm.

0.0

in_cloud

In-cloud wet removal, in L/L (particles).

0.0

below_cloud

Below-cloud wet removal, in 1/s (particles).

0.0

half_life

Radioactive decay half-life, in days. 0 for none.

0.0

resuspension

Resuspension factor of deposited mass, in 1/m.

0.0

The keys of one entry under grids:, in mode: concentration.

Parameter

Description

Default

name

The grid’s name: its group in the result’s file, and its child in the tree.

Required

center_lon

Longitude of the grid’s center, in degrees. Unset with center_lat, the grid is centered on each release.

None

center_lat

Latitude of the grid’s center, in degrees. Set with center_lon.

None

spacing_lat

Distance between rows of cells, in degrees of latitude.

0.05

spacing_lon

Distance between columns of cells, in degrees of longitude.

0.05

span_lat

How far the grid reaches in latitude, in degrees.

1.0

span_lon

How far the grid reaches in longitude, in degrees.

1.0

levels

Top of each level, in whole meters above ground, from the bottom. A level of 0 counts deposition on the ground.

[100]

sampling

What each sample is: the average over its interval, the value at its end, or the maximum.

'average'

sampling_interval

Length of each sample, in minutes: under an hour, any number; an hour or more, a whole number of hours (60, 120, …), which is how HYSPLIT reads it.

60

The keys of one entry under conversions:, with ichem: 2.

Parameter

Description

Default

source

The name of the pollutant that is converted.

Required

product

The name of the pollutant it becomes.

Required

rate

The fraction of source converted per hour, such as 0.1.

Required

weight_ratio

Mass of product made per mass of source converted: the ratio of their molecular weights, such as 1.5 for SO2 to SO4.

1.0

A model in another package gets a block of any name that gives the model class’s import path as class, then that model’s own settings:

models:
  hysplit: {n_hours: -24}
  mine: {class: mypkg.models.MyModel, n_hours: -24}
variants:
  hrrr: {model: hysplit}
  hrrr-mine: {model: mine, met: hrrr}

With two or more models, each variant names its own with model. A model has one block: a second set of settings for it is a second variant.

A stage#

A stage’s block under stages: gives the import path of the stage’s class as class, then that stage’s own settings, which are the defaults of every variant. A variant changes some under its own stages key, under the stage’s name, and sets the stage to null to go without it. PYSTILT’s footprint is such a stage:

stages:
  footprint:
    class: stilt.footprint.FootprintStage
    grid: {xmin: -113.0, xmax: -110.5, ymin: 40.0, ymax: 42.0, xres: 0.01, yres: 0.01}
variants:
  hrrr: {}
  hrrr-coarse: {stages: {footprint: {grid: {xres: 0.05, yres: 0.05}}}}
  hrrr-particles: {stages: {footprint: null}}

A met#

The keys of one entry under mets:, for HYSPLIT (Meteorology).

Parameter

Description

Default

directory

Directory holding the ARL meteorology files. Downloads are saved here. In a project, a relative path starts from the project directory; ~ and $VARIABLES are expanded.

Required

subgrid_dir

Directory for the cropped files, shared by every simulation that uses this meteorology. Each crop box gets its own folder inside it. Required when cropping your own files; not used with download, which crops files as it downloads them. A relative path starts from the project directory.

None

download

Name of a NOAA ARL archive to download files from with arlmet, such as hrrr, nam12, gdas1, or gfs0p25. Options for the archive (such as domain: ak) go in the same entry.

None

download_from

Server to download from: s3, ftp, or http.

's3'

subgrid_enable

Crop the meteorology to subgrid_bounds before running.

False

subgrid_bounds

Longitude/latitude box to crop the meteorology to. Particles that leave it stop, so make it wide enough for the whole run.

None

subgrid_levels

Number of vertical levels to keep, counted from the surface. Unset keeps all.

None

Execution#

The keys under execution: (Running). backend names where the project runs, and every setting of that place is in the block of its name. Only that block is read, so a config can hold several.

Parameter

Description

Default

backend

Where to run: on this machine (local), as a Slurm job array (slurm), or as a Kubernetes indexed Job (kubernetes).

'local'

local

How a local run goes (LocalConfig). Read with backend: local.

LocalConfig(cpus=1, fetch=True)

slurm

The job array of a Slurm run (SlurmConfig), and any other sbatch option by name. Read with backend: slurm.

SlurmConfig(n_workers=1, cpus=1, time=None, mem=None, partition=None, account=None, q...

kubernetes

The indexed Job of a Kubernetes run (KubernetesConfig). Read with backend: kubernetes.

KubernetesConfig(image=None, completions=1, parallelism=None, cpus=1, memory=None, na...

timeout

Time limit for one transport model run, in seconds. A run that exceeds it is stopped and recorded as a failed simulation, and the worker moves on. Unset waits indefinitely, so a hung run can hold a worker until its job ends.

None

keep_workdir

Keep every run’s workdir, as the transport model left it, under scratch/ in the output directory. A failed run’s is always kept, without the model’s particle file unless this is set.

False

The keys under execution: local:, a run on this machine.

Parameter

Description

Default

cpus

Releases run at once, each in a process of its own.

1

fetch

Get the met files a met with download lacks once, before the workers start, when cpus is above 1, so they do not download the same file at once. false leaves each run to download what it needs, as when something else fills the met directory.

True

The keys under execution: slurm:, a Slurm job array (On An HPC Cluster (Slurm)). Any other key is an sbatch option by its name.

Parameter

Description

Default

n_workers

Number of array tasks, which the releases are split evenly among.

1

cpus

Releases each task runs at once, and the CPUs each task asks for.

1

time

Time limit per task, as HH:MM:SS, D-HH:MM:SS, or minutes. Required with backend: slurm: without it a task gets the partition’s default, which can be days.

None

mem

Memory per task, such as 8G.

None

partition

Slurm partition.

None

account

Slurm account.

None

qos

Slurm quality of service.

None

array_parallelism

Most tasks running at once. Unset leaves it to Slurm.

None

setup

Shell commands run in each task before the worker, such as module load lines. They run after the script exports OMP_NUM_THREADS, one thread per worker, so a line here can change it. The worker itself runs with the Python that submitted it.

[]

fetch

Get the met files a met with download lacks once, in a job of its own that the array waits for, with these resources (FetchConfig). false leaves each run to download what it needs, as when something else fills the met directory.

FetchConfig(partition=None, account=None, qos=None, time=None, mem=None)

The keys under execution: slurm: fetch:, the Slurm resources of the job that gets the met files before a job array (Met files that download).

Parameter

Description

Default

partition

Slurm partition of the fetch job. Unset is the array’s.

None

account

Slurm account of the fetch job. Unset is the array’s.

None

qos

Slurm quality of service of the fetch job. Unset is the array’s.

None

time

Time limit of the fetch job, as for time. Unset is the array’s time limit per task.

None

mem

Memory of the fetch job, such as 4G. Unset is the array’s.

None

The keys under execution: kubernetes:, a Kubernetes indexed Job (Submitting to Kubernetes), in Kubernetes’ own names and units.

Parameter

Description

Default

image

Container image of the pods, with runtraj, the transport model and the project’s stages. Required with backend: kubernetes.

None

completions

Number of tasks (pods to complete), which the releases are split evenly among.

1

parallelism

Most pods running at once. Unset runs every task at once.

None

cpus

Releases each pod runs at once, and the CPUs each pod requests.

1

memory

Memory each pod requests, and its limit, in Kubernetes’ binary units such as 8Gi or 512Mi.

None

namespace

Namespace of the Job. Unset is kubectl’s current one.

None

inputs

Bucket URL the project’s inputs (config.yaml, releases.csv, tables/, sites.csv) are copied to at submit, such as s3://bucket/projects/my_project; each pod copies them back. Unset, the pods open the project folder at the path it has here, so it must be on a volume they mount at that path.

None

volumes

PersistentVolumeClaims mounted in every pod (Volume), such as the met archive.

[]

secrets

Secrets whose keys become each pod’s environment variables, such as a bucket’s credentials.

[]

service_account

Service account of the pods, on a cluster that grants bucket access through one.

None

active_deadline_seconds

Seconds the whole Job may run before Kubernetes stops it. Unset lets it run as long as its simulations take.

None

fetch

Get the met files once, before the pods run, for a met with download whose directory is on a volume every pod mounts: each pod first gets the files of every unfinished simulation, one pod at a time (a lock where the inputs are), so the first downloads them and the others find them. Leave it false when each pod has its own met directory.

False

The keys of one entry under execution: kubernetes: volumes:, a PersistentVolumeClaim mounted in every pod.

Parameter

Description

Default

claim_name

Name of the PersistentVolumeClaim.

Required

mount_path

Where the volume is mounted in each pod, an absolute path.

Required

read_only

Mount it read-only, as for a met archive the pods only read.

False

Boxes#

A Bounds is a longitude/latitude box, in degrees, such as a met’s crop box. Longitudes count modulo 360, so a box across 180° can be written xmin: 170, xmax: 190 or xmin: 170, xmax: -170, and a box 360° wide or more holds every longitude (Bounds.contains()).

Config objects#

A config is what you write. project.variants turns each declared variant into a runtraj.config.Variant: its transport settings checked by the model’s config class, and what the file alone does not say, such as the transport model build. A variant with realizations: N stays one variant.

The RUNTRAJ_COMPUTE_ROOT environment variable sets the compute root, where each run’s workdir is made. It never changes a result, and projects can share one.

ProjectConfig

A project's configuration, as read from config.yaml.

ExecutionConfig

Where a project's releases run, and with what resources.

execution.LocalConfig

How a project's releases run on this machine: the local block of execution.

execution.SlurmConfig

The Slurm job array a project's releases run as: the slurm block of execution.

execution.FetchConfig

The Slurm resources of the job that gets the met files before a job array.

execution.KubernetesConfig

The Kubernetes indexed Job a project's releases run as: the kubernetes block of execution.

execution.Volume

A PersistentVolumeClaim mounted in every pod: one entry of volumes in the kubernetes block.

Bounds

Longitude/latitude bounding box, in degrees.

Parameters#

The settings that shape a run’s particles belong to the transport model, and are written in its block under models: (hysplit when the config has no models). HYSPLIT’s are in runtraj.models.hysplit.HysplitConfig, under HYSPLIT’s names (see HYSPLIT Integration). Each model’s block holds all of its settings, the ones runtraj reads itself among them (n_hours and seed): nothing passes from one model’s block to another’s. What a stage does with the particles afterwards is in the stage’s block, and does not change the particles or their settings folder.