stilt.config#

Classes

BaseConfig(**data)

STILT Configuration

ErrorParams(**data)

FootprintParams(**data)

MetParams(**data)

ModelConfig(**data)

ModelParams(**data)

Resolution(**data)

SimulationConfig(**data)

SystemParams(**data)

TransportParams(**data)

UserFuncParams(**data)

class stilt.config.Resolution(**data)[source]#
xres: float#
yres: float#
model_config: ClassVar[ConfigDict] = {}#

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

class stilt.config.SystemParams(**data)[source]#
stilt_wd: Path#
output_wd: Path | None#
lib_loc: Path | int | None#
model_config: ClassVar[ConfigDict] = {}#

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

class stilt.config.FootprintParams(**data)[source]#
hnf_plume: bool#
projection: str#
smooth_factor: float#
time_integrate: bool#
xmn: float | None#
xmx: float | None#
xres: float | list[float] | None#
ymn: float | None#
ymx: float | None#
yres: float | list[float] | None#
property resolutions: list[Resolution] | None#

Get the x and y resolutions as a list of tuples.

model_config: ClassVar[ConfigDict] = {}#

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

class stilt.config.MetParams(**data)[source]#
met_path: Path#
met_file_format: str#
met_file_tres: str#
met_subgrid_buffer: float#
met_subgrid_enable: bool#
met_subgrid_levels: int | None#
n_met_min: int#
model_config: ClassVar[ConfigDict] = {}#

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

