stilt.Project.fetch#
- Project.fetch(sel=None)[source]#
Get the met files the unfinished simulations need, and return them.
For each met, gets the files that cover the time of every simulation in sel whose transport model has yet to run, as a run would ask for them (the hour after a run’s end too). With
download, it downloads what is missing and crops it as it goes, so the runs that follow find every file and download nothing. A met withoutdownloadis only checked: its missing files are reported, ascheckdoes. Several fetches, or a fetch beside runs, can share a met directory: arlmet writes each file under a temporary name and renames it into place when whole.- Parameters:
sel (
Any) – The simulations to fetch for, as forstatus(). Defaults to all of them.- Returns:
met(its name undermets:),file, andmessagecolumns: a row for each file, withmessageempty, then a row for each window whose files could not be had, withfileempty. No row has amessagewhen every file is there. Empty when no simulation is left to run.stilt fetchprints it.- Return type:
- Raises:
ValueError – If
config.yamlorreceptors.csvis invalid.FileNotFoundError – If the directory of a met without
downloadholds no ARL file, which names the output folder of its runs.ImportError – If a met downloads and the
downloadextra is not installed.OSError – If a download fails for any reason but a missing file, such as a busy archive or a full disk, and so does a connection error of the download library.
stilt fetchexits with 3 or 4.
Examples
>>> files = project.fetch() >>> files.message.isna().all() # True when every file is there >>> project.run() # downloads nothing