stilt.Project.check#
- Project.check()[source]#
Return what would stop the project’s simulations, found before any run.
Looks only at the inputs, and runs and downloads nothing. For each variant it checks that:
the met’s
directoryexists and holds an ARL file (met_directory);every met file each receptor’s run needs is there, naming the hours (
met_files);the first met file they need holds at least two time periods, which HYSPLIT needs (
met_periods);each receptor is inside the met’s crop box,
subgrid_bounds, when the crop is on (met_crop);each receptor is inside the footprint grid (
grid);each
averaging_kerneltable exists (kernel_table), has a kernel for every receptor (kernel_missing), and holds none for a receptor the project lacks (kernel_unused);varsiwantholdszsfcwhen a receptor is above sea level (altitude_ref="msl") and a run reads it: the near-field correction, the release heights of a multipoint receptor whose points are less than 1 km apart and at different altitudes, or thepressure_weightingtransform (zsfc).
A met with
downloadhas no files to look for: they are fetched when a run needs them, so only its crop is checked.- Returns:
One row for each thing found, with
check(the name in parentheses above),variant(the variants it is found for, separated by commas, when they share a met, a run length, a grid, or a table),receptor(NAwhen it is not about one receptor), andmessagecolumns. Empty when nothing is found.stilt checkprints it.- Return type:
- Raises:
ValueError – If
config.yamlorreceptors.csvis invalid.
Notes
The check looks for files, not inside them (except to count the time periods of the first file a run needs, and to read the spacing of the met steps from the file of a run’s end), and the crop box is the only domain it knows. A run that passes it can still fail as
MET_COVERAGE: a met file that is damaged or cut short is found when the run opens it, and a receptor outside the domain of the files (an uncropped met), when HYSPLIT starts it.Examples
>>> problems = project.check() >>> problems.empty # True when nothing would stop a run >>> problems[problems.check == "met_files"][ ... ["receptor", "message"] ... ]