def main(): """Set up and run the worker. For command-line usage see: :command:`python -m nowcast.workers.run_NEMO_hindcast --help` """ worker = NowcastWorker(NAME, description=__doc__) worker.init_cli() worker.cli.add_argument("host_name", help="Name of the host to queue the run on") worker.cli.add_argument( "--full-month", action="store_true", help=""" Configure the hindcast run to be a calendar month in duration. The default run duration is 10 days, or the number of days remaining in the calendar month of the run. """, ) worker.cli.add_argument("--prev-run-date", default=None, help="Start date of the previous hindcast run.") worker.cli.add_argument( "--walltime", default=None, help=""" Walltime to request for the hindcast run. Defaults to 10 hours (10:00:00) for 10-ish day runs, and 30 hours (30:00:00) for --full-month runs. **IMPORTANT: Use seconds for walltime values greater than 23:59:59** """, ) worker.run(run_NEMO_hindcast, success, failure)
def main(): """Set up and run the worker. For command-line usage see: :command:`python -m nowcast.workers.run_NEMO --help` """ worker = NowcastWorker(NAME, description=__doc__) worker.init_cli() worker.cli.add_argument("host_name", help="Name of the host to execute the run on") worker.cli.add_argument( "run_type", choices={ "nowcast", "nowcast-green", "nowcast-dev", "forecast", "forecast2" }, help=""" Type of run to execute: 'nowcast' means nowcast physics run, 'nowcast-green' means nowcast green ocean run, 'nowcast-dev' means nowcast physics run with in-development features, 'forecast' means updated forecast run, 'forecast2' means preliminary forecast run, """, ) worker.cli.add_date_option( "--run-date", default=arrow.now().floor("day"), help="Date to execute the run for.", ) worker.run(run_NEMO, success, failure)
def main(): """Set up and run the worker. For command-line usage see: :command:`python -m nowcast.workers.make_ww3_current_file --help` """ worker = NowcastWorker(NAME, description=__doc__) worker.init_cli() worker.cli.add_argument( 'host_name', help='Name of the host to create the currents file on') worker.cli.add_argument( 'run_type', choices={'forecast2', 'forecast'}, help=''' Type of run to create the currents file for: 'forecast2' means preliminary forecast run (after NEMO forecast2 run), 'forecast' means updated forecast run (after NEMO forecast run) ''', ) worker.cli.add_date_option( '--run-date', default=arrow.now().floor('day'), help='Start date of run to create the currents file for.') worker.run(make_ww3_current_file, success, failure)
def main(): """Set up and run the worker. For command-line usage see: :command:`python -m nowcast.workers.run_NEMO --help` """ worker = NowcastWorker(NAME, description=__doc__) worker.init_cli() worker.cli.add_argument('host_name', help='Name of the host to execute the run on') worker.cli.add_argument( 'run_type', choices={ 'nowcast', 'nowcast-green', 'nowcast-dev', 'forecast', 'forecast2' }, help=''' Type of run to execute: 'nowcast' means nowcast physics run, 'nowcast-green' means nowcast green ocean run, 'nowcast-dev' means nowcast physics run with in-development features, 'forecast' means updated forecast run, 'forecast2' means preliminary forecast run, ''', ) worker.cli.add_date_option('--run-date', default=arrow.now().floor('day'), help='Date to execute the run for.') worker.run(run_NEMO, success, failure)
def main(): worker = NowcastWorker(NAME, description=__doc__) worker.init_cli() worker.cli.add_argument( "host_name", help="Name of the host to download results files from") worker.cli.add_argument( "run_type", choices={ "nowcast", "nowcast-green", "forecast", "forecast2", "hindcast", "nowcast-agrif", }, help="Type of run to download results files from.", ) worker.cli.add_argument( "--dest-host", default="localhost", help= "Name of the host to download results files to. Default is :kbd:`localhost`.", ) worker.cli.add_date_option( "--run-date", default=arrow.now().floor("day"), help="Date of the run to download results files from.", ) worker.run(download_results, success, failure) return worker
def main(): """Set up and run the worker. For command-line usage see: :command:`python -m nowcast.workers.make_fvcom_atmos_forcing --help` """ worker = NowcastWorker(NAME, description=__doc__) worker.init_cli() worker.cli.add_argument( "model_config", choices={"r12", "x2"}, help=""" Model configuration to make atmospheric forcing file for: 'r12' means the r12 resolution 'x2' means the x2 resolution """, ) worker.cli.add_argument( "run_type", choices={"nowcast", "forecast"}, help=""" Type of run to make atmospheric forcing file for: 'nowcast' means run for present UTC day (after NEMO nowcast run), 'forecast' means updated forecast run (next 36h UTC, after NEMO forecast run) """, ) worker.cli.add_date_option( "--run-date", default=arrow.now().floor("day"), help="Date to make atmospheric forcing file for.", ) worker.run(make_fvcom_atmos_forcing, success, failure)
def main(): """Set up and run the worker. For command-line usage see: :command:`python -m nowcast.workers.make_CHS_currents_file --help` """ worker = NowcastWorker(NAME, description=__doc__) worker.init_cli() worker.cli.add_argument( "run_type", choices={"nowcast", "forecast", "forecast2"}, help=""" Type of run the velocities come from: 'nowcast' means velocities stored in nowcast-blue directory 'forecast' means velocities stored in forecast directory 'forecast2' means velocities stored in forecast2 directory """, ) worker.cli.add_date_option( "--run-date", default=arrow.now().floor("day"), help="Date to process the velocities for.", ) worker.run(make_CHS_currents_file, success, failure)
def main(): """Set up and run the worker. For command-line usage see: :command:`python -m nowcast.workers.watch_NEMO --help` """ worker = NowcastWorker(NAME, description=__doc__) worker.init_cli() worker.cli.add_argument("host_name", help="Name of the host to monitor the run on") worker.cli.add_argument( "run_type", choices={ "nowcast", "nowcast-green", "nowcast-dev", "forecast", "forecast2" }, help=""" Type of run to monitor: 'nowcast' means nowcast physics run, 'nowcast-green' means nowcast green ocean run, 'forecast' means updated forecast run, 'forecast2' means preliminary forecast run, """, ) worker.run(watch_NEMO, success, failure)
def main(): """Set up and run the worker. For command-line usage see: :command:`python -m nowcast.workers.upload_forcing --help` """ worker = NowcastWorker(NAME, description=__doc__) worker.init_cli() worker.cli.add_argument( "host_name", help="Name of the host to upload forcing files to" ) worker.cli.add_argument( "run_type", choices={"nowcast+", "forecast2", "ssh", "turbidity"}, help=""" Type of run to upload files for: 'nowcast+' means nowcast & 1st forecast runs, 'forecast2' means 2nd forecast run, 'ssh' means Neah Bay sea surface height files only (for forecast run), 'turbidity' means Fraser River turbidity file only (for nowcast-green run). """, ) worker.cli.add_date_option( "--run-date", default=arrow.now().floor("day"), help="Date of the run to upload files for.", ) worker.run(upload_forcing, success, failure) return worker
def main(): """Set up and run the worker. For command-line usage see: :command:`python -m nowcast.workers.make_ww3_wind_file --help` """ worker = NowcastWorker(NAME, description=__doc__) worker.init_cli() worker.cli.add_argument( "host_name", help="Name of the host to create the wind file on" ) worker.cli.add_argument( "run_type", choices={"forecast2", "forecast", "nowcast"}, help=""" Type of run to create wind file for: 'forecast2' means preliminary forecast run (after NEMO forecast2 run), 'forecast' means updated forecast run (after NEMO forecast run), 'nowcast' means updated 1 day only (for hindcast runs) """, ) worker.cli.add_date_option( "--run-date", default=arrow.now().floor("day"), help="Start date of run to create the wind file for.", ) worker.run(make_ww3_wind_file, success, failure)
def main(): """Set up and run the worker. For command-line usage see: :command:`python -m nowcast.workers.run_NEMO_agrif --help` """ worker = NowcastWorker(NAME, description=__doc__) worker.init_cli() worker.cli.add_argument("host_name", help="Name of the host to queue the run on") worker.cli.add_argument( "run_type", choices={"nowcast-agrif"}, help=""" Type of run to execute: 'nowcast-agrif' means nowcast green ocean run with AGRIF sub-grids """, ) worker.cli.add_date_option( "--run-date", default=arrow.now().floor("day"), help="Date to execute the run for.", ) worker.run(run_NEMO_agrif, success, failure)
def main(): """Set up and run the worker. For command-line usage see: :command:`python -m nowcast.workers.collect_weather --help` """ worker = NowcastWorker(NAME, description=__doc__) worker.init_cli() worker.cli.add_argument( "forecast", choices={"00", "06", "12", "18"}, help="Name of forecast to collect files for.", ) worker.cli.add_argument( "resolution", choices={"1km", "2.5km"}, default="2.5km", help="Horizontal resolution of forecast to download files from.", ) worker.cli.add_argument( "--backfill", action="store_true", help="Download forecast files for previous day's date.", ) worker.cli.add_date_option( "--backfill-date", default=arrow.now().floor("day").shift(days=-1), help="Prior date to collect forecast files for.", ) worker.run(collect_weather, success, failure) return worker
def main(): """Set up and run the worker. For command-line usage see: :command:`python -m nowcast.workers.make_forcing_links --help` """ worker = NowcastWorker(NAME, description=__doc__) worker.init_cli() worker.cli.add_argument( 'host_name', help='Name of the host to symlink forcing files on') worker.cli.add_argument( 'run_type', choices={'nowcast+', 'forecast2', 'ssh', 'nowcast-green'}, help=''' Type of run to symlink files for: 'nowcast+' means nowcast & 1st forecast runs, 'forecast2' means 2nd forecast run, 'ssh' means Neah Bay sea surface height files only (for forecast run). 'nowcast-green' means nowcast green ocean run, ''') worker.cli.add_argument('--shared-storage', action='store_true', help=''' If running on a machine (Salish) that directly accesses the repo datafiles, copy the forcing files instead of symlinking them so that they do not get changed as a result of preparations for faster runs on remote hosts ''') worker.cli.add_date_option('--run-date', default=(arrow.now().floor('day')), help='Date of the run to symlink files for.') worker.run(make_forcing_links, success, failure)
def main(): """Set up and run the worker. For command-line usage see: :command:`python -m nowcast.workers.watch_fvcom --help` """ worker = NowcastWorker(NAME, description=__doc__) worker.init_cli() worker.cli.add_argument("host_name", help="Name of the host to monitor the run on") worker.cli.add_argument( "model_config", choices={"r12", "x2"}, help=""" Model configuration to monitor run for for: 'r12' means the r12 resolution 'x2' means the x2 resolution """, ) worker.cli.add_argument( "run_type", choices={"nowcast", "forecast"}, help=""" Type of run to monitor: 'nowcast' means nowcast run (after NEMO nowcast run) 'forecast' means updated forecast run (next 36h UTC, after NEMO forecast run) """, ) worker.run(watch_fvcom, success, failure)
def main(): """Set up and run the worker. For command-line usage see: :command:`python -m nowcast.workers.update_forecast_datasets -h` """ worker = NowcastWorker(NAME, description=__doc__) worker.init_cli() worker.cli.add_argument( "model", choices={"fvcom", "nemo", "wwatch3"}, help=""" Model to update the rolling forecast datasets for: 'fvcom' means the Vancouver Harbour Fraser River (VHFR) FVCOM model, 'nemo' means the Salish Sea NEMO model, 'wwatch3' means the Strait of Georgia WaveWatch3(TM) model. """, ) worker.cli.add_argument( "run_type", choices={"forecast", "forecast2"}, help=""" Type of run to update rolling forecast datasets for: 'forecast' means afternoon updated forecast runs, 'forecast2' means early morning preliminary forecast runs, """, ) worker.cli.add_date_option( "--run-date", default=(arrow.now().floor("day")), help="Date of the run to update rolling forecast datasets for.", ) worker.run(update_forecast_datasets, success, failure)
def main(): """Set up and run the worker. For command-line usage see: :command:`python -m nowcast.workers.watch_NEMO --help` """ worker = NowcastWorker(NAME, description=__doc__) worker.init_cli() worker.cli.add_argument( 'host_name', help='Name of the host to monitor the run on') worker.cli.add_argument( 'run_type', choices={ 'nowcast', 'nowcast-green', 'nowcast-dev', 'forecast', 'forecast2'}, help=''' Type of run to monitor: 'nowcast' means nowcast physics run, 'nowcast-green' means nowcast green ocean run, 'forecast' means updated forecast run, 'forecast2' means preliminary forecast run, ''', ) worker.cli.add_argument( 'pid', type=int, help='PID of the NEMO run bash script to monitor.' ) worker.run(watch_NEMO, success, failure)
def main(): """Set up and run the worker. For command-line usage see: :command:`python -m nowcast.workers.download_fvcom_results --help` """ worker = NowcastWorker(NAME, description=__doc__) worker.init_cli() worker.cli.add_argument( "host_name", help="Name of the host to download results files from") worker.cli.add_argument( "model_config", choices={"r12", "x2"}, help=""" Model configuration to download results files from: 'r12' means the r12 resolution 'x2' means the x2 resolution """, ) worker.cli.add_argument( "run_type", choices={"nowcast", "forecast"}, help="Type of run to download results files from.", ) worker.cli.add_date_option( "--run-date", default=arrow.now().floor("day"), help="Date of the run to download results files from.", ) worker.run(download_fvcom_results, success, failure)
def main(): """Set up and run the worker. For command-line usage see: :command:`python -m nowcast.workers.run_ww3 --help` """ worker = NowcastWorker(NAME, description=__doc__) worker.init_cli() worker.cli.add_argument("host_name", help="Name of the host to execute the run on") worker.cli.add_argument( "run_type", choices={"forecast2", "nowcast", "forecast"}, help=""" Type of run to execute: 'forecast2' means preliminary forecast run (after NEMO forecast2 run), 'nowcast' means nowcast run (after NEMO forecast run) 'forecast' means updated forecast run (after WaveWatch3 forecast run) """, ) worker.cli.add_date_option( "--run-date", default=arrow.now().floor("day"), help="Date to execute the run for.", ) worker.run(run_ww3, success, failure) return worker
def main(): """Set up and run the worker. For command-line usage see: :command:`python -m nemo_nowcast.workers.awaken --help` """ worker = NowcastWorker(NAME, description=__doc__, package="nemo_nowcast.workers") worker.init_cli() worker.run(awaken, success, failure)
def main(): """Set up and run the worker. For command-line usage see: :command:`python -m nowcast.workers.make_runoff_file --help` """ worker = NowcastWorker(NAME, description=__doc__) worker.init_cli() worker.cli.add_date_option( '--run-date', default=arrow.now().floor('day'), help='Date of the run to produce runoff file for.') worker.run(make_runoff_file, success, failure)
def main(): """Set up and run the worker. For command-line usage see: :command:`python -m nowcast.workers.watch_NEMO_hindcast --help` """ worker = NowcastWorker(NAME, description=__doc__) worker.init_cli() worker.cli.add_argument("host_name", help="Name of the host to monitor the run on") worker.cli.add_argument("--run-id", help="Run id to watch; e.g. 01dec14hindcast") worker.run(watch_NEMO_hindcast, success, failure)
def main(): """Set up and run the worker. For command-line usage see: :command:`python -m nowcast.workers.watch_NEMO_agrif --help` """ worker = NowcastWorker(NAME, description=__doc__) worker.init_cli() worker.cli.add_argument("host_name", help="Name of the host to monitor the run on") worker.cli.add_argument("job_id", help="Job identifier of the job to monitor") worker.run(watch_NEMO_agrif, success, failure)
def main(): """Set up and run the worker. For command-line usage see: :command:`python -m nowcast.workers.download_live_ocean -h` """ worker = NowcastWorker(NAME, description=__doc__) worker.init_cli() worker.cli.add_date_option( '--run-date', default=arrow.now().floor('day'), help='Date to download the Live Ocean forecast product for.') worker.run(download_live_ocean, success, failure)
def main(): """Set up and run the worker. For command-line usage see: :command:`python -m nowcast.workers.make_plots --help` """ worker = NowcastWorker(NAME, description=__doc__) worker.init_cli() worker.cli.add_argument( 'run_type', choices={'nowcast', 'nowcast-green', 'forecast', 'forecast2'}, help=''' Type of run to produce plots for: 'nowcast' means nowcast physics-only runs, 'nowcast-green' means nowcast-green physics/biology runs 'forecast' means forecast physics-only runs, 'forecast2' means forecast2 preliminary forecast physics-only runs. ''', ) worker.cli.add_argument('plot_type', choices={'publish', 'research', 'comparison'}, help=''' Which type of plots to produce: "publish" means ssh, weather and other approved plots for publishing, "research" means tracers, currents and other research plots "comparison" means ferry salinity plots ''') worker.cli.add_date_option('--run-date', default=arrow.now().floor('day'), help='Date of the run to symlink files for.') worker.cli.add_argument( '--test-figure', help='''Identifier for a single figure to do a test on. The identifier may be the svg_name of the figure used in make_plots (e.g. SH_wind is the svg_name of figures stored as SH_wind_{ddmmmyy}.svg), the name of the website figure module (e.g. storm_surge_alerts is the module name of nowcast.figures.publish.storm_surge_alerts), or name of the figure function for legacy nowcast.figures.figures functions (e.g. Sandheads_winds is the function name of nowcast.figures.figures.Sandheads_winds). The figure will be rendered in /results/nowcast-sys/figures/test/{run_type}/{ddmmmyy}/ so that it is accessible in a browser at https://salishsea.eos.ubc.ca/{run_type}/{ddmmmyy}/{svg_name}_{ddmmyy}.svg ''') worker.run(make_plots, success, failure)
def main(): """Set up and run the worker. For command-line usage see: :command:`python -m nowcast.workers.get_vfpa_hadcp --help` """ worker = NowcastWorker(NAME, description=__doc__) worker.init_cli() worker.cli.add_date_option( "--data-date", default=arrow.now().floor("day"), help="UTC date to get VFPA HADPC data for.", ) worker.run(get_vfpa_hadcp, success, failure)
def main(): """Set up and run the worker. For command-line usage see: :command:`python -m nowcast.workers.make_turbidity_file --help` """ worker = NowcastWorker(NAME, description=__doc__) worker.init_cli() worker.cli.add_date_option( "--run-date", default=arrow.now().floor("day"), help="Date of the run to produce turbidity file for.", ) worker.run(make_turbidity_file, success, failure)
def main(): worker = NowcastWorker(NAME, description=__doc__) worker.init_cli() worker.cli.add_argument( 'run_type', choices={'forecast', 'forecast2'}, help=''' Type of run to create feeds for: 'forecast' means updated forecast run, 'forecast2' means preliminary forecast run, ''', ) worker.cli.add_date_option('--run-date', default=arrow.now().floor('day'), help='Date of the run to create feeds for.') worker.run(make_feeds, success, failure)
def main(): worker = NowcastWorker(NAME, description=__doc__) worker.init_cli() worker.cli.add_argument( "host_name", help="Name of the host to download results files from") worker.cli.add_argument( "run_type", choices={"nowcast", "forecast", "forecast2"}, help="Type of run to download results files from.", ) worker.cli.add_date_option( "--run-date", default=arrow.now().floor("day"), help="Date of the run to download results files from.", ) worker.run(download_wwatch3_results, success, failure)
def main(): """Set up and run the worker. For command-line usage see: :command:`python -m nowcast.workers.ping_erddap --help` """ worker = NowcastWorker(NAME, description=__doc__) worker.init_cli() worker.cli.add_argument( "dataset", choices={ "weather", "SCVIP-CTD", "SEVIP-CTD", "USDDL-CTD", "TWDP-ferry", "VFPA-HADCP", "nowcast-green", "nemo-forecast", "wwatch3-forecast", "fvcom-x2-nowcast", "fvcom-r12-nowcast", "fvcom-forecast", }, help=""" Type of dataset to notify ERDDAP of: 'weather' means atmospheric forcing downloaded & processed, 'SCVIP-CTD' means ONC SCVIP node CTD T&S observations downloaded & processed, 'SEVIP-CTD' means ONC SEVIP node CTD T&S observations downloaded & processed, 'USDDL-CTD' means ONC USDDL node CTD T&S observations downloaded & processed, 'TWDP-ferry' means ONC Tsawwassen/Duke Pt. ferry observations downloaded & processed, 'VFPA-HADCP' means VFPA 2nd Narrows Rail Bridge HADCP observations processed, 'nowcast-green' means nowcast green ocean run, 'nemo-forecast' means updated NEMO rolling forecast, 'wwatch3-forecast' means updated WaveWatch3 rolling forecast, 'fvcom-x2-nowcast' means updated VHFR FVCOM x2 nowcast run, 'fvcom-r12-nowcast' means updated VHFR FVCOM r12 nowcast run, 'fvcom-forecast' means updated VHFR FVCOM x2 rolling forecast """, ) worker.run(ping_erddap, success, failure) return worker
def main(): """Set up and run the worker. For command-line usage see: :command:`python -m nowcast.workers.make_live_ocean_files -h` """ worker = NowcastWorker(NAME, description=__doc__) worker.init_cli() worker.cli.add_date_option( "--run-date", default=arrow.now().floor("day"), help=""" Date of Live Ocean forecast product to produce files from. """, ) worker.run(make_live_ocean_files, success, failure)