runtraj.models.hysplit.HysplitConfig#
- class runtraj.models.hysplit.HysplitConfig(*, n_hours: int, seed: int | None = None, mode: Literal['particles', 'concentration', 'trajectory']='particles', pollutants: list[runtraj.models.hysplit.config.Pollutant] = <factory>, grids: list[runtraj.models.hysplit.config.ConcentrationGrid] = <factory>, conversions: list[runtraj.models.hysplit.config.Conversion] = <factory>, ichem: int | None = None, numpar: Annotated[int, Ge(ge=1)] = 2500, directory: pathlib.Path | None = None, varsiwant: list[typing.Literal['time', 'indx', 'long', 'lati', 'zagl', 'sigw', 'tlgr', 'zsfc', 'icdx', 'temp', 'samt', 'foot', 'shtf', 'tcld', 'dmas', 'dens', 'rhfr', 'sphu', 'lcld', 'zloc', 'dswf', 'wout', 'mlht', 'rain', 'crai', 'pres', 'whtf', 'temz', 'zcfx']]=<factory>, capemin: float | None = None, cmass: int = 0, conage: int = 24, cpack: int | None = None, delt: float = 0.0, dxf: float = 1.0, dyf: float = 1.0, dzf: float = 0.01, efile: str = '', emisshrs: Annotated[float, Ge(ge=0)] = 0.01, frhmax: float = 3.0, frhs: float = 1.0, frme: float = 0.1, frmr: float = 0.0, frts: float = 0.1, frvs: float = 0.01, hscale: float = 10800.0, initd: int = 0, k10m: int = 1, kagl: int = 0, kbls: int = 1, kblt: int | None = None, kdef: int = 0, khinp: int = 0, khmax: int = 9999, kmix0: int = 150, kmixd: int | None = None, kpuff: int = 0, krand: Literal[0, 1, 2, 3, 4, 10, 11, 12, 13] | None=None, krnd: int = 6, kspl: int = 1, kwet: int = 1, kzmix: int = 0, maxdim: int = 1, maxpar: int | None = None, mgmin: int = 10, mhrs: int = 0, nbptyp: int = 1, ncycl: int = 0, ndump: int = 0, ninit: int = 1, nstr: int = 0, nturb: int = 0, nver: int = 0, outdt: Annotated[int, Ge(ge=0)] = 0, p10f: float = 1.0, pinbc: str = 'PARINBC', pinpf: str = 'PARINIT', poutf: str = 'PARDUMP', qcycle: float = 0.0, rhb: int = 80, rht: int = 60, splitf: float = 1.0, tkerd: float = 0.18, tkern: float = 0.18, tlfrac: float = 0.1, tout: Annotated[int, Ge(ge=0)] = 0, tm_tpot: Literal[0, 1]=0, tm_tamb: Literal[0, 1]=0, tm_rain: Literal[0, 1]=0, tm_mixd: Literal[0, 1]=0, tm_relh: Literal[0, 1]=0, tm_sphu: Literal[0, 1]=0, tm_mixr: Literal[0, 1]=0, tm_terr: Literal[0, 1]=0, tm_dswf: Literal[0, 1]=0, tratio: float = 0.75, tvmix: float = 1.0, veght: Annotated[float, Gt(gt=0)] = 0.5, vscale: float = 200.0, vscaleu: float = 200.0, vscales: float | None = None, w_option: int = 0, wbbh: float = 0.0, wbwf: float = 0.0, wbwr: float = 0.0, wvert: bool = True, z_top: Annotated[float, Gt(gt=0)] = 25000.0, ziscale: float | list[float] = 1.0, siguverr: Annotated[float | None, Ge(ge=0)] = None, tluverr: Annotated[float | None, Ge(ge=0)] = None, zcoruverr: Annotated[float | None, Ge(ge=0)] = None, horcoruverr: Annotated[float | None, Ge(ge=0)] = None, sigzierr: Annotated[float | None, Ge(ge=0)] = None, tlzierr: Annotated[float | None, Ge(ge=0)] = None, horcorzierr: Annotated[float | None, Ge(ge=0)] = None) None[source]#
HYSPLIT’s config: every setting that shapes what it makes.
In
config.yamlthey are the keys of thehysplitblock undermodels:, and a variant may override any of them. Most are HYSPLITSETUP.CFGentries with HYSPLIT’s own names; see the HYSPLIT user guide for the full meaning of each. The wind-error group (siguverr,tluverr,zcoruverr,horcoruverr) perturbs the particles’ winds, and the mixed-layer group (sigzierr,tlzierr,horcorzierr) perturbs each particle’sfootby a random mixed-layer height error. Each group is set in full or not at all.In the particles mode runtraj always writes
ICHEM=8andIDSP=2(FIXED_SETUP), the only values with which HYSPLIT writes particles:idspis not a setting, andichemmay be 8 or left out there. Some settings act only together with another: the puff settings (conage,kpuff,kspl,krnd,splitfand thefrgroup) wheninitdreleases puffs, andkhinpandpinpfwhenninitreads particles from a file. A few are read only for HYSPLIT’s concentration grid or deposition, which runtraj does not read, anddeltis overridden in this mode.The defaults are HYSPLIT’s own for a dispersion run in this mode (
ICHEM=8). HYSPLIT decidescapemin,cpack,kblt,kmixd,krandandvscalesonly after it has readSETUP.CFG, from the mode andnumpar, so they are unset by default: an unset setting is not written, and HYSPLIT chooses.n_hourshas no default.modesays what a run makes.particles(the default) is the particle table, from HYSPLIT’s particle output (ICHEM=8).concentrationis HYSPLIT’s own concentration grids, one grid of each ofgridswith a variable for each ofpollutants. Thereichem(0 unless set, and recorded) picks one of the other things HYSPLIT can count (CONCENTRATION_ICHEM); the values runtraj does not run are refused with the reason (ICHEM_REFUSED), and so are the settings HYSPLIT would change, ignore or stop on with the one set. A concentration run leaves out the particle file’s settings (PARTICLES_SETTINGS), which ahysplitblock may set for its particle variants;pollutants,gridsandconversionswithoutmode: concentrationare refused. A particles-mode run records nomode,pollutantsorgrids, so its settings folder is the one it had before the mode existed.trajectoryruns HYSPLIT’s trajectory program,hyts_std, which follows one air parcel from each release location with the mean wind and no turbulence, and gives the trajectory table (runtraj.trajectories). It reads few settings (TRAJECTORY_SETTINGS): the run’s length, vertical motion and top,tout, thetm_settings that add a column each, and a handfulhyts_stdshares withhycs_std. Every other setting, such asnumpar, is left out of a trajectory run, neither written nor recorded.toutis 60 andkmix0is 0 unless set, the defaults ofhyts_std(TRAJECTORY_DEFAULTS). Heights are always above ground (KAGL=1), andrealizationsabove 1 are refused, since nothing in a trajectory run is random.
Parameters#
Parameter |
Description |
Default |
|---|---|---|
|
Length of each simulation, in hours. Negative runs backward in time. It has no default: a config must say it. |
Required |
|
Random seed for a reproducible run. Different seeds give different runs. Requires |
|
|
What HYSPLIT makes: |
|
|
The pollutants of a concentration run, each released at every release location and counted on every grid. At least one in |
|
|
The grids of a concentration run. At least one in |
|
|
The conversions of a concentration run with |
|
|
HYSPLIT’s |
|
|
Number of particles released per simulation. More particles sample the turbulence better and take longer to run. |
|
|
The HYSPLIT folder as unpacked: runtraj runs |
|
|
Particle variables |
|
|
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 |
|
|
Compute grid concentrations (0) or grid mass (1). Read only for HYSPLIT’s concentration grids ( |
|
|
Particle age at which particles and puffs convert, in hours, when |
|
|
Packing of the binary concentration grid: 0 every point, 1 only nonzero points. Unset, HYSPLIT chooses 1. Read only for HYSPLIT’s concentration grids ( |
|
|
Integration time step, in minutes. 0 lets HYSPLIT choose; a negative value sets the minimum step. With |
|
|
Horizontal x offset factor for HYSPLIT’s meteorological ensemble. |
|
|
Horizontal y offset factor for HYSPLIT’s meteorological ensemble. |
|
|
Vertical offset factor for HYSPLIT’s meteorological ensemble (0.01 is about 250 m). |
|
|
Name of a time-varying emissions file. Blank uses none. |
|
|
Duration of the particle release, in hours. |
|
|
Maximum horizontal puff-rounding parameter. Used only for puffs, when |
|
|
Horizontal puff-rounding fraction for merging. Used only for puffs, when |
|
|
Mass-rounding fraction for enhanced puff merging. Used only for puffs, when |
|
|
Mass-removal fraction for enhanced puff merging. Used only for puffs, when |
|
|
Temporal puff-rounding fraction. Used only for puffs, when |
|
|
Vertical puff-rounding fraction. Used only for puffs, when |
|
|
Horizontal Lagrangian timescale, in seconds. |
|
|
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. |
|
|
Use the 10 m winds and 2 m temperature as the lowest meteorology level (1) or skip them (0). |
|
|
Trajectory heights above ground (1) or above sea level (0). Read only by HYSPLIT’s trajectory model, not by |
|
|
Derive boundary-layer stability from surface fluxes (1) or from wind and temperature profiles (2). |
|
|
Boundary-layer turbulence scheme: 1 Beljaars, 2 Kantha-Clayson, 3 TKE, 4 measured variances, 5 Hanna. Unset, HYSPLIT chooses 5 with |
|
|
Horizontal turbulence from vertical mixing (0) or wind deformation (1). |
|
|
Age, in hours, given to particles read from |
|
|
Maximum particle age, in hours. HYSPLIT drops a particle older than this. |
|
|
Minimum mixed-layer depth, in meters. 0 by default in |
|
|
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 |
|
|
Horizontal puff growth: linear (0) or empirical (1). Used only for puffs, when |
|
|
How HYSPLIT draws the random numbers for turbulence. 0, or unset, picks 2 when |
|
|
Enhanced puff-merging interval, in hours. Used only for puffs, when |
|
|
Standard puff-splitting interval, in hours. Used only for puffs, when |
|
|
Precipitation for wet removal from the meteorology (1) or from an external file (2). Read only for deposition, which runtraj’s |
|
|
Vertical mixing adjustment: 0 none, 1 a single PBL-average value, 2 scale by |
|
|
Maximum number of pollutants carried on one particle. |
|
|
Maximum number of particles in a simulation. Unset gives every release location its full share: |
|
|
Minimum meteorological subgrid size, in grid points. |
|
|
Trajectory restart duration limit, in hours. Read only by HYSPLIT’s trajectory model, not by |
|
|
Number of particle-size bins per pollutant type. |
|
|
Cycle time of the particle dump file, in hours. |
|
|
Interval between particle dumps to |
|
|
Particle initialization from |
|
|
Trajectory restart interval, in hours. Read only by HYSPLIT’s trajectory model, not by |
|
|
Turbulence on (0) or off (1). |
|
|
Trajectory vertical split number. Read only by HYSPLIT’s trajectory model, not by |
|
|
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. |
|
|
Dust threshold velocity sensitivity factor, read only by HYSPLIT’s dust emission module. |
|
|
Particle input file for time-varying boundary conditions. |
|
|
Particle input file read at initialization ( |
|
|
Particle dump output file ( |
|
|
Emission cycling period, in hours. 0 turns cycling off. |
|
|
Relative humidity that defines a cloud base, in percent, for wet removal. |
|
|
Relative humidity that defines a cloud top, in percent, for wet removal. |
|
|
Factor for the automatic horizontal splitting size. A negative value turns the automatic sizing off. Used only for puffs, when |
|
|
Ratio w’²/(u’²+v’²) of TKE components when unstable. |
|
|
Ratio w’²/(u’²+v’²) of TKE components when stable. |
|
|
Fraction of the vertical Lagrangian timescale used as the time step of the dispersion scheme. |
|
|
Trajectory output interval, in minutes: the time between the rows of a trajectory. Read only in |
|
|
Write the potential temperature along each trajectory (1), as |
|
|
Write the air temperature along each trajectory (1), as |
|
|
Write the rainfall along each trajectory (1), as |
|
|
Write the mixed-layer depth along each trajectory (1), as |
|
|
Write the relative humidity along each trajectory (1), as |
|
|
Write the specific humidity along each trajectory (1), as |
|
|
Write the water vapor mixing ratio along each trajectory (1), as |
|
|
Write the terrain height along each trajectory (1), as |
|
|
Write the downward shortwave flux along each trajectory (1), as |
|
|
Advection stability ratio: the fraction of a grid cell a particle may move in one time step. |
|
|
Vertical mixing scale factor, used by the |
|
|
Height below which HYSPLIT counts a particle’s time toward its |
|
|
Vertical Lagrangian timescale, in seconds. |
|
|
Vertical Lagrangian timescale in an unstable boundary layer, in seconds. |
|
|
Vertical Lagrangian timescale in a stable boundary layer, in seconds. -1 uses the Hanna timescale, which varies with the turbulence, and then |
|
|
Vertical motion method: 0 the meteorology’s vertical velocity, 1 isobaric, 2 isentropic, 3 constant density, 4 constant sigma. |
|
|
Height at which the fixed vertical velocity switches from rise to fall, in meters. Used by vertical motion option 9. |
|
|
Fixed fall velocity, in m/s. Used by vertical motion options 9 and 10. |
|
|
Fixed rise velocity, in m/s. Used by vertical motion option 9. |
|
|
Interpolate WRF fields vertically with the WRF scheme instead of HYSPLIT’s. |
|
|
Top of HYSPLIT’s computational domain, in meters above ground. |
|
|
Factor applied to the mixed-layer height, written to HYSPLIT’s |
|
|
Standard deviation of the horizontal wind error, in m/s. |
|
|
Correlation timescale of the horizontal wind error, in minutes. |
|
|
Vertical correlation length of the horizontal wind error, in meters. |
|
|
Horizontal correlation length of the horizontal wind error, in km. |
|
|
Standard deviation of the mixed-layer height error, in percent. |
|
|
Correlation timescale of the mixed-layer height error, in minutes. |
|
|
Horizontal correlation length of the mixed-layer height error, in km. |
|
Attributes#
Fields left out of a run's recorded settings. |
Methods#
Return |
|
|
Return the |
|
Return n realizations of this config, realization |
|
Return what a run records of this config: the settings of its mode. |