class stilt.config.ModelParams(**data)[source]#
n_hours: int#
numpar: int#
rm_dat: bool#
run_foot: bool#
run_trajec: bool#
simulation_id: str | list[str] | None#
timeout: int#
varsiwant: list[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', 'zfx1']]#
model_config: ClassVar[ConfigDict] = {}#

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

class stilt.config.TransportParams(**data)[source]#
capemin: float#
cmass: int#
conage: int#
cpack: int#
delt: int#
dxf: int#
dyf: int#
dzf: float#
efile: str#
emisshrs: float#
frhmax: float#
frhs: float#
frme: float#
frmr: float#
frts: float#
frvs: float#
hscale: int#
ichem: int#
idsp: int#
initd: int#
k10m: int#
kagl: int#
kbls: int#
kblt: int#
kdef: int#
khinp: int#
khmax: int#
kmix0: int#
kmixd: int#
kmsl: int#
kpuff: int#
krand: int#
krnd: int#
kspl: int#
kwet: int#
kzmix: int#
maxdim: int#
maxpar: int | None#
mgmin: int#
mhrs: int#
nbptyp: int#
ncycl: int#
ndump: int#
ninit: int#
nstr: int#
nturb: int#
nver: int#
outdt: int#
p10f: int#
pinbc: str#
pinpf: str#
poutf: str#
qcycle: int#
rhb: float#
rht: float#
splitf: int#
tkerd: float#
tkern: float#
tlfrac: float#
tout: float#
tratio: float#
tvmix: float#
veght: float#
vscale: int#
vscaleu: int#
vscales: int#
w_option: int#
wbbh: int#
wbwf: int#
wbwr: int#
wvert: bool#
z_top: float#
zicontroltf: int#
ziscale: int | list[int]#
model_config: ClassVar[ConfigDict] = {}#

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

class stilt.config.ErrorParams(**data)[source]#
siguverr: float | None#
tluverr: float | None#
zcoruverr: float | None#
horcoruverr: float | None#
sigzierr: float | None#
tlzierr: float | None#
horcorzierr: float | None#
XYERR_PARAMS: ClassVar[tuple[str, ...]] = ('siguverr', 'tluverr', 'zcoruverr', 'horcoruverr')#
ZIERR_PARAMS: ClassVar[tuple[str, ...]] = ('sigzierr', 'tlzierr', 'horcorzierr')#
xyerr_params()[source]#

Get the XY error parameters as a dictionary.

Return type:

dict[str, float | None]

zierr_params()[source]#

Get the ZI error parameters as a dictionary.

Return type:

dict[str, float | None]

property winderrtf: int#

Determine the winderrtf flag based on the presence of error parameters.

Returns:

Wind error control flag.

0 : No error parameters are set 1 : ZI error parameters are set 2 : XY error parameters are set 3 : Both XY and ZI error parameters are set

Return type:

int

model_config: ClassVar[ConfigDict] = {}#

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

class stilt.config.UserFuncParams(**data)[source]#
before_footprint: Callable | Path | None#
model_config: ClassVar[ConfigDict] = {}#

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

class stilt.config.BaseConfig(**data)[source]#

STILT Configuration

This class consolidates all configuration parameters for the STILT model, including system settings, footprint parameters, meteorological data, model specifics, transport settings, error handling, and user-defined functions.

class Config[source]#
arbitrary_types_allowed = True#
classmethod from_path(path)[source]#

Load STILT configuration from a YAML file.

Return type:

Self

system_params()[source]#
Return type:

dict[str, Any]

footprint_params()[source]#
Return type:

dict[str, Any]

met_params()[source]#
Return type:

dict[str, Any]

model_params()[source]#
Return type:

dict[str, Any]

transport_params()[source]#
Return type:

dict[str, Any]

error_params()[source]#
Return type:

dict[str, Any]

user_funcs()[source]#
Return type:

dict[str, Any]

model_config: ClassVar[ConfigDict] = {'arbitrary_types_allowed': True}#

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

class stilt.config.SimulationConfig(**data)[source]#
receptor: Receptor#
classmethod from_path(path)[source]#

Load STILT configuration from a YAML file.

Return type:

Self

to_model_config()[source]#
Return type:

ModelConfig

model_config: ClassVar[ConfigDict] = {'arbitrary_types_allowed': True}#

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

class stilt.config.ModelConfig(**data)[source]#
receptors: list[Receptor]#
classmethod from_path(path)[source]#

Load STILT configuration from a YAML file.

Return type:

Self

to_file()[source]#
build_simulation_configs()[source]#

Build a list of SimulationConfig objects, one for each receptor.

Return type:

list[SimulationConfig]

model_config: ClassVar[ConfigDict] = {'arbitrary_types_allowed': True}#

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

stilt_wd: Path#
output_wd: Path | None#
lib_loc: Path | int | None#
hnf_plume: bool#
projection: str#
smooth_factor: float#
time_integrate: bool#
xmn: float | None#
xmx: float | None#
xres: float | list[float] | None#
ymn: float | None#
ymx: float | None#
yres: float | list[float] | None#
met_path: Path#
met_file_format: str#
met_file_tres: str#
met_subgrid_buffer: float#
met_subgrid_enable: bool#
met_subgrid_levels: int | None#
n_met_min: int#
n_hours: int#
numpar: int#
rm_dat: bool#
run_foot: bool#
run_trajec: bool#
simulation_id: str | list[str] | None#
timeout: int#
varsiwant: list[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', 'zfx1']]#
capemin: float#
cmass: int#
conage: int#
cpack: int#
delt: int#
dxf: int#
dyf: int#
dzf: float#
efile: str#
emisshrs: float#
frhmax: float#
frhs: float#
frme: float#
frmr: float#
frts: float#
frvs: float#
hscale: int#
ichem: int#
idsp: int#
initd: int#
k10m: int#
kagl: int#
kbls: int#
kblt: int#
kdef: int#
khinp: int#
khmax: int#
kmix0: int#
kmixd: int#
kmsl: int#
kpuff: int#
krand: int#
krnd: int#
kspl: int#
kwet: int#
kzmix: int#
maxdim: int#
maxpar: int | None#
mgmin: int#
mhrs: int#
nbptyp: int#
ncycl: int#
ndump: int#
ninit: int#
nstr: int#
nturb: int#
nver: int#
outdt: int#
p10f: int#
pinbc: str#
pinpf: str#
poutf: str#
qcycle: int#
rhb: float#
rht: float#
splitf: int#
tkerd: float#
tkern: float#
tlfrac: float#
tout: float#
tratio: float#
tvmix: float#
veght: float#
vscale: int#
vscaleu: int#
vscales: int#
w_option: int#
wbbh: int#
wbwf: int#
wbwr: int#
wvert: bool#
z_top: float#
zicontroltf: int#
ziscale: int | list[int]#
siguverr: float | None#
tluverr: float | None#
zcoruverr: float | None#
horcoruverr: float | None#
sigzierr: float | None#
tlzierr: float | None#
horcorzierr: float | None#
before_footprint: Callable | Path | None#