runtraj.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 project has releases (
releases);the met’s
directoryexists and holds an ARL file (met_directory);every met file each release’s run needs is there, naming the hours (
met_files);each met file they need holds at least two time periods, which HYSPLIT needs (
met_periods), and ends on a whole time step (met_cut);each release is inside the grid of the met files its run starts in, when the crop is off (
met_domain), or inside the met’s crop box,subgrid_bounds, when it is on (met_crop);HYSPLIT’s
varsiwantholdszsfcwhen a release is above sea level (altitude_ref="msl") and a run reads it: the release heights of a multipoint release whose points are less than 1 km apart and at different altitudes, or what a stage says it reads (zsfc);what each stage of the project finds in its own settings and the releases (
runtraj.stages.Stage.check()).
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),release(NAwhen it is not about one release), andmessagecolumns. Empty when nothing is found.runtraj checkprints it.- Return type:
- Raises:
ValueError – If
config.yamlorreleases.csvis invalid.
Notes
The check looks for files, not inside them (except to count the time periods of the first file a run needs, to read the spacing of the met steps from the file of a run’s end, and to read a grid from a file’s header). 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.Examples
>>> problems = project.check() >>> problems.empty # True when nothing would stop a run >>> problems[problems.check == "met_files"][ ... ["release", "message"] ... ]