job_tasks module¶
Collection of Job related functions wrapped as Prefect Tasks
-
job_tasks.
baseline_from_Job
(job: cloudflow.job.Job.Job)¶ Provides a list of the verification files that match the parameters provided by the Job object
- Parameters
job (Job) – The Job object. Must contain SOURCE and filespec attributes.
- Returns
FILES – A list of files located at SOURCE that match the filespec
- Return type
list of str
-
job_tasks.
daskmake_diff_plots
(client: distributed.client.Client, EXPERIMENT: list, BASELINE: list, job: cloudflow.job.Job.Job)¶ Create difference plots using a Dask distributed Client
- Parameters
client (distributed.Client) – The Dask Client to use for running the job
EXPERIMENT (list of str) – The local forecast output files.
BASELINE (list of str) – The list of operational verification forecast output files.
job (Job) –
-
job_tasks.
daskmake_mpegs
(client: distributed.client.Client, job: cloudflow.job.Job.Job, diff: bool = False)¶ Create mpegs from plots
- Parameters
client (distributed.Client) – The Dask Client to use for running the job
job (Job) –
diff (bool) – True - create mpegs from the difference plots False - create mpegs from the forecast plots
-
job_tasks.
daskmake_plots
(client: distributed.client.Client, FILES: list, job: cloudflow.job.Job.Job)¶ Create plots using a Dask distributed Client
- Parameters
client (distributed.Client) – The Dask Client to use for running the job
FILES (list of str) – The source input files.
job (Job) –
-
job_tasks.
get_baseline
(job: cloudflow.job.Job.Job, sshuser=None)¶ Retrieve operational forecast files for comparison to quasi-operational forecasts
- Parameters
job (Job) – The Job object.
sshuser (str) – The user and host to use for retrieving data from a remote server. Required for LiveOcean.
-
job_tasks.
get_forcing
(job: cloudflow.job.Job.Job, sshuser=None)¶ Retrieve operational moddel forcing data and initial conditions
- Parameters
job (Job) – The Job object.
sshuser (str) – The user and host to use for retrieving data from a remote server. Required for LiveOcean.
-
job_tasks.
ncfiles_from_Job
(job: cloudflow.job.Job.Job)¶ Provides a list of files that match the parameters provided by the Job object
- Parameters
job (Job) – The Job object. Must contain SOURCE and filespec attributes.
- Returns
FILES – A list of files located at SOURCE that match the filespec
- Return type
list of str
-
job_tasks.
ncfiles_glob
(SOURCE, filespec: str = '*.nc')¶ Provides a list of files that match the parameters
- Parameters
SOURCE (str) – A pathname to the files
filespec (str) – A regular expression of the files to include
- Returns
FILES – A list of files located at SOURCE that match the filespec
- Return type
list of str