diff --git a/config/nowcast.yaml b/config/nowcast.yaml index b064d395..7bc926d8 100644 --- a/config/nowcast.yaml +++ b/config/nowcast.yaml @@ -292,14 +292,10 @@ run types: land processor elimination: bathymetry_202108.csv duration: 1 # day restart from: nowcast-green + ### retained because plots for nowcast-dev haven't been removed from + ### make_plots.make_plots() yet nowcast-dev: - config name: SalishSeaCast_Blue - coordinates: coordinates_seagrid_SalishSea201702.nc - bathymetry: bathymetry_201702.nc mesh mask: mesh_mask201702.nc - land processor elimination: bathymetry_201702.csv - duration: 1 # day - restart from: nowcast-dev nowcast-green: config name: SalishSeaCast coordinates: coordinates_seagrid_SalishSea201702.nc @@ -340,6 +336,9 @@ results archive: # Values are directories on results server where run results are stored # in ddmmmyy/ directories. nowcast: /results/SalishSea/nowcast-blue.202111/ + ### retained until make_plots is refactored to remove nowcast-dev + ### that refactoring needs to come after compare_venus_ctd fig module is updated + ### to handle ONC API v3 nowcast-dev: /results/SalishSea/nowcast-dev.201905/ forecast: /results/SalishSea/forecast.202111/ forecast2: /results/SalishSea/forecast2.202111/ @@ -623,34 +622,13 @@ run: weather dir: /nemoShare/MEOPAR/GEM2.5/ops/NEMO-atmos/ salish-nowcast: - shared storage: True - make forcing links: True + ### retained because workers.test_upload_forcing.TestConfig.test_ssh_keys() needs + ### to find this item for every enabled host ssh key: SalishSeaNEMO-nowcast_id_rsa - envvars: /SalishSeaCast/nowcast-env/etc/conda/activate.d/envvars.sh - python: /SalishSeaCast/nowcast-env/bin/python3 - config file: /SalishSeaCast/SalishSeaNowcast/config/nowcast.yaml - run prep dir: /SalishSeaCast/runs/ + ### retained because next_workers needs to know until salish is fully removed + shared storage: True + ### retained because make_*_runoff_file workers use this to get grid files grid dir: /SalishSeaCast/grid/ - salishsea_cmd: /SalishSeaCast/nowcast-env/bin/salishsea - job exec cmd: qsub - # Optional email address to which to send notifications of the beginning - # and end of execution of the run, as well as notification of abnormal - # abort messages. - email: sallen@eoas.ubc.ca - run types: - nowcast-dev: - run sets dir: /SalishSeaCast/SS-run-sets/v201905/nowcast-dev/ - mpi decomposition: 1x7 - walltime: 23:30:00 - results: /results/SalishSea/nowcast-dev.201905/ - nowcast-green: - results: /results2/SalishSea/nowcast-green.201905/ - forcing: - ssh dir: /results/forcing/sshNeahBay/ - bc dir: /results/forcing/LiveOcean/boundary_conditions/ - rivers dir: /results/forcing/rivers/ - bottom friction mask: /SalishSeaCast/grid/jetty_mask_bathy201702.nc - weather dir: /results/forcing/atmospheric/continental2.5/nemo_forcing/ orcinus-nowcast-agrif: ssh key: SalishSeaNEMO-nowcast_id_rsa @@ -1372,8 +1350,6 @@ message registry: failure nowcast: nowcast NEMO run failed success nowcast-green: nowcast-green NEMO run started failure nowcast-green: nowcast-green NEMO run failed - success nowcast-dev: nowcast-dev NEMO run started - failure nowcast-dev: nowcast-dev NEMO run failed success forecast: forecast NEMO run started failure forecast: forecast NEMO run failed success forecast2: forecast2 NEMO run started @@ -1399,8 +1375,6 @@ message registry: failure nowcast: nowcast watch_NEMO failed success nowcast-green: nowcast-green NEMO run ended failure nowcast-green: nowcast-green watch_NEMO failed - success nowcast-dev: nowcast-dev NEMO run ended - failure nowcast-dev: nowcast-dev watch_NEMO failed success forecast: forecast NEMO run ended failure forecast: forecast watch_NEMO failed success forecast2: forecast2 NEMO run ended diff --git a/docs/deployment/index.rst b/docs/deployment/index.rst index c6170b9a..f803e0f5 100644 --- a/docs/deployment/index.rst +++ b/docs/deployment/index.rst @@ -23,7 +23,7 @@ Nowcast Production Deployments ****************************** In October 2016 the production deployment of the nowcast system was changed to use the :ref:`SalishSeaNowcast-repo` package that is based on the `NEMO_Nowcast framework`_ framework. -The production deployment uses 3 systems: +The production deployment uses 2 systems: .. _NEMO_Nowcast framework: https://nemo-nowcast.readthedocs.io/en/latest/ @@ -32,14 +32,6 @@ The production deployment uses 3 systems: :py:mod:`nemo_nowcast.log_aggregator`, most of the pre- and post-processing workers run on the :ref:`SalishSeaModelResultsServer`, :kbd:`skookum`, where the deployment is in the :file:`/SalishSeaCast/` directory tree. -#. The development compute server, - :kbd:`salish`, - is used to run the daily development model run, - :kbd:`nowcast-dev` NEMO-3.6 model run. - :kbd:`salish` and :kbd:`skookum` share storage via NFS mounts, - so, - :kbd:`salish` uses the same deployment in the :file:`/SalishSeaCast/` directory tree. - #. The daily :kbd:`forecast2` (preliminary forecast), @@ -73,13 +65,13 @@ The production deployment uses 3 systems: .. _arbutus.cloud: https://docs.alliancecan.ca/wiki/Cloud_resources#Arbutus_cloud .. _Ceph object storage: https://en.wikipedia.org/wiki/Ceph_(software) -These sections describe the setup of the nowcast system on :kbd:`skookum`/:kbd:`salish` and :kbd:`arbutus.cloud`, -and it operation. +These sections describe the setup of the nowcast system on :kbd:`skookum` and :kbd:`arbutus.cloud`, +and their operation. .. toctree:: :maxdepth: 2 - skookum_salish + skookum arbutus_cloud operations @@ -106,3 +98,10 @@ The setup on :kbd:`optimum` is described in: See also the `#optimum-cluster`_ Slack channel. .. _#optimum-cluster: https://salishseacast.slack.com/?redir=%2Farchives%2FC011S7BCWGK + +With the update of the production to run the V21-11 model version in January 2024, +we decided to end the daily :kbd:`nowcast-dev` development model runs on :kbd:`salish`. +Development is now generally done in research runs on :kbd:`graham`. +:kbd:`salish` is now mostly used for analysis tasks, post-processing of NEMO model results files +to produce day-average and month-average dataset files, +and Lagrangian particle tracking analysis with :program:`ariane` and :program:`OceanParcels`. diff --git a/docs/deployment/skookum_salish.rst b/docs/deployment/skookum.rst similarity index 91% rename from docs/deployment/skookum_salish.rst rename to docs/deployment/skookum.rst index 662e8f9d..7107c547 100644 --- a/docs/deployment/skookum_salish.rst +++ b/docs/deployment/skookum.rst @@ -16,11 +16,11 @@ .. SPDX-License-Identifier: Apache-2.0 -.. _SkookumSalishDeployment: +.. _SkookumDeployment: -*************************************** -:kbd:`skookum`/:kbd:`salish` Deployment -*************************************** +************************ +:kbd:`skookum`Deployment +************************ Git Repositories ================ @@ -47,42 +47,6 @@ Clone the following repos into :file:`/SalishSeaCast/`: $ git clone git@github.com:SalishSeaCast/tracers.git $ git clone git@gitlab.com:mdunphy/FVCOM-VHFR-config.git $ git clone git@gitlab.com:douglatornell/OPPTools.git - $ git clone git@github.com:SalishSeaCast/NEMO-3.6-code.git - $ git clone git@github.com:SalishSeaCast/XIOS-ARCH.git - $ git clone git@github.com:SalishSeaCast/XIOS-2.git - - -Build XIOS-2 -============ - -Symlink the XIOS-2 build configuration files for :kbd:`salish` from the -:file:`XIOS-ARCH` repo clone into the :file:`XIOS-2/arch/` directory: - -.. code-block:: bash - - $ cd /SalishSeaCast/XIOS-2/arch - $ ln -s ../../XIOS-ARCH/UBC-EOAS/arch-GCC_SALISH.fcm - $ ln -s ../../XIOS-ARCH/UBC-EOAS/arch-GCC_SALISH.path - -:command:`ssh` to :kbd:`salish` and build XIOS-2 with: - -.. code-block:: bash - - $ cd /SalishSeaCast/XIOS-2 - $ ./make_xios --arch GCC_SALISH --netcdf_lib netcdf4_seq --job 8 - - -Build NEMO-3.6 -============== - -Build NEMO-3.6 and :program:`rebuild_nemo.exe`: - -.. code-block:: bash - - $ cd /SalishSeaCast/NEMO-3.6-code/NEMOGCM/CONFIG - $ XIOS_HOME=/SalishSeaCast/XIOS-2 ./makenemo -m GCC_SALISH -n SalishSeaCast_Blue -j8 - $ cd /SalishSeaCast/NEMO-3.6-code/NEMOGCM/TOOLS/ - $ XIOS_HOME=/SalishSeaCast/XIOS-2 ./maketools -m GCC_SALISH -n REBUILD_NEMO Python Packages @@ -264,9 +228,6 @@ On the hosts where the nowcast system NEMO runs will be executed create a The hosts and their :file:`runs` directories presently in use are: -* :kbd:`salish` - :file:`/SalishSeaCast/runs/` - * :kbd:`arbutus.cloud` See :ref:`ArbutusCloudNEMORunsDirectory` diff --git a/nowcast/next_workers.py b/nowcast/next_workers.py index 6b3975a2..4072c89f 100644 --- a/nowcast/next_workers.py +++ b/nowcast/next_workers.py @@ -667,19 +667,17 @@ def after_make_forcing_links(msg, config, checklist): "failure nowcast+": [], "failure nowcast-green": [], "failure nowcast-agrif": [], - "failure nowcast-dev": [], "failure forecast2": [], "failure ssh": [], "success nowcast+": [], "success nowcast-green": [], "success nowcast-agrif": [], - "success nowcast-dev": [], "success forecast2": [], "success ssh": [], } if msg.type.startswith("success"): run_types = { - "nowcast+": ("nowcast", "nowcast-dev"), + "nowcast+": ("nowcast",), "nowcast-green": ("nowcast-green",), "nowcast-agrif": ("nowcast-agrif",), "ssh": ("forecast",), @@ -738,12 +736,10 @@ def after_run_NEMO(msg, config, checklist): "crash": [], "failure nowcast": [], "failure nowcast-green": [], - "failure nowcast-dev": [], "failure forecast": [], "failure forecast2": [], "success nowcast": [], "success nowcast-green": [], - "success nowcast-dev": [], "success forecast": [], "success forecast2": [], } @@ -777,12 +773,10 @@ def after_watch_NEMO(msg, config, checklist): "crash": [], "failure nowcast": [], "failure nowcast-green": [], - "failure nowcast-dev": [], "failure forecast": [], "failure forecast2": [], "success nowcast": [], "success nowcast-green": [], - "success nowcast-dev": [], "success forecast": [], "success forecast2": [], } @@ -849,16 +843,6 @@ def after_watch_NEMO(msg, config, checklist): ], ) ) - if run_type == "nowcast-green": - for host in config["run"]["enabled hosts"]: - run_types = config["run"]["enabled hosts"][host]["run types"] - if "nowcast-dev" in run_types: - next_workers[msg.type].append( - NextWorker( - "nowcast.workers.make_forcing_links", - args=[host, "nowcast+", "--shared-storage"], - ) - ) if run_type == "forecast2": host_name = config["wave forecasts"]["host"] run_date = arrow.get(msg.payload[run_type]["run date"]).shift(days=+1) diff --git a/nowcast/workers/run_NEMO.py b/nowcast/workers/run_NEMO.py index 9b089d14..7fde74c4 100644 --- a/nowcast/workers/run_NEMO.py +++ b/nowcast/workers/run_NEMO.py @@ -12,10 +12,8 @@ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. -"""SalishSeaCast worker that prepares the YAML run -description file and bash run script for a nowcast, nowcast-green, nowcast-dev, -forecast or forecast2 run on the ONC cloud or salish, -and launches the run. +"""SalishSeaCast worker that prepares the YAML run description file and bash run script +for a nowcast, nowcast-green, forecast or forecast2 run on the ONC cloud, and launches the run. """ import logging import os @@ -49,12 +47,11 @@ def main(): 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"}, + choices={"nowcast", "nowcast-green", "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, """, @@ -145,7 +142,6 @@ def _create_run_desc_file(run_date, run_type, host_name, config): run_days = { "nowcast": run_date, "nowcast-green": run_date, - "nowcast-dev": run_date, "forecast": run_date.shift(days=1), "forecast2": run_date.shift(days=2), } @@ -170,7 +166,6 @@ def _update_time_namelist(run_date, run_type, run_duration, host_config, run_pre # run-type: based-on run-type, date offset "nowcast": ("nowcast", -1), "nowcast-green": ("nowcast-green", -1), - "nowcast-dev": ("nowcast-dev", -1), "forecast": ("nowcast", 0), "forecast2": ("forecast", 0), } @@ -207,7 +202,6 @@ def _calc_new_namelist_lines( run_date_offset = { "nowcast": 0, "nowcast-green": 0, - "nowcast-dev": 0, "forecast": 1, "forecast2": 2, } @@ -246,7 +240,6 @@ def _run_description(run_date, run_type, run_id, restart_timestep, host_name, co # run-type: previous run's ddmmmyy results directory name "nowcast": run_date.shift(days=-1).format("DDMMMYY").lower(), "nowcast-green": run_date.shift(days=-1).format("DDMMMYY").lower(), - "nowcast-dev": run_date.shift(days=-1).format("DDMMMYY").lower(), "forecast": run_date.shift(days=-1).format("DDMMMYY").lower(), "forecast2": run_date.shift(days=-2).format("DDMMMYY").lower(), } @@ -346,9 +339,7 @@ def _run_description(run_date, run_type, run_id, restart_timestep, host_name, co grid_dir / config["run types"][run_type]["bathymetry"] ) lpe_filename = config["run types"][run_type]["land processor elimination"] - run_desc["grid"]["land processor elimination"] = ( - False if host_name == "salish-nowcast" else os.fspath(grid_dir / lpe_filename) - ) + run_desc["grid"]["land processor elimination"] = os.fspath(grid_dir / lpe_filename) run_desc["restart"] = restart_filepaths run_desc["output"].update( { diff --git a/nowcast/workers/watch_NEMO.py b/nowcast/workers/watch_NEMO.py index 9a02f770..ee8895db 100644 --- a/nowcast/workers/watch_NEMO.py +++ b/nowcast/workers/watch_NEMO.py @@ -44,7 +44,7 @@ def main(): 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"}, + choices={"nowcast", "nowcast-green", "forecast", "forecast2"}, help=""" Type of run to monitor: 'nowcast' means nowcast physics run, diff --git a/tests/test_next_workers.py b/tests/test_next_workers.py index cbb97d71..1fecc832 100644 --- a/tests/test_next_workers.py +++ b/tests/test_next_workers.py @@ -64,8 +64,6 @@ def config(base_config): run types: nowcast: config name: SalishSeaCast_Blue - nowcast-dev: - config name: SalishSeaCast_Blue nowcast-green: config name: SalishSeaCast nowcast-agrif: @@ -89,12 +87,6 @@ def config(base_config): run sets dir: SS-run-sets/v201905/forecast2/ nowcast-green: run sets dir: SS-run-sets/v201905/nowcast-green/ - salish: - shared storage: True - make forcing links: True - run types: - nowcast-dev: - run sets dir: SS-run-sets/v201905/nowcast-dev/ orcinus: shared storage: False make forcing links: True @@ -956,11 +948,6 @@ def test_no_next_worker_msg_types(self, msg_type, config, checklist): ["arbutus.cloud", "nowcast-green", "--run-date", "2016-10-23"], "arbutus.cloud", ), - ( - "success nowcast+", - ["salish", "nowcast-dev", "--run-date", "2016-10-23"], - "salish", - ), ( "success ssh", ["arbutus.cloud", "forecast", "--run-date", "2016-10-23"], @@ -1022,7 +1009,6 @@ class TestAfterRunNEMO: "crash", "failure nowcast", "failure nowcast-green", - "failure nowcast-dev", "failure forecast", "failure forecast2", ], @@ -1038,7 +1024,6 @@ def test_no_next_worker_msg_types(self, msg_type, config, checklist): [ ("success nowcast", "arbutus.cloud"), ("success nowcast-green", "arbutus.cloud"), - ("success nowcast-dev", "salish"), ("success forecast", "arbutus.cloud"), ("success forecast2", "arbutus.cloud"), ], @@ -1063,7 +1048,6 @@ class TestAfterWatchNEMO: "crash", "failure nowcast", "failure nowcast-green", - "failure nowcast-dev", "failure forecast", "failure forecast2", ], @@ -1194,12 +1178,6 @@ def test_success_forecast_launch_upload_forcing_turbidity( ] assert workers[2:4] == expected assert race_condition_workers == {"make_ww3_wind_file", "make_ww3_current_file"} - not_expected = NextWorker( - "nowcast.workers.upload_forcing", - args=["salish-nowcast", "turbidity"], - host="localhost", - ) - assert not_expected not in workers def test_success_forecast_no_launch_make_fvcom_boundary(self, config, checklist): workers = next_workers.after_watch_NEMO( @@ -1276,31 +1254,6 @@ def test_success_forecast2_launch_make_ww3_current_file_forecast2( assert workers[1] == expected assert race_condition_workers == {"make_ww3_wind_file", "make_ww3_current_file"} - def test_success_nowcast_green_launch_make_forcing_links_nowcastp_shared_storage( - self, config, checklist - ): - workers = next_workers.after_watch_NEMO( - Message( - "watch_NEMO", - "success nowcast-green", - { - "nowcast-green": { - "host": "arbutus.cloud", - "run date": "2017-05-31", - "completed": True, - } - }, - ), - config, - checklist, - ) - expected = NextWorker( - "nowcast.workers.make_forcing_links", - args=["salish", "nowcast+", "--shared-storage"], - host="localhost", - ) - assert workers[0] == expected - @pytest.mark.parametrize( "msg", [ @@ -1374,38 +1327,6 @@ def test_success_launch_download_results(self, msg, config, checklist): "make_ww3_current_file", } - @pytest.mark.parametrize( - "msg", - [ - Message( - "watch_NEMO", - "success nowcast-dev", - { - "nowcast-dev": { - "host": "salish", - "run date": "2016-10-15", - "completed": True, - } - }, - ) - ], - ) - def test_success_nowcast_dev_no_launch_download_results( - self, msg, config, checklist - ): - workers = next_workers.after_watch_NEMO(msg, config, checklist) - download_results = NextWorker( - "nowcast.workers.download_results", - args=[ - msg.payload["nowcast-dev"]["host"], - msg.type.split()[1], - "--run-date", - msg.payload["nowcast-dev"]["run date"], - ], - host="localhost", - ) - assert download_results not in workers - class TestAfterRunNEMO_AGRIF: """Unit tests for the after_run_NEMO_agrif function.""" diff --git a/tests/workers/test_download_results.py b/tests/workers/test_download_results.py index 1e9fd524..25e41aaa 100644 --- a/tests/workers/test_download_results.py +++ b/tests/workers/test_download_results.py @@ -187,7 +187,6 @@ def test_enabled_hosts(self, prod_config): "arbutus.cloud-nowcast", ["nowcast", "forecast", "forecast2", "nowcast-green"], ), - ("salish-nowcast", ["nowcast-dev", "nowcast-green"]), ("orcinus-nowcast-agrif", ["nowcast-agrif"]), ("graham-dtn", []), ("optimum-hindcast", []), @@ -223,18 +222,6 @@ def test_enabled_host_run_types(self, host, run_types, prod_config): "nowcast-green", "/nemoShare/MEOPAR/SalishSea/nowcast-green/", ), - ( - "enabled hosts", - "salish-nowcast", - "nowcast-dev", - "/results/SalishSea/nowcast-dev.201905/", - ), - ( - "enabled hosts", - "salish-nowcast", - "nowcast-green", - "/results2/SalishSea/nowcast-green.201905/", - ), ( "enabled hosts", "orcinus-nowcast-agrif", diff --git a/tests/workers/test_make_forcing_links.py b/tests/workers/test_make_forcing_links.py index 03d36377..9da4acc6 100644 --- a/tests/workers/test_make_forcing_links.py +++ b/tests/workers/test_make_forcing_links.py @@ -56,12 +56,11 @@ def config(base_config): rivers dir: rivers/ Fraser turbidity dir: rivers/river_turb/ + ### retained to test --shared-storage option salish-nowcast: run prep dir: runs/ forcing: ssh dir: sshNeahBay/ - rivers dir: rivers/ - Fraser turbidity dir: rivers/river_turb/ """ ) ) @@ -156,7 +155,6 @@ def test_enabled_hosts(self, prod_config): "host, ssh_key", ( ("arbutus.cloud-nowcast", "SalishSeaNEMO-nowcast_id_rsa"), - ("salish-nowcast", "SalishSeaNEMO-nowcast_id_rsa"), ("orcinus-nowcast-agrif", "SalishSeaNEMO-nowcast_id_rsa"), ("graham-dtn", "SalishSeaNEMO-nowcast_id_rsa"), ("optimum-hindcast", "SalishSeaNEMO-nowcast_id_rsa"), @@ -169,7 +167,6 @@ def test_ssh_keys(self, host, ssh_key, prod_config): "host, run_prep_dir", ( ("arbutus.cloud-nowcast", "/nemoShare/MEOPAR/nowcast-sys/runs"), - ("salish-nowcast", "/SalishSeaCast/runs/"), ("orcinus-nowcast-agrif", "/home/dlatorne/nowcast-agrif-sys/runs"), ), ) @@ -183,7 +180,6 @@ def test_ssh_file_template(self, prod_config): "host, ssh_dir", ( ("arbutus.cloud-nowcast", "/nemoShare/MEOPAR/sshNeahBay/"), - ("salish-nowcast", "/results/forcing/sshNeahBay/"), ("orcinus-nowcast-agrif", "/home/sallen/MEOPAR/sshNeahBay/"), ("graham-dtn", "/project/def-allen/SalishSea/forcing/sshNeahBay/"), ( @@ -207,7 +203,6 @@ def test_rivers_file_templates(self, prod_config): "host, rivers_dir", ( ("arbutus.cloud-nowcast", "/nemoShare/MEOPAR/rivers/"), - ("salish-nowcast", "/results/forcing/rivers/"), ("orcinus-nowcast-agrif", "/home/sallen/MEOPAR/rivers/"), ("graham-dtn", "/project/def-allen/SalishSea/forcing/rivers/"), ("optimum-hindcast", "/data/sallen/shared/SalishSeaCast/forcing/rivers/"), @@ -253,10 +248,6 @@ def test_weather_file_template(self, prod_config): "host, weather_dir", ( ("arbutus.cloud-nowcast", "/nemoShare/MEOPAR/GEM2.5/ops/NEMO-atmos/"), - ( - "salish-nowcast", - "/results/forcing/atmospheric/continental2.5/nemo_forcing/", - ), ("orcinus-nowcast-agrif", "/home/sallen/MEOPAR/continental2.5/NEMO-atmos/"), ( "graham-dtn", @@ -284,7 +275,6 @@ def test_temperature_salinity_file_template(self, prod_config): "host, bc_dir", ( ("arbutus.cloud-nowcast", "/nemoShare/MEOPAR/LiveOcean/"), - ("salish-nowcast", "/results/forcing/LiveOcean/boundary_conditions/"), ("orcinus-nowcast-agrif", "/home/sallen/MEOPAR/LiveOcean/"), ("graham-dtn", "/project/def-allen/SalishSea/forcing/LiveOcean/"), ( @@ -302,7 +292,6 @@ def test_boundary_condition_dir(self, host, bc_dir, prod_config): ( ("nowcast+", "arbutus.cloud-nowcast", False), ("nowcast+", "orcinus-nowcast-agrif", False), - ("nowcast+", "salish-nowcast", True), ("ssh", "arbutus.cloud-nowcast", False), ("nowcast-green", "arbutus.cloud-nowcast", False), ("nowcast-agrif", "orcinus-nowcast-agrif", False), @@ -335,7 +324,6 @@ def test_success(self, run_type, host_name, shared_storage, caplog): ( ("nowcast+", "arbutus.cloud-nowcast", False), ("nowcast+", "orcinus-nowcast-agrif", False), - ("nowcast+", "salish-nowcast", True), ("ssh", "arbutus.cloud-nowcast", False), ("nowcast-green", "arbutus.cloud-nowcast", False), ("nowcast-agrif", "orcinus-nowcast-agrif", False), @@ -476,11 +464,8 @@ def prep_files(run_date, host_config, config, tmp_path): "run_type, host", ( ("nowcast+", "arbutus.cloud"), - ("nowcast+", "salish-nowcast"), ("forecast2", "arbutus.cloud"), - ("forecast2", "salish-nowcast"), ("ssh", "arbutus.cloud"), - ("ssh", "salish-nowcast"), ("nowcast-green", "arbutus.cloud"), ("nowcast-agrif", "arbutus.cloud"), ), diff --git a/tests/workers/test_run_NEMO.py b/tests/workers/test_run_NEMO.py index ccd5352e..8c84a56c 100644 --- a/tests/workers/test_run_NEMO.py +++ b/tests/workers/test_run_NEMO.py @@ -22,7 +22,7 @@ import textwrap from pathlib import Path from types import SimpleNamespace -from unittest.mock import call, patch, Mock +from unittest.mock import patch, Mock import arrow import nemo_nowcast @@ -41,7 +41,6 @@ def config(base_config): """\ results archive: nowcast: results/SalishSea/nowcast-blue.201905/ - nowcast-dev: results/SalishSea/nowcast-dev.201905/ nowcast-green: results2/SalishSea/nowcast-green.201905/ forecast: results/SalishSea/forecast.201905/ forecast2: results/SalishSea/forecast2.201905/ @@ -55,14 +54,6 @@ def config(base_config): land processor elimination: bathymetry_201702.csv duration: 1 # day restart from: nowcast - nowcast-dev: - config name: SalishSeaCast_Blue - coordinates: coordinates_seagrid_SalishSea201702.nc - bathymetry: bathymetry_201702.nc - mesh mask: mesh_mask201702.nc - land processor elimination: bathymetry_201702.csv - duration: 1 # day - restart from: nowcast-dev nowcast-green: config name: SalishSeaCast coordinates: coordinates_seagrid_SalishSea201702.nc @@ -116,23 +107,6 @@ def config(base_config): results: results/SalishSea/nowcast-green/ forcing: bottom friction mask: grid/jetty_mask_bathy201702.nc - - salish-nowcast: - run prep dir: nowcast-sys/runs/ - grid dir: nowcast-sys/grid/ - salishsea_cmd: bin/salishsea - job exec cmd: qsub - email: somebody@example.com - run types: - nowcast-dev: - run sets dir: SS-run-sets/SalishSea/nemo3.6/nowcast-dev/ - mpi decomposition: 1x7 - walltime: "23:30:00" - results: results/SalishSea/nowcast-dev/ - nowcast-green: - results: results/SalishSea/nowcast-dev/ - forcing: - bottom friction mask: grid/jetty_mask_bathy201702.nc """ ) ) @@ -153,7 +127,7 @@ def tmp_results(tmpdir, run_date, scope="function"): Created anew for each test function/method. """ tmp_results = tmpdir.ensure_dir("results") - for run_type in ("nowcast", "nowcast-green", "nowcast-dev", "forecast"): + for run_type in ("nowcast", "nowcast-green", "forecast"): tmp_results.ensure( "SalishSea", run_type, @@ -211,7 +185,6 @@ def tmp_results(tmpdir, run_date, scope="function"): "run prep dir": tmp_run_prep, "results": { "nowcast": tmp_results.ensure_dir("SalishSea", "nowcast"), - "nowcast-dev": tmp_results.ensure_dir("SalishSea", "nowcast-dev"), "nowcast-green": tmp_results.ensure_dir("SalishSea", "nowcast-green"), "forecast": tmp_results.ensure_dir("SalishSea", "forecast"), "forecast2": tmp_results.ensure_dir("SalishSea", "forecast2"), @@ -250,7 +223,6 @@ def test_add_run_type_arg(self, m_worker): assert kwargs["choices"] == { "nowcast", "nowcast-green", - "nowcast-dev", "forecast", "forecast2", } @@ -272,7 +244,7 @@ def test_run_worker(self, m_worker): @pytest.mark.parametrize( - "run_type", ["nowcast", "nowcast-green", "nowcast-dev", "forecast", "forecast2"] + "run_type", ["nowcast", "nowcast-green", "forecast", "forecast2"] ) @patch("nowcast.workers.run_NEMO.logger", autospec=True) class TestSuccess: @@ -290,7 +262,7 @@ def test_success(self, m_logger, run_type): @pytest.mark.parametrize( - "run_type", ["nowcast", "nowcast-green", "nowcast-dev", "forecast", "forecast2"] + "run_type", ["nowcast", "nowcast-green", "forecast", "forecast2"] ) @patch("nowcast.workers.run_NEMO.logger", autospec=True) class TestFailure: @@ -445,7 +417,6 @@ def test_config_missing_results_dir(self, config): [ ("arbutus.cloud", "nowcast", "SalishSeaCast_Blue"), ("arbutus.cloud", "nowcast-green", "SalishSeaCast"), - ("salish-nowcast", "nowcast-dev", "SalishSeaCast_Blue"), ("arbutus.cloud", "forecast", "SalishSeaCast_Blue"), ("arbutus.cloud", "forecast2", "SalishSeaCast_Blue"), ], @@ -474,7 +445,6 @@ def test_config_name( [ ("arbutus.cloud", "nowcast", "04jan16nowcast"), ("arbutus.cloud", "nowcast-green", "04jan16nowcast-green"), - ("salish-nowcast", "nowcast-dev", "04jan16nowcast-dev"), ("arbutus.cloud", "forecast", "04jan16forecast"), ("arbutus.cloud", "forecast2", "04jan16forecast2"), ], @@ -503,7 +473,6 @@ def test_run_id( [ ("arbutus.cloud", "nowcast", "11x18"), ("arbutus.cloud", "nowcast-green", "11x18"), - ("salish-nowcast", "nowcast-dev", "1x7"), ("arbutus.cloud", "forecast", "11x18"), ("arbutus.cloud", "forecast2", "11x18"), ], @@ -532,7 +501,6 @@ def test_mpi_decomposition( [ ("arbutus.cloud", "nowcast", None), ("arbutus.cloud", "nowcast-green", None), - ("salish-nowcast", "nowcast-dev", "23:30:00"), ("arbutus.cloud", "forecast", None), ("arbutus.cloud", "forecast2", None), ], @@ -587,7 +555,6 @@ def test_paths( [ ("arbutus.cloud", "nowcast", "runs directory"), ("arbutus.cloud", "nowcast-green", "runs directory"), - ("salish-nowcast", "nowcast-dev", "runs directory"), ("arbutus.cloud", "forecast", "runs directory"), ("arbutus.cloud", "forecast2", "runs directory"), ], @@ -623,11 +590,6 @@ def test_runs_dir_path( "nowcast-green", "nowcast-sys/grid/coordinates_seagrid_SalishSea201702.nc", ), - ( - "salish-nowcast", - "nowcast-dev", - "nowcast-sys/grid/coordinates_seagrid_SalishSea201702.nc", - ), ( "arbutus.cloud", "forecast", @@ -668,7 +630,6 @@ def test_grid_coordinates( "nowcast-green", "nowcast-sys/grid/bathymetry_201702.nc", ), - ("salish-nowcast", "nowcast-dev", "nowcast-sys/grid/bathymetry_201702.nc"), ("arbutus.cloud", "forecast", "nowcast-sys/grid/bathymetry_201702.nc"), ("arbutus.cloud", "forecast2", "nowcast-sys/grid/bathymetry_201702.nc"), ], @@ -701,7 +662,6 @@ def test_grid_bathymetry( "nowcast-green", "nowcast-sys/grid/bathymetry_201702.csv", ), - ("salish-nowcast", "nowcast-dev", False), ], ) def test_grid_land_processor_elimination( @@ -749,20 +709,6 @@ def test_grid_land_processor_elimination( "rivers-climatology", "rivers-climatology", ), - ("salish-nowcast", "nowcast-dev", "NEMO-atmos", "NEMO-atmos"), - ("salish-nowcast", "nowcast-dev", "ssh", "ssh"), - ("salish-nowcast", "nowcast-dev", "tides", "tides"), - ("salish-nowcast", "nowcast-dev", "tracers", "tracers"), - ("salish-nowcast", "nowcast-dev", "LiveOcean", "LiveOcean"), - ("salish-nowcast", "nowcast-dev", "rivers", "rivers"), - ("salish-nowcast", "nowcast-dev", "river_turb", "rivers"), - ("salish-nowcast", "nowcast-dev", "grid", "grid"), - ( - "salish-nowcast", - "nowcast-dev", - "rivers-climatology", - "rivers-climatology", - ), ("arbutus.cloud", "forecast", "NEMO-atmos", "NEMO-atmos"), ("arbutus.cloud", "forecast", "ssh", "ssh"), ("arbutus.cloud", "forecast", "tides", "tides"), @@ -816,7 +762,6 @@ def test_forcing_links( ("arbutus.cloud", "nowcast"), ("arbutus.cloud", "forecast"), ("arbutus.cloud", "nowcast-green"), - ("salish-nowcast", "nowcast-dev"), ("arbutus.cloud", "forecast2"), ], ) @@ -890,7 +835,6 @@ def test_restart_links( [ ("arbutus.cloud", "nowcast"), ("arbutus.cloud", "nowcast-green"), - ("salish-nowcast", "nowcast-dev"), ("arbutus.cloud", "forecast"), ("arbutus.cloud", "forecast2"), ], @@ -1138,89 +1082,6 @@ def test_script_arbutus_cloud(self, m_gnp, m_lrd, run_type, config, tmpdir): for i, line in enumerate(expected.splitlines()[:-1]): assert script[i].strip() == line.strip() - @patch("nowcast.workers.run_NEMO.nemo_cmd.prepare.load_run_desc") - @patch("nowcast.workers.run_NEMO.nemo_cmd.prepare.get_n_processors", return_value=7) - def test_script_salish(self, m_gnp, m_lrd, config, tmpdir): - tmp_run_dir = tmpdir.ensure_dir("tmp_run_dir") - run_desc_file = tmpdir.ensure("13may17.yaml") - host_config = config["run"]["enabled hosts"]["salish-nowcast"] - results_dir = tmpdir.ensure_dir( - host_config["run types"]["nowcast-dev"]["results"] - ) - p_config = patch.dict( - config["results archive"], {"nowcast-dev": str(results_dir)} - ) - m_lrd.return_value = { - "run_id": "13may17nowcast", - "MPI decomposition": "1x7", - "walltime": "23:30:00", - "output": {"XIOS servers": 1}, - } - with p_config: - with patch("salishsea_cmd.run.SYSTEM", "salish"): - script = run_NEMO._build_script( - Path(str(tmp_run_dir)), - "nowcast-dev", - Path(str(run_desc_file)), - Path(str(results_dir)) / "13may17", - "salish-nowcast", - config, - ) - expected = f"""#!/bin/bash - - #PBS -N 13may17nowcast - #PBS -S /bin/bash - #PBS -l walltime=23:30:00 - # email when the job [b]egins and [e]nds, or is [a]borted - #PBS -m bea - #PBS -M somebody@example.com - #PBS -l procs=8 - # total memory for job - #PBS -l mem=64gb - - RUN_ID="13may17nowcast" - RUN_DESC="13may17.yaml" - WORK_DIR="{tmp_run_dir}" - RESULTS_DIR="{results_dir}/13may17" - MPIRUN="mpirun" - COMBINE="bin/salishsea combine" - GATHER="bin/salishsea gather" - - mkdir -p ${{RESULTS_DIR}} - - cd ${{WORK_DIR}} - echo "working dir: $(pwd)" >>${{RESULTS_DIR}}/stdout - - echo "Starting run at $(date)" >>${{RESULTS_DIR}}/stdout - ${{MPIRUN}} -np 7 --bind-to none ./nemo.exe : \ --np 1 --bind-to none ./xios_server.exe \ ->>${{RESULTS_DIR}}/stdout 2>>${{RESULTS_DIR}}/stderr - echo "Ended run at $(date)" >>${{RESULTS_DIR}}/stdout - - echo "Results combining started at $(date)" >>${{RESULTS_DIR}}/stdout - ${{COMBINE}} ${{RUN_DESC}} --debug \ ->>${{RESULTS_DIR}}/stdout - echo "Results combining ended at $(date)" >>${{RESULTS_DIR}}/stdout - - echo "Results gathering started at $(date)" >>${{RESULTS_DIR}}/stdout - ${{GATHER}} ${{RESULTS_DIR}} --debug \ ->>${{RESULTS_DIR}}/stdout - echo "Results gathering ended at $(date)" >>${{RESULTS_DIR}}/stdout - - chmod g+rwx ${{RESULTS_DIR}} - chmod g+rw ${{RESULTS_DIR}}/* - chmod o+rx ${{RESULTS_DIR}} - chmod o+r ${{RESULTS_DIR}}/* - - echo "Deleting run directory" >>${{RESULTS_DIR}}/stdout - rmdir $(pwd) - echo "Finished at $(date)" >>${{RESULTS_DIR}}/stdout - """ - - script = script.splitlines() - for i, line in enumerate(expected.splitlines()[:-1]): - assert script[i].strip() == line.strip() - class TestDefinitions: """Unit test for _definitions() function.""" @@ -1240,14 +1101,14 @@ def test_definitions(self, run_type, config): run_desc_filepath, run_dir, results_dir, - "salish-nowcast", + "arbutus.cloud", config, ) expected = """RUN_ID="03dec16nowcast" RUN_DESC="03dec16.yaml" WORK_DIR="tmp_run_dir" RESULTS_DIR="results_dir" - MPIRUN="mpirun" + MPIRUN="mpirun --mca btl ^openib --mca orte_tmpdir_base /dev/shm --hostfile ${HOME}/mpi_hosts" COMBINE="bin/salishsea combine" GATHER="bin/salishsea gather" """ @@ -1365,18 +1226,6 @@ def test_bash_launch_run_script( run_NEMO._launch_run_script(run_type, "SalishSeaNEMO.sh", host, config) m_popen.assert_called_once_with(["bash", "SalishSeaNEMO.sh"]) - @pytest.mark.parametrize("run_type, host", [("nowcast-dev", "salish-nowcast")]) - def test_qsub_launch_run_script( - self, m_run, m_popen, m_logger, run_type, host, config - ): - run_NEMO._launch_run_script(run_type, "SalishSeaNEMO.sh", host, config) - assert m_run.call_args_list[0] == call( - ["qsub", "SalishSeaNEMO.sh"], - stdout=subprocess.PIPE, - check=True, - universal_newlines=True, - ) - @pytest.mark.parametrize( "run_type, host", [ @@ -1397,22 +1246,6 @@ def test_find_bash_run_process_pid( universal_newlines=True, ) - @pytest.mark.parametrize("run_type, host", [("nowcast-dev", "salish-nowcast")]) - def test_find_qsub_run_process_pid( - self, m_run, m_popen, m_logger, run_type, host, config - ): - m_run.side_effect = [ - SimpleNamespace(stdout="4343.master"), - SimpleNamespace(stdout="4444"), - ] - run_NEMO._launch_run_script(run_type, "SalishSeaNEMO.sh", host, config) - assert m_run.call_args_list[1] == call( - ["pgrep", "4343.master"], - stdout=subprocess.PIPE, - check=True, - universal_newlines=True, - ) - @pytest.mark.parametrize( "run_type, host", [ @@ -1429,15 +1262,3 @@ def test_bash_run(self, m_run, m_popen, m_logger, run_type, host, config): ) assert run_exec_cmd == "bash SalishSeaNEMO.sh" assert run_id is None - - @pytest.mark.parametrize("run_type, host", [("nowcast-dev", "salish-nowcast")]) - def test_qsub_run(self, m_run, m_popen, m_logger, run_type, host, config): - m_run.side_effect = [ - SimpleNamespace(stdout="4343.master"), - SimpleNamespace(stdout="4444"), - ] - run_exec_cmd, run_id = run_NEMO._launch_run_script( - run_type, "SalishSeaNEMO.sh", host, config - ) - assert run_exec_cmd == "qsub SalishSeaNEMO.sh" - assert run_id == "4343.master" diff --git a/tests/workers/test_upload_forcing.py b/tests/workers/test_upload_forcing.py index 4f16f0f1..57d5b986 100644 --- a/tests/workers/test_upload_forcing.py +++ b/tests/workers/test_upload_forcing.py @@ -141,7 +141,6 @@ def test_ssh_keys(self, prod_config): "host, ssh_key", ( ("arbutus.cloud-nowcast", "/nemoShare/MEOPAR/sshNeahBay/"), - ("salish-nowcast", "/results/forcing/sshNeahBay/"), ( "optimum-hindcast", "/data/sallen/shared/SalishSeaCast/forcing/sshNeahBay/", @@ -181,7 +180,6 @@ def test_fraser_turbidity_uploads(self, host, expected, prod_config): "host, expected", ( ("arbutus.cloud-nowcast", "/nemoShare/MEOPAR/rivers/"), - ("salish-nowcast", "/results/forcing/rivers/"), ("optimum-hindcast", "/data/sallen/shared/SalishSeaCast/forcing/rivers/"), ("orcinus-nowcast-agrif", "/home/sallen/MEOPAR/rivers/"), ("graham-dtn", "/project/def-allen/SalishSea/forcing/rivers/"), @@ -198,10 +196,6 @@ def test_river_runoff_uploads(self, host, expected, prod_config): "host, expected", ( ("arbutus.cloud-nowcast", "/nemoShare/MEOPAR/GEM2.5/ops/NEMO-atmos/"), - ( - "salish-nowcast", - "/results/forcing/atmospheric/continental2.5/nemo_forcing/", - ), ( "optimum-hindcast", "/data/sallen/shared/SalishSeaCast/forcing/atmospheric/continental2.5/nemo_forcing/", @@ -227,7 +221,6 @@ def test_weather_uploads(self, host, expected, prod_config): "host, expected", ( ("arbutus.cloud-nowcast", "/nemoShare/MEOPAR/LiveOcean/"), - ("salish-nowcast", "/results/forcing/LiveOcean/boundary_conditions/"), ( "optimum-hindcast", "/data/sallen/shared/SalishSeaCast/forcing/LiveOcean/", diff --git a/tests/workers/test_watch_NEMO.py b/tests/workers/test_watch_NEMO.py index 1c545e1a..5b31ba6f 100644 --- a/tests/workers/test_watch_NEMO.py +++ b/tests/workers/test_watch_NEMO.py @@ -43,8 +43,6 @@ def config(base_config): run types: nowcast: duration: 1 # day - nowcast-dev: - duration: 1 # day nowcast-green: duration: 1 # day forecast: @@ -59,8 +57,6 @@ def config(base_config): results: results/SalishSea/nowcast/ nowcast-green: results: results/SalishSea/nowcast-green/ - nowcast-dev: - results: results/SalishSea/nowcast-dev/ forecast: results: results/SalishSea/forecast/ forecast2: @@ -104,7 +100,6 @@ def test_add_run_type_arg(self, m_worker): assert kwargs["choices"] == { "nowcast", "nowcast-green", - "nowcast-dev", "forecast", "forecast2", } @@ -127,7 +122,6 @@ class TestSuccess: [ ("nowcast", "arbutus.cloud-nowcast"), ("nowcast-green", "arbutus.cloud-nowcast"), - ("nowcast-dev", "salish-nowcast"), ("forecast", "arbutus.cloud-nowcast"), ("forecast2", "arbutus.cloud-nowcast"), ], @@ -144,7 +138,6 @@ def test_success(self, m_logger, run_type, host_name): [ ("nowcast", "arbutus.cloud-nowcast"), ("nowcast-green", "arbutus.cloud-nowcast"), - ("nowcast-dev", "salish-nowcast"), ("forecast", "arbutus.cloud-nowcast"), ("forecast2", "arbutus.cloud-nowcast"), ], @@ -165,7 +158,6 @@ def test_failure(self, m_logger, run_type, host_name): [ ("nowcast", "arbutus.cloud-nowcast"), ("nowcast-green", "arbutus.cloud-nowcast"), - ("nowcast-dev", "salish-nowcast"), ("forecast", "arbutus.cloud-nowcast"), ("forecast2", "arbutus.cloud-nowcast"), ], @@ -429,7 +421,6 @@ class TestConfirmRunSuccess: [ ("nowcast", 2160, 2160), ("nowcast-green", 2160, 2160), - ("nowcast-dev", 2160, 2160), ("forecast", 3240, 2160), ("forecast2", 2700, 2160), ], @@ -457,7 +448,6 @@ def test_run_succeeded( [ ("nowcast", 2160, 2160), ("nowcast-green", 2160, 2160), - ("nowcast-dev", 2160, 2160), ("forecast", 3240, 2160), ("forecast2", 2700, 2160), ], @@ -483,7 +473,6 @@ def test_no_results_dir(self, m_logger, run_type, itend, restart_timestep, confi [ ("nowcast", 2160, 2160), ("nowcast-green", 2160, 2160), - ("nowcast-dev", 2160, 2160), ("forecast", 3240, 2160), ("forecast2", 2700, 2160), ], @@ -516,7 +505,6 @@ def test_output_abort_file_exists( [ ("nowcast", 2160, 2160), ("nowcast-green", 2160, 2160), - ("nowcast-dev", 2160, 2160), ("forecast", 3240, 2160), ("forecast2", 2700, 2160), ], @@ -545,7 +533,6 @@ def test_no_time_step_file( [ ("nowcast", 2160, 2160), ("nowcast-green", 2160, 2160), - ("nowcast-dev", 2160, 2160), ("forecast", 3240, 2160), ("forecast2", 2700, 2160), ], @@ -573,7 +560,6 @@ def test_wrong_final_time_step( [ ("nowcast", 2160, 2160), ("nowcast-green", 2160, 2160), - ("nowcast-dev", 2160, 2160), ("forecast", 3240, 2160), ("forecast2", 2700, 2160), ], @@ -622,7 +608,6 @@ def test_no_tracers_restart_file(self, m_logger, config): [ ("nowcast", 2160, 2160), ("nowcast-green", 2160, 2160), - ("nowcast-dev", 2160, 2160), ("forecast", 3240, 2160), ("forecast2", 2700, 2160), ], @@ -651,7 +636,6 @@ def test_no_ocean_output_file( [ ("nowcast", 2160, 2160), ("nowcast-green", 2160, 2160), - ("nowcast-dev", 2160, 2160), ("forecast", 3240, 2160), ("forecast2", 2700, 2160), ], @@ -680,7 +664,6 @@ def test_error_in_ocean_output( [ ("nowcast", 2160, 2160), ("nowcast-green", 2160, 2160), - ("nowcast-dev", 2160, 2160), ("forecast", 3240, 2160), ("forecast2", 2700, 2160), ], @@ -709,7 +692,6 @@ def test_no_solver_stat_file( [ ("nowcast", 2160, 2160), ("nowcast-green", 2160, 2160), - ("nowcast-dev", 2160, 2160), ("forecast", 3240, 2160), ("forecast2", 2700, 2160), ],