runtraj.models.hysplit.Met.check_releases#

Met.check_releases(releases, n_hours)[source]#

Return what would stop runs of releases before HYSPLIT starts, found without running.

The file check that files_for() makes for each run, made for every release at once: the met’s directory exists and holds an ARL file, and every file a run needs is there, holds at least two time periods, and ends on a whole time step. A release outside the files is listed too, since HYSPLIT cannot start a particle there: outside subgrid_bounds with the crop on, else outside the grid of the first file its run reads. A met with download has no files to look for before a run, so only its crop is checked.

This brings the tables of what the files and their crops hold up to date first (Catalog.refresh()), so it is the place to build them before a batch: a first read of a large archive takes minutes. It reads each file’s first two index records, not the rest. check() reads each file at a run, and a run that passes this one can still fail as MET_COVERAGE when a file is damaged in the middle.

Parameters:
  • releases (DataFrame) – One row per release point, with release (the id), time, longitude, and latitude columns.

  • n_hours (int) – The length of the runs, negative for backward.

Returns:

One row for each thing found, with check (met_directory, met_files, met_periods, met_cut, met_domain, or met_crop), release (NA when the finding is about the met), and message columns. Empty when nothing would stop a run.

Return type:

DataFrame