From 3c5b7f695c4b29afa137c66cc21ebd33a11cb200 Mon Sep 17 00:00:00 2001 From: zacharyburnettNOAA Date: Mon, 22 Nov 2021 13:03:05 -0500 Subject: [PATCH 01/33] first draft of `initialize_from_configuration` --- coupledmodeldriver/client/check_completion.py | 4 +- .../client/initialize_adcirc.py | 4 +- .../client/initialize_from_configuration.py | 78 +++++++++++ coupledmodeldriver/configure/configure.py | 8 +- coupledmodeldriver/generate/adcirc/base.py | 6 +- coupledmodeldriver/generate/adcirc/check.py | 4 +- .../generate/adcirc/configure.py | 37 ++++- tests/test_configuration.py | 6 +- tests/test_generation.py | 128 +++++++++++++++++- 9 files changed, 255 insertions(+), 20 deletions(-) create mode 100644 coupledmodeldriver/client/initialize_from_configuration.py diff --git a/coupledmodeldriver/client/check_completion.py b/coupledmodeldriver/client/check_completion.py index c4df124c..d3380992 100644 --- a/coupledmodeldriver/client/check_completion.py +++ b/coupledmodeldriver/client/check_completion.py @@ -12,7 +12,7 @@ from coupledmodeldriver.generate.adcirc.check import ( check_adcirc_completion, CompletionStatus, - is_adcirc_run_directory, + is_adcirc_directory, ) from coupledmodeldriver.utilities import ProcessPoolExecutorStackTraced @@ -59,7 +59,7 @@ def is_model_directory(directory: PathLike, model: ModelJSON = None) -> bool: model = ADCIRCJSON if model == ADCIRCJSON: - is_model_directory = is_adcirc_run_directory(directory) + is_model_directory = is_adcirc_directory(directory) else: raise NotImplementedError(f'model "{model}" not implemented') diff --git a/coupledmodeldriver/client/initialize_adcirc.py b/coupledmodeldriver/client/initialize_adcirc.py index 01ed353f..7548911d 100644 --- a/coupledmodeldriver/client/initialize_adcirc.py +++ b/coupledmodeldriver/client/initialize_adcirc.py @@ -339,7 +339,7 @@ def initialize_adcirc( absolute_paths: bool = True, overwrite: bool = None, verbose: bool = False, -): +) -> ADCIRCRunConfiguration: """ creates a set of JSON configuration files according to the given parameters @@ -434,6 +434,8 @@ def initialize_adcirc( generation_job_script = EnsembleGenerationJob(platform=platform) generation_job_script.write(filename=output_directory / 'generate.job', overwrite=True) + return configuration + def get_argument( argument: str, diff --git a/coupledmodeldriver/client/initialize_from_configuration.py b/coupledmodeldriver/client/initialize_from_configuration.py new file mode 100644 index 00000000..de48bde3 --- /dev/null +++ b/coupledmodeldriver/client/initialize_from_configuration.py @@ -0,0 +1,78 @@ +from argparse import ArgumentParser +from os import PathLike +from pathlib import Path + +from typepigeon import convert_value + +from coupledmodeldriver.configure import ModelJSON +from coupledmodeldriver.configure.configure import RunConfiguration +from coupledmodeldriver.generate import ADCIRCRunConfiguration +from coupledmodeldriver.generate.adcirc.base import ADCIRCJSON + +MODELS = {model.name.lower(): model for model in ModelJSON.__subclasses__()} + + +def parse_initialize_from_configuration_arguments(): + argument_parser = ArgumentParser() + argument_parser.add_argument( + 'input-directory', + nargs='*', + default=Path.cwd(), + help='directory containing model configuration', + ) + argument_parser.add_argument( + 'output-directory', + nargs='*', + default=Path.cwd(), + help='directory to write JSON configuration', + ) + argument_parser.add_argument('--model', help='model of configuraiton, one of: `ADCIRC`') + argument_parser.add_argument( + '--skip-existing', action='store_true', help='skip existing files', + ) + + arguments = argument_parser.parse_args() + + input_directory = convert_value(arguments.input_directory, Path) + output_directory = convert_value(arguments.output_directory, Path) + + model = arguments.model + if model is not None: + model = MODELS[model.lower()] + + overwrite = not arguments.skip_existing + + return { + 'input_directory': input_directory, + 'output_directory': output_directory, + 'model': model, + 'overwrite': overwrite, + } + + +def initialize_from_model_configuration_directory(directory: PathLike, model: ModelJSON = None) -> RunConfiguration: + if model is None: + model = ADCIRCJSON + + if model == ADCIRCJSON: + run_configuration = ADCIRCRunConfiguration.from_model_configuration_directory(directory=directory) + else: + raise NotImplementedError(f'model "{model}" not implemented') + + return run_configuration + + +def main(): + arguments = parse_initialize_from_configuration_arguments() + run_configuration = initialize_from_model_configuration_directory( + directory=arguments['input_directory'], + model=arguments['model'], + ) + run_configuration.write_directory( + directory=arguments['output_directory'], + overwrite=arguments['overwrite'], + ) + + +if __name__ == '__main__': + main() diff --git a/coupledmodeldriver/configure/configure.py b/coupledmodeldriver/configure/configure.py index 6fcb6f2f..b5e2ed8e 100644 --- a/coupledmodeldriver/configure/configure.py +++ b/coupledmodeldriver/configure/configure.py @@ -1,15 +1,15 @@ -from abc import ABC from copy import copy from os import PathLike from pathlib import Path from typing import Any, Collection, Dict, List, Mapping, Set, Union +from coupledmodeldriver.configure import ConfigurationJSON from coupledmodeldriver.configure.base import ConfigurationJSON, ModelDriverJSON from coupledmodeldriver.configure.forcings.base import ADCIRCPY_FORCING_CLASSES, ForcingJSON from coupledmodeldriver.utilities import LOGGER -class RunConfiguration(ABC): +class RunConfiguration: """ abstraction of a set of model run configurations, encapsulated in JSON files """ @@ -147,6 +147,10 @@ def from_configurations( ) -> 'RunConfiguration': return cls(configurations) + @classmethod + def from_model_configuration_directory(cls, directory: PathLike) -> 'RunConfiguration': + raise NotImplementedError + def from_user_input(value: Any) -> ConfigurationJSON: """ diff --git a/coupledmodeldriver/generate/adcirc/base.py b/coupledmodeldriver/generate/adcirc/base.py index 55029013..bef4db19 100644 --- a/coupledmodeldriver/generate/adcirc/base.py +++ b/coupledmodeldriver/generate/adcirc/base.py @@ -3,7 +3,7 @@ from pathlib import Path from typing import Any, Dict, List, Union -from adcircpy import AdcircMesh, AdcircRun, Tides +from adcircpy import AdcircMesh, AdcircRun, Fort15, Tides from adcircpy.forcing import BestTrackForcing from adcircpy.forcing.base import Forcing from adcircpy.mesh.fort13 import NodalAttributes @@ -515,3 +515,7 @@ def __copy__(self) -> 'ADCIRCJSON': instance.base_mesh = self.base_mesh instance.forcings = self.forcings return instance + + @classmethod + def from_fort15(cls, filename: PathLike): + Fort15() diff --git a/coupledmodeldriver/generate/adcirc/check.py b/coupledmodeldriver/generate/adcirc/check.py index 27dcaca1..4988701f 100644 --- a/coupledmodeldriver/generate/adcirc/check.py +++ b/coupledmodeldriver/generate/adcirc/check.py @@ -21,7 +21,7 @@ class CompletionStatus(Enum): COMPLETED = 0 -def is_adcirc_run_directory(directory: PathLike = None) -> bool: +def is_adcirc_directory(directory: PathLike = None) -> bool: """ check if the given directory has the baseline ADCIRC configuration files @@ -63,7 +63,7 @@ def check_adcirc_completion( completion = {entry: {} for entry in CompletionStatus} - if not is_adcirc_run_directory(directory): + if not is_adcirc_directory(directory): completion[CompletionStatus.NOT_CONFIGURED][ 'fort.14,fort.15' ] = f'ADCIRC configuration files not found' diff --git a/coupledmodeldriver/generate/adcirc/configure.py b/coupledmodeldriver/generate/adcirc/configure.py index 41cfc441..40eec602 100644 --- a/coupledmodeldriver/generate/adcirc/configure.py +++ b/coupledmodeldriver/generate/adcirc/configure.py @@ -25,6 +25,7 @@ WW3DATAForcingJSON, ) from coupledmodeldriver.generate.adcirc.base import ADCIRCJSON +from coupledmodeldriver.generate.adcirc.check import is_adcirc_directory from coupledmodeldriver.platforms import Platform from coupledmodeldriver.utilities import LOGGER @@ -197,7 +198,7 @@ def files_exist(self, directory: PathLike) -> bool: ] if 'nems' in self: files_to_write.extend( - ['nems.configure', 'atm_namelist.rc', 'model_configure', 'config.rc',] + ['nems.configure', 'atm_namelist.rc', 'model_configure', 'config.rc', ] ) if self.use_aswip: files_to_write.append('fort.22') @@ -267,6 +268,36 @@ def read_directory( return super().read_directory(directory, required, supplementary) + @classmethod + def from_model_configuration_directory(cls, directory: PathLike) -> 'RunConfiguration': + if not isinstance(directory, Path): + directory = Path(directory) + + configurations = [] + + spinup_directory = directory / 'spinup' + if spinup_directory.exists(): + if not is_adcirc_directory(spinup_directory): + raise FileNotFoundError(f'not an ADCIRC directory: "{spinup_directory}"') + + configurations.append(ADCIRCJSON.from_fort15(spinup_directory / 'fort.15')) + + runs_directory = directory / 'runs' + if runs_directory.exists(): + perturbations = {} + for run_directory in runs_directory.iterdir(): + pass + + if not is_adcirc_directory(directory): + raise FileNotFoundError('not an ADCIRC directory') + + required = {configuration_class: None for configuration_class in cls.REQUIRED} + supplementary = { + configuration_class: None for configuration_class in cls.SUPPLEMENTARY + } + + return cls() + class NEMSADCIRCRunConfiguration(ADCIRCRunConfiguration): """ @@ -274,10 +305,8 @@ class NEMSADCIRCRunConfiguration(ADCIRCRunConfiguration): """ REQUIRED = { - ModelDriverJSON, + *ADCIRCRunConfiguration.REQUIRED, NEMSJSON, - SlurmJSON, - ADCIRCJSON, } def __init__( diff --git a/tests/test_configuration.py b/tests/test_configuration.py index fcb3c5e3..d41d7403 100644 --- a/tests/test_configuration.py +++ b/tests/test_configuration.py @@ -1,6 +1,7 @@ from datetime import datetime, timedelta from pathlib import Path +from adcircpy.forcing import AtmosphericMeshForcing, WaveWatch3DataForcing from nemspy.model import ADCIRCEntry, AtmosphericForcingEntry, WaveWatch3ForcingEntry import pytest @@ -13,8 +14,9 @@ TidalForcingJSON, WW3DATAForcingJSON, ) +from coupledmodeldriver.generate import ADCIRCRunConfiguration, NEMSADCIRCRunConfiguration from coupledmodeldriver.generate.adcirc.base import ADCIRCJSON -from tests import INPUT_DIRECTORY +from tests import INPUT_DIRECTORY, OUTPUT_DIRECTORY def test_update(): @@ -199,3 +201,5 @@ def test_modeldriver(): 'platform': Platform.HERA, 'perturbations': {'unperturbed': None}, } + + diff --git a/tests/test_generation.py b/tests/test_generation.py index 4baca2c3..e6a000d8 100644 --- a/tests/test_generation.py +++ b/tests/test_generation.py @@ -8,13 +8,8 @@ from coupledmodeldriver import Platform from coupledmodeldriver.client.initialize_adcirc import initialize_adcirc -from coupledmodeldriver.generate import generate_adcirc_configuration -from tests import ( - check_reference_directory, - INPUT_DIRECTORY, - OUTPUT_DIRECTORY, - REFERENCE_DIRECTORY, -) +from coupledmodeldriver.generate import ADCIRCRunConfiguration, NEMSADCIRCRunConfiguration, generate_adcirc_configuration +from tests import (INPUT_DIRECTORY, OUTPUT_DIRECTORY, REFERENCE_DIRECTORY, check_reference_directory) def test_hera_adcirc(): @@ -897,3 +892,122 @@ def test_stampede2_adcirc_tidal_nems_atmesh_ww3data(): 'nems.configure': [0], }, ) + + +def test_adcirc_run_configuration(): + output_directory = OUTPUT_DIRECTORY / 'test_adcirc_run_configuration' + + platform = Platform.HERA + mesh = 'shinnecock' + adcirc_processors = 15 * platform.value['processors_per_node'] + modeled_start_time = datetime(2008, 8, 23) + modeled_duration = timedelta(days=14.5) + modeled_timestep = timedelta(seconds=2) + tidal_spinup_duration = timedelta(days=12.5) + job_duration = timedelta(hours=6) + + mesh_directory = INPUT_DIRECTORY / 'meshes' / mesh + + tidal_forcing = Tides(tidal_source=TidalSource.HAMTIDE) + tidal_forcing.use_all() + forcings = [tidal_forcing] + + configuration = initialize_adcirc( + platform=platform, + mesh_directory=mesh_directory, + modeled_start_time=modeled_start_time, + modeled_duration=modeled_duration, + modeled_timestep=modeled_timestep, + tidal_spinup_duration=tidal_spinup_duration, + perturbations=None, + nems_interval=None, + nems_connections=None, + nems_mediations=None, + nems_sequence=None, + modulefile=INPUT_DIRECTORY / 'modulefiles' / 'envmodules_intel.hera', + forcings=forcings, + adcirc_executable=INPUT_DIRECTORY / 'bin' / 'padcirc', + adcprep_executable=INPUT_DIRECTORY / 'bin' / 'adcprep', + aswip_executable=None, + adcirc_processors=adcirc_processors, + job_duration=job_duration, + output_directory=output_directory, + absolute_paths=False, + overwrite=True, + verbose=False, + ) + generate_adcirc_configuration(output_directory, relative_paths=True, overwrite=True) + + parsed_configuration = ADCIRCRunConfiguration.from_model_configuration_directory(output_directory) + + assert parsed_configuration == configuration + + +def test_nems_adcirc_run_configuration(): + output_directory = OUTPUT_DIRECTORY / 'test_nems_adcirc_run_configuration' + + platform = Platform.HERA + mesh = 'shinnecock' + storm = 'ike' + adcirc_processors = 15 * platform.value['processors_per_node'] + modeled_start_time = datetime(2008, 8, 23) + modeled_duration = timedelta(days=14.5) + modeled_timestep = timedelta(seconds=2) + tidal_spinup_duration = None + nems_interval = timedelta(hours=1) + job_duration = timedelta(hours=6) + + mesh_directory = INPUT_DIRECTORY / 'meshes' / mesh + forcings_directory = INPUT_DIRECTORY / 'forcings' / storm + + nems_connections = ['ATM -> OCN', 'WAV -> OCN'] + nems_mediations = None + nems_sequence = [ + 'ATM -> OCN', + 'WAV -> OCN', + 'ATM', + 'WAV', + 'OCN', + ] + + wind_forcing = AtmosphericMeshForcing( + filename=forcings_directory / 'wind_atm_fin_ch_time_vec.nc', + nws=17, + interval_seconds=3600, + ) + wave_forcing = WaveWatch3DataForcing( + filename=forcings_directory / 'ww3.Constant.20151214_sxy_ike_date.nc', + nrs=5, + interval_seconds=3600, + ) + forcings = [wind_forcing, wave_forcing] + + configuration = initialize_adcirc( + platform=platform, + mesh_directory=mesh_directory, + modeled_start_time=modeled_start_time, + modeled_duration=modeled_duration, + modeled_timestep=modeled_timestep, + tidal_spinup_duration=tidal_spinup_duration, + perturbations=None, + nems_interval=nems_interval, + nems_connections=nems_connections, + nems_mediations=nems_mediations, + nems_sequence=nems_sequence, + modulefile=INPUT_DIRECTORY / 'modulefiles' / 'envmodules_intel.hera', + forcings=forcings, + adcirc_executable=INPUT_DIRECTORY / 'bin' / 'NEMS.x', + adcprep_executable=INPUT_DIRECTORY / 'bin' / 'adcprep', + aswip_executable=None, + adcirc_processors=adcirc_processors, + job_duration=job_duration, + output_directory=output_directory, + absolute_paths=False, + overwrite=True, + verbose=False, + ) + generate_adcirc_configuration(output_directory, relative_paths=True, overwrite=True) + + parsed_configuration = NEMSADCIRCRunConfiguration.from_model_configuration_directory(output_directory) + + assert parsed_configuration == configuration From 45c7e632e6984f396291b282dad1cebb9a229496 Mon Sep 17 00:00:00 2001 From: zacharyburnettNOAA Date: Tue, 30 Nov 2021 14:47:12 -0500 Subject: [PATCH 02/33] use `importlib` --- setup.py | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/setup.py b/setup.py index e5dbd209..5936de02 100644 --- a/setup.py +++ b/setup.py @@ -1,4 +1,5 @@ from collections.abc import Mapping +from importlib import metadata as importlib_metadata import os from pathlib import Path import re @@ -21,11 +22,11 @@ def installed_packages() -> List[str]: + installed_distributions = importlib_metadata.distributions() return [ - re.split('#egg=', re.split('==| @ ', package.decode())[0])[-1].lower() - for package in subprocess.run( - f'{sys.executable} -m pip freeze', shell=True, capture_output=True, - ).stdout.splitlines() + distribution.metadata['Name'].lower() + for distribution in installed_distributions + if distribution.metadata['Name'] is not None ] From 812b67d5ea514a09d5e5008739ddc6ba9585d030 Mon Sep 17 00:00:00 2001 From: zacharyburnettNOAA Date: Thu, 2 Dec 2021 13:36:46 -0500 Subject: [PATCH 03/33] add usage examples to CLI client page --- docs/source/client.rst | 231 +++++++++++++++++++++++++++++++++++++++-- docs/source/conf.py | 3 + docs/source/index.rst | 1 - 3 files changed, 223 insertions(+), 12 deletions(-) diff --git a/docs/source/client.rst b/docs/source/client.rst index 3ecf0ffe..cee326db 100644 --- a/docs/source/client.rst +++ b/docs/source/client.rst @@ -1,30 +1,239 @@ CLI Commands ============ -``initialize_adcirc`` - create JSON configuration files -------------------------------------------------------- +``initialize_adcirc`` +--------------------- + +``initialize_adcirc`` creates :ref:`json_configurations:JSON Configurations` from initial parameters of a model run (model start and end times, forcing files, storm track ID, etc.). +These JSON files provide a portable encapsulation of the entire model run, including model configurations in ``fort.15`` and NEMS couplings. +The files are read by :ref:`client:``generate_adcirc``` to generate the actual model configuration; ``generate_adcirc`` must be run again every time the JSON files change to keep the configuration up to date. .. program-output:: initialize_adcirc -h -.. autofunction:: coupledmodeldriver.client.initialize_adcirc.initialize_adcirc +ADCIRC run options that are not exposed by this command, such as ``runs`` or ``gwce_solution_scheme``, can be specified by directly modifying the JSON files. + +The following command creates JSON files for coupling ``(ATMESH + WW3DATA) -> ADCIRC`` over a small Shinnecock Inlet mesh: + +.. code-block:: shell + + initialize_adcirc \ + --platform HERA \ + --mesh-directory /scratch2/COASTAL/coastal/save/shared/models/meshes/shinnecock/v1.0 \ + --output-directory hera_shinnecock_ike_spinup_tidal_atmesh_ww3data \ + --modeled-start-time 20080823 \ + --modeled-duration 14:06:00:00 \ + --modeled-timestep 00:00:02 \ + --nems-interval 01:00:00 \ + --adcirc-executable /scratch2/COASTAL/coastal/save/shared/repositories/CoastalApp/ALLBIN_INSTALL/NEMS-adcirc-atmesh-ww3data.x \ + --adcirc-processors 40 + --adcprep-executable /scratch2/COASTAL/coastal/save/shared/repositories/CoastalApp/ALLBIN_INSTALL/adcprep \ + --modulefile /scratch2/COASTAL/coastal/save/shared/repositories/CoastalApp/modulefiles/envmodules_intel.hera \ + --forcings tidal,atmesh,ww3data \ + --tidal-source TPXO \ + --tidal-path /scratch2/COASTAL/coastal/save/shared/models/forcings/tides/h_tpxo9.v1.nc \ + --tidal-spinup-duration 12:06:00:00 \ + --atmesh-path /scratch2/COASTAL/coastal/save/shared/models/forcings/shinnecock/ike/wind_atm_fin_ch_time_vec.nc \ + --ww3data-path /scratch2/COASTAL/coastal/save/shared/models/forcings/shinnecock/ike/ww3.Constant.20151214_sxy_ike_date.nc + +This will create the directory ``hera_shinnecock_ike_spinup_tidal_atmesh_ww3data/`` with the following JSON configuration files: + +.. code-block:: -``generate_adcirc`` - generate configuration from JSON configuration files --------------------------------------------------------------------------- + 📂 hera_shinnecock_ike_spinup_tidal_atmesh_ww3data/ + ┣ 📜 configure_adcirc.json + ┣ 📜 configure_atmesh.json + ┣ 📜 configure_modeldriver.json + ┣ 📜 configure_nems.json + ┣ 📜 configure_slurm.json + ┣ 📜 configure_tidal_forcing.json + ┗ 📜 configure_ww3data.json + +These files contain relevant configuration values for an ADCIRC run. You will likely wish to change these values to alter the +resulting run, before generating the actual model configuration. For instance, NEMS connections and the run sequence need to be +manually specified in ``configure_nems.json``. + +``generate_adcirc`` +------------------- + +``generate_adcirc`` reads JSON files (created by :ref:`client:``initialize_adcirc```) and creates a set of ADCIRC configurations +(``fort.14``, ``fort.15``, etc.), as well as a script with which to submit the model run to a job manager such as Slurm. .. program-output:: generate_adcirc -h -.. autofunction:: coupledmodeldriver.generate.adcirc.generate.generate_adcirc_configuration +The following command will read the JSON files created in the example above and generate the following files: + +.. code-block:: shell + + cd hera_shinnecock_ike_spinup_tidal_atmesh_ww3data + generate_adcirc -``check_completion`` - check status of currently running model --------------------------------------------------------------- +.. code-block:: + + 📂 hera_shinnecock_ike_spinup_tidal_atmesh_ww3data/ + ┣ 📜 configure_adcirc.json + ┣ 📜 configure_atmesh.json + ┣ 📜 configure_modeldriver.json + ┣ 📜 configure_nems.json + ┣ 📜 configure_slurm.json + ┣ 📜 configure_tidal_forcing.json + ┣ 📜 configure_ww3data.json + ┣ 📂 spinup/ + ┃ ┣ 📜 fort.13 + ┃ ┣ 🔗 fort.14 -> ../fort.14 + ┃ ┣ 📜 fort.15 + ┃ ┣ 📜 nems.configure + ┃ ┣ 📜 model_configure + ┃ ┣ 🔗 atm_namelist.rc -> ./model_configure + ┃ ┣ 📜 config.rc + ┃ ┣ 📜 setup.job + ┃ ┗ 📜 adcirc.job + ┣ 📂 runs/ + ┃ ┗ 📂 unperturbed/ + ┃ ┣ 📜 fort.13 + ┃ ┣ 🔗 fort.14 -> ../../fort.14 + ┃ ┣ 📜 fort.15 + ┃ ┣ 🔗 fort.67.nc -> ../../spinup/fort.67.nc + ┃ ┣ 🔗 fort.68.nc -> ../../spinup/fort.68.nc + ┃ ┣ 📜 nems.configure + ┃ ┣ 📜 model_configure + ┃ ┣ 🔗 atm_namelist.rc -> ./model_configure + ┃ ┣ 📜 config.rc + ┃ ┣ 📜 setup.job + ┃ ┗ 📜 adcirc.job + ┣ 📜 fort.14 + ┣ 📜 cleanup.sh + ┗ 📜 run_hera.sh + +``check_completion`` +-------------------- + +``check_completion`` checks the completion status of a running model directory. .. program-output:: check_completion -h -.. autofunction:: coupledmodeldriver.client.check_completion.check_completion +.. code-block:: shell + + check_completion + +.. code-block:: json + + { + "hera_shinnecock_ike_spinup_tidal_atmesh_ww3data": { + "spinup": "running - 15%", + "runs": "not_started - 0%" + } + } + +you can also pass a specific directory (or several directories): + +.. code-block:: shell + + check_completion spinup + +.. code-block:: json + + { + "spinup": "running - 27%" + } + +.. code-block:: shell -``unqueued_runs`` - find and submit runs that haven't been queued to job manager --------------------------------------------------------------------------------- + cd run_20211027_florence_besttrack_250msubset_quadrature + check_completion runs/*_13 + +.. code-block:: json + + { + "vortex_4_variable_perturbation_13": "completed - 100.0%", + "vortex_4_variable_quadrature_13": "not_started - 0%" + } + +if a run has an error, you can pass `--verbose` to see detailed logs: + +.. code-block:: shell + + check_completion spinup + +.. code-block:: json + + { + "spinup": "error - 0%" + } + +.. code-block:: shell + + check_completion spinup --verbose + +.. code-block:: json + + { + "spinup": { + "status": "error", + "progress": "0%", + "error": { + "ADCIRC_SETUP_SPINUP.err.log": [ + "forrtl: severe (24): end-of-file during read, unit -4, file /proc/92195/fd/0\n", + "Image PC Routine Line Source \n", + "adcprep 000000000069A72E Unknown Unknown Unknown\n", + "adcprep 00000000006CBAAF Unknown Unknown Unknown\n", + "adcprep 000000000050A5CB openprepfiles_ 6996 prep.F\n", + "adcprep 0000000000507F22 prep13_ 753 prep.F\n", + "adcprep 000000000042E2E9 prepinput_ 717 adcprep.F\n", + "adcprep 000000000042BCDB MAIN__ 239 adcprep.F\n", + "adcprep 000000000040B65E Unknown Unknown Unknown\n", + "libc-2.17.so 00002AAEC02EB555 __libc_start_main Unknown Unknown\n", + "adcprep 000000000040B569 Unknown Unknown Unknown\n", + "srun: error: h24c51: task 0: Exited with exit code 24\n", + "srun: launch/slurm: _step_signal: Terminating StepId=25366266.1\n" + ] + } + } + } + +.. code-block:: shell + + check_completion runs + +.. code-block:: json + + { + "spinup": "failed - 0%" + } + +.. code-block:: shell + + check_completion runs --verbose + +.. code-block:: json + + { + "runs": { + "status": "failed", + "progress": "0%", + "failed": { + "fort.16": "ADCIRC output file `fort.16` not found" + }, + "error": { + "ADCIRC_SETUP_unperturbed.err.log": [ + "slurmstepd: error: execve(): /scratch2/COASTAL/coastal/save/shared/repositories/CoastalApp/ADCIRC/ALLBIN_INSTALL/adcprep: No such file or directory\n", + "srun: error: h18c49: task 0: Exited with exit code 2\n", + "srun: launch/slurm: _step_signal: Terminating StepId=25366268.0\n" + ] + } + } + } + +``unqueued_runs`` +----------------- + +``unqueued_runs`` finds and optionally submits runs that haven't been queued to a job manager. .. program-output:: unqueued_runs -h +corresponding Python functions +------------------------------ + +.. autofunction:: coupledmodeldriver.client.initialize_adcirc.initialize_adcirc +.. autofunction:: coupledmodeldriver.generate.adcirc.generate.generate_adcirc_configuration +.. autofunction:: coupledmodeldriver.client.check_completion.check_completion .. autofunction:: coupledmodeldriver.client.unqueued_runs.get_unqueued_runs diff --git a/docs/source/conf.py b/docs/source/conf.py index 226d7901..ce5dc45b 100644 --- a/docs/source/conf.py +++ b/docs/source/conf.py @@ -78,6 +78,7 @@ def repository_root(path: PathLike = None) -> Path: 'sphinx.ext.autosummary', # The Napoleon extension allows for nicer argument formatting. 'sphinx.ext.napoleon', + 'sphinx.ext.autosectionlabel', 'm2r2', ] @@ -103,3 +104,5 @@ def repository_root(path: PathLike = None) -> Path: # -- Extension configuration ------------------------------------------------- source_suffix = ['.rst', '.md'] + +autosectionlabel_prefix_document = True diff --git a/docs/source/index.rst b/docs/source/index.rst index f4a219e6..600d5435 100644 --- a/docs/source/index.rst +++ b/docs/source/index.rst @@ -3,7 +3,6 @@ .. toctree:: :hidden: - readme client json_configurations run_configurations From df5dd743af02137f6e65db42046e085254c1db7b Mon Sep 17 00:00:00 2001 From: zacharyburnettNOAA Date: Thu, 2 Dec 2021 13:39:38 -0500 Subject: [PATCH 04/33] simplify headers --- docs/source/json_configurations.rst | 49 ++++++++++++++++++----------- 1 file changed, 31 insertions(+), 18 deletions(-) diff --git a/docs/source/json_configurations.rst b/docs/source/json_configurations.rst index 694f739c..00e1f035 100644 --- a/docs/source/json_configurations.rst +++ b/docs/source/json_configurations.rst @@ -19,53 +19,66 @@ This can be turned into an ADCIRC-only configuration, that ingests tidal forcing Then, the configuration can be regenerated with ``generate_adcirc``. -model driver configuration (``configure_modeldriver.json``) ------------------------------------------------------------ +``configure_modeldriver.json`` +------------------------------ + .. autoclass:: coupledmodeldriver.configure.base.NEMSJSON -Slurm job manager configuration (``configure_slurm.json``) ------------------------------------------------------------ +``configure_slurm.json`` +------------------------ + .. autoclass:: coupledmodeldriver.configure.base.SlurmJSON -NEMS configuration (``configure_nems.json``) --------------------------------------------- +``configure_nems.json`` +----------------------- + .. autoclass:: coupledmodeldriver.configure.base.ModelDriverJSON -ADCIRC configuration (``configure_adcirc.json``) ------------------------------------------------- +``configure_adcirc.json`` +------------------------- + .. autoclass:: coupledmodeldriver.generate.adcirc.base.ADCIRCJSON -tidal forcing configuration (``configure_tidal.json``) ------------------------------------------------------- +``configure_tidal.json`` +------------------------ + .. autoclass:: coupledmodeldriver.configure.forcings.base.TidalForcingJSON -best track forcing configuration (``configure_besttrack.json``) ---------------------------------------------------------------- +``configure_besttrack.json`` +---------------------------- + .. autoclass:: coupledmodeldriver.configure.forcings.base.BestTrackForcingJSON -OWI forcing configuration (``configure_owi.json``) --------------------------------------------------- +``configure_owi.json`` +---------------------- + .. autoclass:: coupledmodeldriver.configure.forcings.base.OWIForcingJSON -atmosphere combined mesh (ATMESH) forcing configuration (``configure_atmesh.json``) ------------------------------------------------------------------------------------ +``configure_atmesh.json`` +------------------------- + .. autoclass:: coupledmodeldriver.configure.forcings.base.ATMESHForcingJSON -WaveWatch III output file forcing configuration (``configure_ww3data.json``) ----------------------------------------------------------------------------- +``configure_ww3data.json`` +-------------------------- + .. autoclass:: coupledmodeldriver.configure.forcings.base.WW3DATAForcingJSON abstract classes ---------------- + configuration ^^^^^^^^^^^^^ + .. autoclass:: coupledmodeldriver.configure.base.ConfigurationJSON .. autoclass:: coupledmodeldriver.configure.base.AttributeJSON NEMS ^^^^ + .. autoclass:: coupledmodeldriver.configure.base.NEMSCapJSON model ^^^^^ + .. autoclass:: coupledmodeldriver.configure.models.ModelJSON From f839c6cb044141f87572708fdb2b7c176f370ff7 Mon Sep 17 00:00:00 2001 From: zacharyburnettNOAA Date: Thu, 2 Dec 2021 13:54:21 -0500 Subject: [PATCH 05/33] add usage examples to JSON configurations --- coupledmodeldriver/configure/base.py | 48 +++++++++++++++++++ coupledmodeldriver/configure/forcings/base.py | 35 ++++++++++++++ coupledmodeldriver/generate/adcirc/base.py | 16 ++++++- tests/test_configuration.py | 1 + 4 files changed, 99 insertions(+), 1 deletion(-) diff --git a/coupledmodeldriver/configure/base.py b/coupledmodeldriver/configure/base.py index 57a24b4b..d88a5cdd 100644 --- a/coupledmodeldriver/configure/base.py +++ b/coupledmodeldriver/configure/base.py @@ -220,6 +220,15 @@ class SlurmJSON(ConfigurationJSON): Slurm configuration parameters in ``configure_slurm.json`` stores account and partition names, wall-clock time, email notification, etc. + + .. code-block:: python + + configuration = SlurmJSON( + account='coastal', + tasks=602, + job_duration=timedelta(hours=6), + ) + """ name = 'Slurm' @@ -333,6 +342,14 @@ class ModelDriverJSON(ConfigurationJSON): model driver configuration in ``configure_modeldriver.json`` stores platform information and a dictionary of perturbations of other configurations per each run + + .. code-block:: python + + configuration = ModelDriverJSON( + platform=Platform.HERA, + perturbations=None, + ) + """ name = 'ModelDriver' @@ -435,6 +452,37 @@ class NEMSJSON(ConfigurationJSON): NEMS configuration in ``configure_nems.json`` stores NEMS executable path, modeled times / interval, connections / mediations, and the order of the run sequence + + .. code-block:: python + + model_entries = [ + AtmosphericForcingEntry('Wind_HWRF_SANDY_Nov2018_ExtendedSmoothT.nc'), + WaveWatch3ForcingEntry('ww3.HWRF.NOV2018.2012_sxy.nc'), + ADCIRCEntry(600), + ] + + connections = [['ATM', 'OCN'], ['WAV', 'OCN']] + mediations = None + sequence = [ + 'ATM -> OCN', + 'WAV -> OCN', + 'ATM', + 'WAV', + 'OCN', + ] + + configuration = NEMSJSON( + executable_path='NEMS.x', + modeled_start_time=datetime(2012, 10, 22, 6), + modeled_end_time=datetime(2012, 10, 22, 6) + timedelta(days=14.5), + interval=timedelta(hours=1), + connections=connections, + mediations=mediations, + sequence=sequence, + ) + + modeling_system = configuration.to_nemspy(model_entries) + """ name = 'NEMS' diff --git a/coupledmodeldriver/configure/forcings/base.py b/coupledmodeldriver/configure/forcings/base.py index 96ff446a..bbe1dda1 100644 --- a/coupledmodeldriver/configure/forcings/base.py +++ b/coupledmodeldriver/configure/forcings/base.py @@ -111,6 +111,14 @@ class TidalForcingJSON(FileForcingJSON): tidal configuration in ``configure_tidal.json`` stores tidal database and constituent information + + .. code-block:: python + + configuration = TidalForcingJSON( + tidal_source='HAMTIDE', + constituents='all', + ) + """ name = 'TIDAL' @@ -214,6 +222,15 @@ class BestTrackForcingJSON(WindForcingJSON, AttributeJSON): storm best track configuration in ``configure_besttrack.json`` stores storm ID, NWS parameter, forcing read interval, start and end dates, and optionally a path to an existing `fort.22` file + + .. code-block:: python + + configuration = BestTrackForcingJSON(storm_id='florence2018') + + configuration = BestTrackForcingJSON.from_fort22('./fort.22') + + configuration.to_adcircpy().write('output.fort.22') + """ name = 'BestTrack' @@ -390,6 +407,15 @@ class ATMESHForcingJSON(WindForcingJSON, FileForcingJSON, TimestepForcingJSON, N atmospheric mesh (ATMESH) configuration in ``configure_atmesh.json`` stores NWS parameter, forcing read interval, and optionally NEMS parameters + + .. code-block:: python + + configuration = ATMESHForcingJSON( + resource='Wind_HWRF_SANDY_Nov2018_ExtendedSmoothT.nc', + nws=17, + interval=timedelta(hours=1), + ) + """ name = 'ATMESH' @@ -460,6 +486,15 @@ class WW3DATAForcingJSON(WaveForcingJSON, FileForcingJSON, TimestepForcingJSON, WaveWatch III output file configuration in ``configure_ww3data.json`` stores NRS parameter, forcing read interval, and optionally NEMS parameters + + .. code-block:: python + + configuration = WW3DATAForcingJSON( + resource='ww3.HWRF.NOV2018.2012_sxy.nc', + nrs=5, + interval=timedelta(hours=1), + ) + """ name = 'WW3DATA' diff --git a/coupledmodeldriver/generate/adcirc/base.py b/coupledmodeldriver/generate/adcirc/base.py index bef4db19..3c41b825 100644 --- a/coupledmodeldriver/generate/adcirc/base.py +++ b/coupledmodeldriver/generate/adcirc/base.py @@ -128,6 +128,20 @@ class ADCIRCJSON(ModelJSON, NEMSCapJSON, AttributeJSON): ADCIRC configuration in ``configure_adcirc.json`` stores a number of ADCIRC parameters (``ICS``, ``IM``, etc.) and optionally NEMS parameters + + .. code-block:: python + + configuration = ADCIRCJSON( + adcirc_executable_path='adcirc', + adcprep_executable_path='adcprep', + modeled_start_time=datetime(2012, 10, 22, 6), + modeled_end_time=datetime(2012, 10, 22, 6) + timedelta(days=14.5), + modeled_timestep=timedelta(seconds=2), + fort_13_path=None, + fort_14_path=INPUT_DIRECTORY / 'meshes' / 'shinnecock' / 'fort.14', + tidal_spinup_duration=timedelta(days=12.5), + ) + """ name = 'ADCIRC' @@ -192,7 +206,7 @@ def __init__( **kwargs, ): """ - :param adcirc_executable_path: file path to ``adcirc`` or `NEMS.x` + :param adcirc_executable_path: file path to ``adcirc`` or ``NEMS.x`` :param adcprep_executable_path: file path to ``adcprep`` :param aswip_executable_path: file path to ``aswip`` :param modeled_start_time: start time in model run diff --git a/tests/test_configuration.py b/tests/test_configuration.py index d41d7403..14cb2f10 100644 --- a/tests/test_configuration.py +++ b/tests/test_configuration.py @@ -8,6 +8,7 @@ from coupledmodeldriver import Platform from coupledmodeldriver.configure import ( ATMESHForcingJSON, + BestTrackForcingJSON, ModelDriverJSON, NEMSJSON, SlurmJSON, From b49bd726dd0cbb6aab5f4e6ccd11cbdb8a981042 Mon Sep 17 00:00:00 2001 From: zacharyburnettNOAA Date: Thu, 2 Dec 2021 14:01:14 -0500 Subject: [PATCH 06/33] fix header positions --- docs/source/json_configurations.rst | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/source/json_configurations.rst b/docs/source/json_configurations.rst index 00e1f035..54ada326 100644 --- a/docs/source/json_configurations.rst +++ b/docs/source/json_configurations.rst @@ -22,7 +22,7 @@ Then, the configuration can be regenerated with ``generate_adcirc``. ``configure_modeldriver.json`` ------------------------------ -.. autoclass:: coupledmodeldriver.configure.base.NEMSJSON +.. autoclass:: coupledmodeldriver.configure.base.ModelDriverJSON ``configure_slurm.json`` ------------------------ @@ -32,7 +32,7 @@ Then, the configuration can be regenerated with ``generate_adcirc``. ``configure_nems.json`` ----------------------- -.. autoclass:: coupledmodeldriver.configure.base.ModelDriverJSON +.. autoclass:: coupledmodeldriver.configure.base.NEMSJSON ``configure_adcirc.json`` ------------------------- From 1a520c3d71eda757b10f42ab5345dea0f708298c Mon Sep 17 00:00:00 2001 From: zacharyburnettNOAA Date: Thu, 2 Dec 2021 15:45:20 -0500 Subject: [PATCH 07/33] add docs badge --- README.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index bde1ecf1..b8ba334f 100644 --- a/README.md +++ b/README.md @@ -6,6 +6,7 @@ [![version](https://img.shields.io/pypi/v/CoupledModelDriver)](https://pypi.org/project/CoupledModelDriver) [![license](https://img.shields.io/github/license/noaa-ocs-modeling/CoupledModelDriver)](https://creativecommons.org/share-your-work/public-domain/cc0) [![style](https://sourceforge.net/p/oitnb/code/ci/default/tree/_doc/_static/oitnb.svg?format=raw)](https://sourceforge.net/p/oitnb/code) +[![documentation](https://readthedocs.org/projects/coupledmodeldriver/badge/?version=latest)](https://coupledmodeldriver.readthedocs.io/en/latest/?badge=latest) CoupledModelDriver generates an overlying job submission framework and configuration directories for NEMS-coupled coastal ocean model ensembles. @@ -14,7 +15,7 @@ model ensembles. pip install coupledmodeldriver ``` -It utilizes [NEMSpy](https://pypi.org/project/nemspy) to generate NEMS configuration files, shares common configurations +It utilizes [NEMSpy](https://nemspy.readthedocs.io) to generate NEMS configuration files, shares common configurations between runs, and organizes spinup and mesh partition into separate jobs for dependant submission. ## supported models and platforms From 29b85b769502ba30afdd446e378dac3a02dc90c9 Mon Sep 17 00:00:00 2001 From: zacharyburnettNOAA Date: Thu, 2 Dec 2021 15:49:22 -0500 Subject: [PATCH 08/33] add explicit link --- README.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/README.md b/README.md index b8ba334f..273ad4af 100644 --- a/README.md +++ b/README.md @@ -18,6 +18,8 @@ pip install coupledmodeldriver It utilizes [NEMSpy](https://nemspy.readthedocs.io) to generate NEMS configuration files, shares common configurations between runs, and organizes spinup and mesh partition into separate jobs for dependant submission. +Documentation can be found at https://coupledmodeldriver.readthedocs.io + ## supported models and platforms - **models** From 907e14eeb5b8fa58f031c120492d63f950422803 Mon Sep 17 00:00:00 2001 From: zacharyburnettNOAA Date: Fri, 3 Dec 2021 10:58:18 -0500 Subject: [PATCH 09/33] fix logger --- coupledmodeldriver/utilities.py | 40 ++++++++++++++------------------- 1 file changed, 17 insertions(+), 23 deletions(-) diff --git a/coupledmodeldriver/utilities.py b/coupledmodeldriver/utilities.py index 9a8fb30a..237c3417 100644 --- a/coupledmodeldriver/utilities.py +++ b/coupledmodeldriver/utilities.py @@ -45,44 +45,38 @@ def get_logger( if logger.level == logging.NOTSET and len(logger.handlers) == 0: # check if logger has a parent if '.' in name: + if isinstance(logger.parent, logging.RootLogger): + for existing_console_handler in [ + handler for handler in logger.parent.handlers if not isinstance(handler, logging.FileHandler) + ]: + logger.parent.removeHandler(existing_console_handler) logger.parent = get_logger(name.rsplit('.', 1)[0]) else: # otherwise create a new split-console logger - logger.setLevel(logging.DEBUG) if console_level != logging.NOTSET: - if console_level <= logging.INFO: + for existing_console_handler in [ + handler for handler in logger.handlers if not isinstance(handler, logging.FileHandler) + ]: + logger.removeHandler(existing_console_handler) - def logging_output_filter(record): - return record.levelno <= logging.INFO - - console_output = logging.StreamHandler(sys.stdout) - console_output.setLevel(console_level) - console_output.addFilter(logging_output_filter) - logger.addHandler(console_output) - - console_errors = logging.StreamHandler(sys.stderr) - console_errors.setLevel(max((console_level, logging.WARNING))) - logger.addHandler(console_errors) + console_output = logging.StreamHandler(sys.stdout) + console_output.setLevel(console_level) + logger.addHandler(console_output) if log_filename is not None: file_handler = logging.FileHandler(log_filename) file_handler.setLevel(file_level) for existing_file_handler in [ - handler for handler in logger.handlers if type(handler) is logging.FileHandler + handler for handler in logger.handlers if isinstance(handler, logging.FileHandler) ]: logger.removeHandler(existing_file_handler) logger.addHandler(file_handler) - log_formatter = logging.Formatter( - log_format - if log_format is not None - else '[%(asctime)s] %(name)-9s %(levelname)-8s: %(message)s' - ) + if log_format is None: + log_format = '[%(asctime)s] %(name)-15s %(levelname)-8s: %(message)s' + log_formatter = logging.Formatter(log_format) for handler in logger.handlers: - if log_format is not None: - handler.setFormatter(log_formatter) - elif handler.formatter is None: - handler.setFormatter(log_formatter) + handler.setFormatter(log_formatter) return logger From 76a8d08ded1d159b200c2197cc7addac852518dd Mon Sep 17 00:00:00 2001 From: zacharyburnettNOAA Date: Fri, 3 Dec 2021 11:01:56 -0500 Subject: [PATCH 10/33] add docstring --- coupledmodeldriver/utilities.py | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/coupledmodeldriver/utilities.py b/coupledmodeldriver/utilities.py index 237c3417..a5598053 100644 --- a/coupledmodeldriver/utilities.py +++ b/coupledmodeldriver/utilities.py @@ -35,6 +35,17 @@ def get_logger( console_level: int = None, log_format: str = None, ) -> logging.Logger: + """ + instantiate logger instance + + :param name: name of logger + :param log_filename: path to log file + :param file_level: minimum log level to write to log file + :param console_level: minimum log level to print to console + :param log_format: logger message format + :return: instance of a Logger object + """ + if file_level is None: file_level = logging.DEBUG if console_level is None: From 5397d7509045078fec582a166cadd3ef2007d86e Mon Sep 17 00:00:00 2001 From: zacharyburnettNOAA Date: Fri, 10 Dec 2021 12:48:26 -0500 Subject: [PATCH 11/33] ensure path object --- coupledmodeldriver/client/unqueued_runs.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/coupledmodeldriver/client/unqueued_runs.py b/coupledmodeldriver/client/unqueued_runs.py index ac9d2394..147f0fa3 100644 --- a/coupledmodeldriver/client/unqueued_runs.py +++ b/coupledmodeldriver/client/unqueued_runs.py @@ -46,6 +46,8 @@ def get_run_directories(directories: List[os.PathLike], model: ModelJSON = None) directories = [directories] run_directories = [] for directory in directories: + if not isinstance(directory, Path): + directory = Path(directory) if is_model_directory(directory, model=model): run_directories.append(directory) else: From 0b51f5c0780117e18f8e98f807c20bd09c4771e3 Mon Sep 17 00:00:00 2001 From: zacharyburnettNOAA Date: Fri, 10 Dec 2021 14:27:41 -0500 Subject: [PATCH 12/33] only use aswip parameters if they are defined --- coupledmodeldriver/generate/adcirc/script.py | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/coupledmodeldriver/generate/adcirc/script.py b/coupledmodeldriver/generate/adcirc/script.py index 3b146d40..26474f76 100644 --- a/coupledmodeldriver/generate/adcirc/script.py +++ b/coupledmodeldriver/generate/adcirc/script.py @@ -173,12 +173,15 @@ def rmax_approaches(self, rmax_approaches: int): self.__rmax_approaches = rmax_approaches def __str__(self) -> str: + aswip_command = f'{self.path.as_posix()} -n {self.nws}' + + if self.isotachs is not None: + aswip_command = f'{aswip_command} -m {self.isotachs}' + if self.isotachs is not None: + aswip_command = f'{aswip_command} -z {self.rmax_approaches}' + return '\n'.join( - [ - f'{self.path.as_posix()} -n {self.nws} -m {self.isotachs} -z {self.rmax_approaches}', - 'mv fort.22 fort.22.original', - 'mv NWS_20_fort.22 fort.22', - ] + [f'{aswip_command}', 'mv fort.22 fort.22.original', 'mv NWS_20_fort.22 fort.22'] ) @classmethod From fb0676248a9af3ab3fcacc1eaf55436c24ac49e8 Mon Sep 17 00:00:00 2001 From: zacharyburnettNOAA Date: Mon, 13 Dec 2021 11:40:14 -0500 Subject: [PATCH 13/33] fix log filename to be slurm run name --- coupledmodeldriver/script.py | 21 +++++++++------------ 1 file changed, 9 insertions(+), 12 deletions(-) diff --git a/coupledmodeldriver/script.py b/coupledmodeldriver/script.py index e31b5a83..6c040d0b 100644 --- a/coupledmodeldriver/script.py +++ b/coupledmodeldriver/script.py @@ -146,11 +146,9 @@ def __init__( self.slurm_email_type = slurm_email_type self.slurm_email_address = slurm_email_address - self.slurm_error_filename = ( - slurm_error_filename if slurm_error_filename is not None else 'slurm.log' - ) + self.slurm_error_filename = slurm_error_filename self.slurm_log_filename = ( - slurm_log_filename if slurm_log_filename is not None else 'slurm.log' + slurm_log_filename if slurm_log_filename is not None else f'{slurm_run_name}.log' ) self.slurm_nodes = slurm_nodes @@ -275,29 +273,28 @@ class EnsembleGenerationJob(JobScript): def __init__( self, platform: Platform, - slurm_run_name: str = None, slurm_tasks: int = None, slurm_duration: timedelta = None, slurm_account: str = None, commands: List[str] = None, + parallel: bool = False, **kwargs, ): - if slurm_run_name is None: - slurm_run_name = 'ADCIRC_GENERATE_CONFIGURATION' - super().__init__( platform=platform, commands=commands, - slurm_run_name=slurm_run_name, + slurm_run_name='ADCIRC_GENERATE_CONFIGURATION', slurm_tasks=slurm_tasks, slurm_duration=slurm_duration, slurm_account=slurm_account, **kwargs, ) - self.commands.extend( - ['rm **/*.log', 'generate_adcirc', 'echo "use ./run_hera.sh to start model"'] - ) + generate_command = 'generate_adcirc' + if parallel: + generate_command = f'{generate_command} --parallel' + + self.commands.extend([generate_command, 'echo "use ./run_hera.sh to start model"']) class EnsembleRunScript(Script): From c185217abe8d8b15c97c094e8a937256b6671f26 Mon Sep 17 00:00:00 2001 From: zacharyburnettNOAA Date: Wed, 22 Dec 2021 14:01:33 -0500 Subject: [PATCH 14/33] wrap connection attempt in try block --- coupledmodeldriver/configure/forcings/base.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/coupledmodeldriver/configure/forcings/base.py b/coupledmodeldriver/configure/forcings/base.py index bbe1dda1..f6abe650 100644 --- a/coupledmodeldriver/configure/forcings/base.py +++ b/coupledmodeldriver/configure/forcings/base.py @@ -293,8 +293,11 @@ def adcircpy_forcing(self) -> BestTrackForcing: end_date=self['end_date'], ) if self['storm_id'] is not None and forcing.storm_id != self['storm_id']: - forcing.storm_id = self['storm_id'] - self['storm_id'] = forcing.storm_id + try: + forcing.storm_id = self['storm_id'] + self['storm_id'] = forcing.storm_id + except ConnectionError: + pass elif self.__dataframe is not None: forcing = BestTrackForcing( storm=self.__dataframe, From 2a58cc76815ba8e28a37772f3371a62b45216187 Mon Sep 17 00:00:00 2001 From: zacharyburnettNOAA Date: Mon, 27 Dec 2021 09:45:28 -0500 Subject: [PATCH 15/33] use print --- coupledmodeldriver/client/unqueued_runs.py | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) diff --git a/coupledmodeldriver/client/unqueued_runs.py b/coupledmodeldriver/client/unqueued_runs.py index 147f0fa3..5c72c265 100644 --- a/coupledmodeldriver/client/unqueued_runs.py +++ b/coupledmodeldriver/client/unqueued_runs.py @@ -4,13 +4,8 @@ from pathlib import Path from typing import Any, Dict, List -from coupledmodeldriver.client.check_completion import ( - check_completion, - is_model_directory, - MODELS, -) +from coupledmodeldriver.client.check_completion import (MODELS, check_completion, is_model_directory) from coupledmodeldriver.configure import ModelJSON -from coupledmodeldriver.utilities import LOGGER def parse_missing_jobs_arguments() -> Dict[str, Any]: @@ -107,8 +102,8 @@ def main(): unqueued_runs = get_unqueued_runs(directories, model=model) for run_name, run_directory in unqueued_runs.items(): + print(run_name) if submit: - LOGGER.info(f'submitting unqueued run "{run_name}"') dependencies = "afterok:$(sbatch setup.job | awk '{print $NF}')" if dependency is not None: dependencies = f'{dependencies}:{dependency}' @@ -117,8 +112,6 @@ def main(): os.chdir(run_directory) os.system(f'sbatch --dependency={dependencies} adcirc.job') os.chdir(starting_directory) - else: - LOGGER.info(f'found unqueued run "{run_name}"') if __name__ == '__main__': From bcaee44c603fa80561b0e9579092e06c4d15bf9c Mon Sep 17 00:00:00 2001 From: zacharyburnettNOAA Date: Mon, 27 Dec 2021 09:50:06 -0500 Subject: [PATCH 16/33] sort names --- coupledmodeldriver/client/unqueued_runs.py | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/coupledmodeldriver/client/unqueued_runs.py b/coupledmodeldriver/client/unqueued_runs.py index 5c72c265..eb2f3ef9 100644 --- a/coupledmodeldriver/client/unqueued_runs.py +++ b/coupledmodeldriver/client/unqueued_runs.py @@ -101,18 +101,25 @@ def main(): dependency = arguments['dependency'] unqueued_runs = get_unqueued_runs(directories, model=model) - for run_name, run_directory in unqueued_runs.items(): - print(run_name) - if submit: + starting_directory = Path.cwd() + if submit: + unqueued_run_names = [] + for run_name, run_directory in unqueued_runs.items(): dependencies = "afterok:$(sbatch setup.job | awk '{print $NF}')" if dependency is not None: dependencies = f'{dependencies}:{dependency}' - starting_directory = Path.cwd() os.chdir(run_directory) os.system(f'sbatch --dependency={dependencies} adcirc.job') os.chdir(starting_directory) + unqueued_run_names.append(run_name) + else: + unqueued_run_names = list(unqueued_runs) + + for run_name in sorted(unqueued_run_names): + print(run_name) + if __name__ == '__main__': main() From 86e1b4ca45d9ac8f4323b8c18ebf225d5e13142c Mon Sep 17 00:00:00 2001 From: zacharyburnettNOAA Date: Mon, 27 Dec 2021 18:22:22 -0500 Subject: [PATCH 17/33] add absolute write argument --- coupledmodeldriver/configure/base.py | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-) diff --git a/coupledmodeldriver/configure/base.py b/coupledmodeldriver/configure/base.py index d88a5cdd..dde501ee 100644 --- a/coupledmodeldriver/configure/base.py +++ b/coupledmodeldriver/configure/base.py @@ -171,11 +171,14 @@ def from_file(cls, filename: PathLike) -> 'ConfigurationJSON': return cls(**configuration) - def to_file(self, filename: PathLike = None, overwrite: bool = False): + def to_file( + self, filename: PathLike = None, absolute: bool = False, overwrite: bool = False + ): """ - write script to file + write configuration to file :param filename: path to output file + :param absolute: whether to write absolute paths :param overwrite: whether to overwrite existing file """ @@ -191,11 +194,12 @@ def to_file(self, filename: PathLike = None, overwrite: bool = False): filename.mkdir(parents=True, exist_ok=True) for key, value in self.configuration.items(): - if isinstance(value, Path) and value.is_absolute(): - try: - value = Path(os.path.relpath(value, filename.absolute().parent)) - except: - pass + if isinstance(value, Path): + if not absolute and value.is_absolute(): + try: + value = Path(os.path.relpath(value, filename.absolute().parent)) + except: + pass self.configuration[key] = value configuration = convert_to_json(self.configuration) From 57b5ecba943461a3aa3dd4ccedda2c9059bd24cb Mon Sep 17 00:00:00 2001 From: zacharyburnettNOAA Date: Mon, 27 Dec 2021 18:22:34 -0500 Subject: [PATCH 18/33] formatting --- coupledmodeldriver/client/unqueued_runs.py | 6 +++++- coupledmodeldriver/utilities.py | 8 ++++++-- 2 files changed, 11 insertions(+), 3 deletions(-) diff --git a/coupledmodeldriver/client/unqueued_runs.py b/coupledmodeldriver/client/unqueued_runs.py index eb2f3ef9..4d39bd56 100644 --- a/coupledmodeldriver/client/unqueued_runs.py +++ b/coupledmodeldriver/client/unqueued_runs.py @@ -4,7 +4,11 @@ from pathlib import Path from typing import Any, Dict, List -from coupledmodeldriver.client.check_completion import (MODELS, check_completion, is_model_directory) +from coupledmodeldriver.client.check_completion import ( + check_completion, + is_model_directory, + MODELS, +) from coupledmodeldriver.configure import ModelJSON diff --git a/coupledmodeldriver/utilities.py b/coupledmodeldriver/utilities.py index a5598053..3b24d293 100644 --- a/coupledmodeldriver/utilities.py +++ b/coupledmodeldriver/utilities.py @@ -58,7 +58,9 @@ def get_logger( if '.' in name: if isinstance(logger.parent, logging.RootLogger): for existing_console_handler in [ - handler for handler in logger.parent.handlers if not isinstance(handler, logging.FileHandler) + handler + for handler in logger.parent.handlers + if not isinstance(handler, logging.FileHandler) ]: logger.parent.removeHandler(existing_console_handler) logger.parent = get_logger(name.rsplit('.', 1)[0]) @@ -66,7 +68,9 @@ def get_logger( # otherwise create a new split-console logger if console_level != logging.NOTSET: for existing_console_handler in [ - handler for handler in logger.handlers if not isinstance(handler, logging.FileHandler) + handler + for handler in logger.handlers + if not isinstance(handler, logging.FileHandler) ]: logger.removeHandler(existing_console_handler) From d967747258b24e03d8e9c3afdaf11eae05726e4b Mon Sep 17 00:00:00 2001 From: zacharyburnettNOAA Date: Mon, 27 Dec 2021 18:31:21 -0500 Subject: [PATCH 19/33] use absolute paths --- coupledmodeldriver/client/initialize_adcirc.py | 2 +- coupledmodeldriver/configure/configure.py | 7 +++++-- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/coupledmodeldriver/client/initialize_adcirc.py b/coupledmodeldriver/client/initialize_adcirc.py index 7548911d..b67b06fd 100644 --- a/coupledmodeldriver/client/initialize_adcirc.py +++ b/coupledmodeldriver/client/initialize_adcirc.py @@ -428,7 +428,7 @@ def initialize_adcirc( logger.debug(repr(configuration_json)) configuration.write_directory( - directory=output_directory, overwrite=overwrite, + directory=output_directory, absolute=absolute_paths, overwrite=overwrite, ) generation_job_script = EnsembleGenerationJob(platform=platform) diff --git a/coupledmodeldriver/configure/configure.py b/coupledmodeldriver/configure/configure.py index b5e2ed8e..7590eea5 100644 --- a/coupledmodeldriver/configure/configure.py +++ b/coupledmodeldriver/configure/configure.py @@ -126,9 +126,12 @@ def read_directory( return cls.from_configurations(configurations) - def write_directory(self, directory: PathLike, overwrite: bool = False): + def write_directory( + self, directory: PathLike, absolute: bool = False, overwrite: bool = False + ): """ :param directory: directory in which to write generated JSON configuration files + :param absolute: whether to write absolute paths :param overwrite: whether to overwrite existing files """ @@ -139,7 +142,7 @@ def write_directory(self, directory: PathLike, overwrite: bool = False): directory.mkdir(parents=True, exist_ok=True) for configuration in self.__configurations.values(): - configuration.to_file(directory, overwrite=overwrite) + configuration.to_file(directory, absolute=absolute, overwrite=overwrite) @classmethod def from_configurations( From 13f813bc74230f4d652c17c2d85bdb6fda498b97 Mon Sep 17 00:00:00 2001 From: zacharyburnettNOAA Date: Mon, 27 Dec 2021 18:49:17 -0500 Subject: [PATCH 20/33] add parallel and bigmem partitions --- coupledmodeldriver/client/initialize_adcirc.py | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/coupledmodeldriver/client/initialize_adcirc.py b/coupledmodeldriver/client/initialize_adcirc.py index b67b06fd..5ebe49eb 100644 --- a/coupledmodeldriver/client/initialize_adcirc.py +++ b/coupledmodeldriver/client/initialize_adcirc.py @@ -431,7 +431,14 @@ def initialize_adcirc( directory=output_directory, absolute=absolute_paths, overwrite=overwrite, ) - generation_job_script = EnsembleGenerationJob(platform=platform) + if platform == Platform.HERA: + partition = 'bigmem' + else: + partition = None + + generation_job_script = EnsembleGenerationJob( + platform=platform, parallel=True, slurm_partition=partition + ) generation_job_script.write(filename=output_directory / 'generate.job', overwrite=True) return configuration From b4cd9c27aa5cf8968c8dc8454467087d1ddbc842 Mon Sep 17 00:00:00 2001 From: zacharyburnettNOAA Date: Tue, 28 Dec 2021 11:32:20 -0500 Subject: [PATCH 21/33] update reference files --- tests/data/reference/test_hera_adcirc/generate.job | 7 +++---- .../reference/test_hera_adcirc/runs/unperturbed/fort.15 | 2 +- .../test_hera_adcirc_nems_atmesh_ww3data/generate.job | 7 +++---- .../runs/unperturbed/config.rc | 2 +- .../runs/unperturbed/fort.15 | 2 +- .../runs/unperturbed/model_configure | 2 +- .../runs/unperturbed/nems.configure | 2 +- tests/data/reference/test_hera_adcirc_tidal/generate.job | 7 +++---- .../test_hera_adcirc_tidal/runs/unperturbed/fort.15 | 2 +- tests/data/reference/test_hera_adcirc_tidal/spinup/fort.15 | 2 +- .../generate.job | 7 +++---- .../runs/unperturbed/config.rc | 2 +- .../runs/unperturbed/fort.15 | 2 +- .../runs/unperturbed/model_configure | 2 +- .../runs/unperturbed/nems.configure | 2 +- .../spinup/config.rc | 2 +- .../spinup/fort.15 | 2 +- .../spinup/model_configure | 2 +- .../spinup/nems.configure | 2 +- .../generate.job | 7 +++---- .../runs/unperturbed/config.rc | 2 +- .../runs/unperturbed/fort.15 | 2 +- .../runs/unperturbed/model_configure | 2 +- .../runs/unperturbed/nems.configure | 2 +- .../spinup/config.rc | 2 +- .../spinup/fort.15 | 2 +- .../spinup/model_configure | 2 +- .../spinup/nems.configure | 2 +- .../generate.job | 7 +++---- .../runs/unperturbed/config.rc | 2 +- .../runs/unperturbed/fort.15 | 2 +- .../runs/unperturbed/model_configure | 2 +- .../runs/unperturbed/nems.configure | 2 +- .../spinup/config.rc | 2 +- .../spinup/fort.15 | 2 +- .../spinup/model_configure | 2 +- .../spinup/nems.configure | 2 +- .../generate.job | 7 +++---- .../runs/unperturbed/config.rc | 2 +- .../runs/unperturbed/fort.15 | 2 +- .../runs/unperturbed/model_configure | 2 +- .../runs/unperturbed/nems.configure | 2 +- .../spinup/config.rc | 2 +- .../spinup/fort.15 | 2 +- .../spinup/model_configure | 2 +- .../spinup/nems.configure | 2 +- .../generate.job | 7 +++---- .../runs/run_1/config.rc | 2 +- .../runs/run_1/fort.15 | 2 +- .../runs/run_1/model_configure | 2 +- .../runs/run_1/nems.configure | 2 +- .../runs/run_2/config.rc | 2 +- .../runs/run_2/fort.15 | 2 +- .../runs/run_2/model_configure | 2 +- .../runs/run_2/nems.configure | 2 +- .../spinup/config.rc | 2 +- .../spinup/fort.15 | 2 +- .../spinup/model_configure | 2 +- .../spinup/nems.configure | 2 +- tests/data/reference/test_local_adcirc_tidal/generate.job | 3 +-- .../test_local_adcirc_tidal/runs/unperturbed/fort.15 | 2 +- .../data/reference/test_local_adcirc_tidal/spinup/fort.15 | 2 +- .../generate.job | 3 +-- .../runs/unperturbed/config.rc | 2 +- .../runs/unperturbed/fort.15 | 2 +- .../runs/unperturbed/model_configure | 2 +- .../runs/unperturbed/nems.configure | 2 +- .../spinup/config.rc | 2 +- .../spinup/fort.15 | 2 +- .../spinup/model_configure | 2 +- .../spinup/nems.configure | 2 +- .../reference/test_stampede2_adcirc_tidal/generate.job | 6 ++---- .../test_stampede2_adcirc_tidal/runs/unperturbed/fort.15 | 2 +- .../reference/test_stampede2_adcirc_tidal/spinup/fort.15 | 2 +- .../generate.job | 6 ++---- .../runs/unperturbed/config.rc | 2 +- .../runs/unperturbed/fort.15 | 2 +- .../runs/unperturbed/model_configure | 2 +- .../runs/unperturbed/nems.configure | 2 +- .../spinup/config.rc | 2 +- .../spinup/fort.15 | 2 +- .../spinup/model_configure | 2 +- .../spinup/nems.configure | 2 +- 83 files changed, 101 insertions(+), 115 deletions(-) diff --git a/tests/data/reference/test_hera_adcirc/generate.job b/tests/data/reference/test_hera_adcirc/generate.job index a0b1aa92..fb5a05b7 100644 --- a/tests/data/reference/test_hera_adcirc/generate.job +++ b/tests/data/reference/test_hera_adcirc/generate.job @@ -1,14 +1,13 @@ #!/bin/bash #SBATCH -J ADCIRC_GENERATE_CONFIGURATION #SBATCH -A coastal -#SBATCH --error=slurm.log -#SBATCH --output=slurm.log +#SBATCH --output=ADCIRC_GENERATE_CONFIGURATION.log #SBATCH -n 40 #SBATCH -N 1 #SBATCH --time=01:00:00 +#SBATCH --partition=bigmem set -e -rm **/*.log -generate_adcirc +generate_adcirc --parallel echo "use ./run_hera.sh to start model" diff --git a/tests/data/reference/test_hera_adcirc/runs/unperturbed/fort.15 b/tests/data/reference/test_hera_adcirc/runs/unperturbed/fort.15 index ed845162..303d8daf 100644 --- a/tests/data/reference/test_hera_adcirc/runs/unperturbed/fort.15 +++ b/tests/data/reference/test_hera_adcirc/runs/unperturbed/fort.15 @@ -1,4 +1,4 @@ -created on 2021-11-17 11:29 ! RUNDES - 32 CHARACTER ALPHANUMERIC RUN DESCRIPTION +created on 2021-12-28 11:17 ! RUNDES - 32 CHARACTER ALPHANUMERIC RUN DESCRIPTION Shinacock Inlet Coarse Grid ! RUNID - 24 CHARACTER ALPANUMERIC RUN IDENTIFICATION 1 ! NFOVER - NONFATAL ERROR OVERRIDE OPTION 1 ! NABOUT - ABREVIATED OUTPUT OPTION PARAMETER diff --git a/tests/data/reference/test_hera_adcirc_nems_atmesh_ww3data/generate.job b/tests/data/reference/test_hera_adcirc_nems_atmesh_ww3data/generate.job index a0b1aa92..fb5a05b7 100644 --- a/tests/data/reference/test_hera_adcirc_nems_atmesh_ww3data/generate.job +++ b/tests/data/reference/test_hera_adcirc_nems_atmesh_ww3data/generate.job @@ -1,14 +1,13 @@ #!/bin/bash #SBATCH -J ADCIRC_GENERATE_CONFIGURATION #SBATCH -A coastal -#SBATCH --error=slurm.log -#SBATCH --output=slurm.log +#SBATCH --output=ADCIRC_GENERATE_CONFIGURATION.log #SBATCH -n 40 #SBATCH -N 1 #SBATCH --time=01:00:00 +#SBATCH --partition=bigmem set -e -rm **/*.log -generate_adcirc +generate_adcirc --parallel echo "use ./run_hera.sh to start model" diff --git a/tests/data/reference/test_hera_adcirc_nems_atmesh_ww3data/runs/unperturbed/config.rc b/tests/data/reference/test_hera_adcirc_nems_atmesh_ww3data/runs/unperturbed/config.rc index 0b133668..ffdb8e53 100644 --- a/tests/data/reference/test_hera_adcirc_nems_atmesh_ww3data/runs/unperturbed/config.rc +++ b/tests/data/reference/test_hera_adcirc_nems_atmesh_ww3data/runs/unperturbed/config.rc @@ -1,4 +1,4 @@ -# `config.rc` generated with NEMSpy 1.4.10.post46.dev0+ce0f814 +# `config.rc` generated with NEMSpy 1.0.4 atm_dir: ../../../../input/forcings/ike atm_nam: wind_atm_fin_ch_time_vec.nc wav_dir: ../../../../input/forcings/ike diff --git a/tests/data/reference/test_hera_adcirc_nems_atmesh_ww3data/runs/unperturbed/fort.15 b/tests/data/reference/test_hera_adcirc_nems_atmesh_ww3data/runs/unperturbed/fort.15 index 1e1475e6..7cdc0728 100644 --- a/tests/data/reference/test_hera_adcirc_nems_atmesh_ww3data/runs/unperturbed/fort.15 +++ b/tests/data/reference/test_hera_adcirc_nems_atmesh_ww3data/runs/unperturbed/fort.15 @@ -1,4 +1,4 @@ -created on 2021-11-17 11:30 ! RUNDES - 32 CHARACTER ALPHANUMERIC RUN DESCRIPTION +created on 2021-12-28 11:17 ! RUNDES - 32 CHARACTER ALPHANUMERIC RUN DESCRIPTION Shinacock Inlet Coarse Grid ! RUNID - 24 CHARACTER ALPANUMERIC RUN IDENTIFICATION 1 ! NFOVER - NONFATAL ERROR OVERRIDE OPTION 1 ! NABOUT - ABREVIATED OUTPUT OPTION PARAMETER diff --git a/tests/data/reference/test_hera_adcirc_nems_atmesh_ww3data/runs/unperturbed/model_configure b/tests/data/reference/test_hera_adcirc_nems_atmesh_ww3data/runs/unperturbed/model_configure index 0b6056cb..535752d0 100644 --- a/tests/data/reference/test_hera_adcirc_nems_atmesh_ww3data/runs/unperturbed/model_configure +++ b/tests/data/reference/test_hera_adcirc_nems_atmesh_ww3data/runs/unperturbed/model_configure @@ -1,4 +1,4 @@ -# `model_configure` generated with NEMSpy 1.4.10.post46.dev0+ce0f814 +# `model_configure` generated with NEMSpy 1.0.4 total_member: 1 print_esmf: .true. namelist: atm_namelist.rc diff --git a/tests/data/reference/test_hera_adcirc_nems_atmesh_ww3data/runs/unperturbed/nems.configure b/tests/data/reference/test_hera_adcirc_nems_atmesh_ww3data/runs/unperturbed/nems.configure index 9cfcdc59..412552a5 100644 --- a/tests/data/reference/test_hera_adcirc_nems_atmesh_ww3data/runs/unperturbed/nems.configure +++ b/tests/data/reference/test_hera_adcirc_nems_atmesh_ww3data/runs/unperturbed/nems.configure @@ -1,4 +1,4 @@ -# `nems.configure` generated with NEMSpy 1.4.10.post46.dev0+ce0f814 +# `nems.configure` generated with NEMSpy 1.0.4 # EARTH # EARTH_component_list: ATM WAV OCN EARTH_attributes:: diff --git a/tests/data/reference/test_hera_adcirc_tidal/generate.job b/tests/data/reference/test_hera_adcirc_tidal/generate.job index a0b1aa92..fb5a05b7 100644 --- a/tests/data/reference/test_hera_adcirc_tidal/generate.job +++ b/tests/data/reference/test_hera_adcirc_tidal/generate.job @@ -1,14 +1,13 @@ #!/bin/bash #SBATCH -J ADCIRC_GENERATE_CONFIGURATION #SBATCH -A coastal -#SBATCH --error=slurm.log -#SBATCH --output=slurm.log +#SBATCH --output=ADCIRC_GENERATE_CONFIGURATION.log #SBATCH -n 40 #SBATCH -N 1 #SBATCH --time=01:00:00 +#SBATCH --partition=bigmem set -e -rm **/*.log -generate_adcirc +generate_adcirc --parallel echo "use ./run_hera.sh to start model" diff --git a/tests/data/reference/test_hera_adcirc_tidal/runs/unperturbed/fort.15 b/tests/data/reference/test_hera_adcirc_tidal/runs/unperturbed/fort.15 index 5053bafe..177f0eb2 100644 --- a/tests/data/reference/test_hera_adcirc_tidal/runs/unperturbed/fort.15 +++ b/tests/data/reference/test_hera_adcirc_tidal/runs/unperturbed/fort.15 @@ -1,4 +1,4 @@ -created on 2021-11-17 11:29 ! RUNDES - 32 CHARACTER ALPHANUMERIC RUN DESCRIPTION +created on 2021-12-28 11:17 ! RUNDES - 32 CHARACTER ALPHANUMERIC RUN DESCRIPTION Shinacock Inlet Coarse Grid ! RUNID - 24 CHARACTER ALPANUMERIC RUN IDENTIFICATION 1 ! NFOVER - NONFATAL ERROR OVERRIDE OPTION 1 ! NABOUT - ABREVIATED OUTPUT OPTION PARAMETER diff --git a/tests/data/reference/test_hera_adcirc_tidal/spinup/fort.15 b/tests/data/reference/test_hera_adcirc_tidal/spinup/fort.15 index 00e0d798..c15d3514 100644 --- a/tests/data/reference/test_hera_adcirc_tidal/spinup/fort.15 +++ b/tests/data/reference/test_hera_adcirc_tidal/spinup/fort.15 @@ -1,4 +1,4 @@ -created on 2021-11-17 11:29 ! RUNDES - 32 CHARACTER ALPHANUMERIC RUN DESCRIPTION +created on 2021-12-28 11:17 ! RUNDES - 32 CHARACTER ALPHANUMERIC RUN DESCRIPTION Shinacock Inlet Coarse Grid ! RUNID - 24 CHARACTER ALPANUMERIC RUN IDENTIFICATION 1 ! NFOVER - NONFATAL ERROR OVERRIDE OPTION 1 ! NABOUT - ABREVIATED OUTPUT OPTION PARAMETER diff --git a/tests/data/reference/test_hera_adcirc_tidal_besttrack_nems_ww3data/generate.job b/tests/data/reference/test_hera_adcirc_tidal_besttrack_nems_ww3data/generate.job index a0b1aa92..fb5a05b7 100644 --- a/tests/data/reference/test_hera_adcirc_tidal_besttrack_nems_ww3data/generate.job +++ b/tests/data/reference/test_hera_adcirc_tidal_besttrack_nems_ww3data/generate.job @@ -1,14 +1,13 @@ #!/bin/bash #SBATCH -J ADCIRC_GENERATE_CONFIGURATION #SBATCH -A coastal -#SBATCH --error=slurm.log -#SBATCH --output=slurm.log +#SBATCH --output=ADCIRC_GENERATE_CONFIGURATION.log #SBATCH -n 40 #SBATCH -N 1 #SBATCH --time=01:00:00 +#SBATCH --partition=bigmem set -e -rm **/*.log -generate_adcirc +generate_adcirc --parallel echo "use ./run_hera.sh to start model" diff --git a/tests/data/reference/test_hera_adcirc_tidal_besttrack_nems_ww3data/runs/unperturbed/config.rc b/tests/data/reference/test_hera_adcirc_tidal_besttrack_nems_ww3data/runs/unperturbed/config.rc index 79ae10dd..92c06305 100644 --- a/tests/data/reference/test_hera_adcirc_tidal_besttrack_nems_ww3data/runs/unperturbed/config.rc +++ b/tests/data/reference/test_hera_adcirc_tidal_besttrack_nems_ww3data/runs/unperturbed/config.rc @@ -1,3 +1,3 @@ -# `config.rc` generated with NEMSpy 1.4.10.post46.dev0+ce0f814 +# `config.rc` generated with NEMSpy 1.0.4 wav_dir: ../../../../input/forcings/ike wav_nam: ww3.Constant.20151214_sxy_ike_date.nc diff --git a/tests/data/reference/test_hera_adcirc_tidal_besttrack_nems_ww3data/runs/unperturbed/fort.15 b/tests/data/reference/test_hera_adcirc_tidal_besttrack_nems_ww3data/runs/unperturbed/fort.15 index dad48b89..604e26c9 100644 --- a/tests/data/reference/test_hera_adcirc_tidal_besttrack_nems_ww3data/runs/unperturbed/fort.15 +++ b/tests/data/reference/test_hera_adcirc_tidal_besttrack_nems_ww3data/runs/unperturbed/fort.15 @@ -1,4 +1,4 @@ -created on 2021-11-17 11:40 ! RUNDES - 32 CHARACTER ALPHANUMERIC RUN DESCRIPTION +created on 2021-12-28 11:17 ! RUNDES - 32 CHARACTER ALPHANUMERIC RUN DESCRIPTION Shinacock Inlet Coarse Grid ! RUNID - 24 CHARACTER ALPANUMERIC RUN IDENTIFICATION 1 ! NFOVER - NONFATAL ERROR OVERRIDE OPTION 1 ! NABOUT - ABREVIATED OUTPUT OPTION PARAMETER diff --git a/tests/data/reference/test_hera_adcirc_tidal_besttrack_nems_ww3data/runs/unperturbed/model_configure b/tests/data/reference/test_hera_adcirc_tidal_besttrack_nems_ww3data/runs/unperturbed/model_configure index e817b6fe..ce1ec6a9 100644 --- a/tests/data/reference/test_hera_adcirc_tidal_besttrack_nems_ww3data/runs/unperturbed/model_configure +++ b/tests/data/reference/test_hera_adcirc_tidal_besttrack_nems_ww3data/runs/unperturbed/model_configure @@ -1,4 +1,4 @@ -# `model_configure` generated with NEMSpy 1.4.10.post46.dev0+ce0f814 +# `model_configure` generated with NEMSpy 1.0.4 total_member: 1 print_esmf: .true. namelist: atm_namelist.rc diff --git a/tests/data/reference/test_hera_adcirc_tidal_besttrack_nems_ww3data/runs/unperturbed/nems.configure b/tests/data/reference/test_hera_adcirc_tidal_besttrack_nems_ww3data/runs/unperturbed/nems.configure index d468f3a4..2bd40c96 100644 --- a/tests/data/reference/test_hera_adcirc_tidal_besttrack_nems_ww3data/runs/unperturbed/nems.configure +++ b/tests/data/reference/test_hera_adcirc_tidal_besttrack_nems_ww3data/runs/unperturbed/nems.configure @@ -1,4 +1,4 @@ -# `nems.configure` generated with NEMSpy 1.4.10.post46.dev0+ce0f814 +# `nems.configure` generated with NEMSpy 1.0.4 # EARTH # EARTH_component_list: WAV OCN EARTH_attributes:: diff --git a/tests/data/reference/test_hera_adcirc_tidal_besttrack_nems_ww3data/spinup/config.rc b/tests/data/reference/test_hera_adcirc_tidal_besttrack_nems_ww3data/spinup/config.rc index a209005f..b214ebaf 100644 --- a/tests/data/reference/test_hera_adcirc_tidal_besttrack_nems_ww3data/spinup/config.rc +++ b/tests/data/reference/test_hera_adcirc_tidal_besttrack_nems_ww3data/spinup/config.rc @@ -1,2 +1,2 @@ -# `config.rc` generated with NEMSpy 1.4.10.post46.dev0+ce0f814 +# `config.rc` generated with NEMSpy 1.0.4 diff --git a/tests/data/reference/test_hera_adcirc_tidal_besttrack_nems_ww3data/spinup/fort.15 b/tests/data/reference/test_hera_adcirc_tidal_besttrack_nems_ww3data/spinup/fort.15 index 188695a1..cdeec071 100644 --- a/tests/data/reference/test_hera_adcirc_tidal_besttrack_nems_ww3data/spinup/fort.15 +++ b/tests/data/reference/test_hera_adcirc_tidal_besttrack_nems_ww3data/spinup/fort.15 @@ -1,4 +1,4 @@ -created on 2021-11-17 11:40 ! RUNDES - 32 CHARACTER ALPHANUMERIC RUN DESCRIPTION +created on 2021-12-28 11:17 ! RUNDES - 32 CHARACTER ALPHANUMERIC RUN DESCRIPTION Shinacock Inlet Coarse Grid ! RUNID - 24 CHARACTER ALPANUMERIC RUN IDENTIFICATION 1 ! NFOVER - NONFATAL ERROR OVERRIDE OPTION 1 ! NABOUT - ABREVIATED OUTPUT OPTION PARAMETER diff --git a/tests/data/reference/test_hera_adcirc_tidal_besttrack_nems_ww3data/spinup/model_configure b/tests/data/reference/test_hera_adcirc_tidal_besttrack_nems_ww3data/spinup/model_configure index 958ed6b0..ea283f5e 100644 --- a/tests/data/reference/test_hera_adcirc_tidal_besttrack_nems_ww3data/spinup/model_configure +++ b/tests/data/reference/test_hera_adcirc_tidal_besttrack_nems_ww3data/spinup/model_configure @@ -1,4 +1,4 @@ -# `model_configure` generated with NEMSpy 1.4.10.post46.dev0+ce0f814 +# `model_configure` generated with NEMSpy 1.0.4 total_member: 1 print_esmf: .true. namelist: atm_namelist.rc diff --git a/tests/data/reference/test_hera_adcirc_tidal_besttrack_nems_ww3data/spinup/nems.configure b/tests/data/reference/test_hera_adcirc_tidal_besttrack_nems_ww3data/spinup/nems.configure index fe22699e..eb1059fa 100644 --- a/tests/data/reference/test_hera_adcirc_tidal_besttrack_nems_ww3data/spinup/nems.configure +++ b/tests/data/reference/test_hera_adcirc_tidal_besttrack_nems_ww3data/spinup/nems.configure @@ -1,4 +1,4 @@ -# `nems.configure` generated with NEMSpy 1.4.10.post46.dev0+ce0f814 +# `nems.configure` generated with NEMSpy 1.0.4 # EARTH # EARTH_component_list: OCN EARTH_attributes:: diff --git a/tests/data/reference/test_hera_adcirc_tidal_besttrack_nems_ww3data_aswip/generate.job b/tests/data/reference/test_hera_adcirc_tidal_besttrack_nems_ww3data_aswip/generate.job index a0b1aa92..fb5a05b7 100644 --- a/tests/data/reference/test_hera_adcirc_tidal_besttrack_nems_ww3data_aswip/generate.job +++ b/tests/data/reference/test_hera_adcirc_tidal_besttrack_nems_ww3data_aswip/generate.job @@ -1,14 +1,13 @@ #!/bin/bash #SBATCH -J ADCIRC_GENERATE_CONFIGURATION #SBATCH -A coastal -#SBATCH --error=slurm.log -#SBATCH --output=slurm.log +#SBATCH --output=ADCIRC_GENERATE_CONFIGURATION.log #SBATCH -n 40 #SBATCH -N 1 #SBATCH --time=01:00:00 +#SBATCH --partition=bigmem set -e -rm **/*.log -generate_adcirc +generate_adcirc --parallel echo "use ./run_hera.sh to start model" diff --git a/tests/data/reference/test_hera_adcirc_tidal_besttrack_nems_ww3data_aswip/runs/unperturbed/config.rc b/tests/data/reference/test_hera_adcirc_tidal_besttrack_nems_ww3data_aswip/runs/unperturbed/config.rc index 79ae10dd..92c06305 100644 --- a/tests/data/reference/test_hera_adcirc_tidal_besttrack_nems_ww3data_aswip/runs/unperturbed/config.rc +++ b/tests/data/reference/test_hera_adcirc_tidal_besttrack_nems_ww3data_aswip/runs/unperturbed/config.rc @@ -1,3 +1,3 @@ -# `config.rc` generated with NEMSpy 1.4.10.post46.dev0+ce0f814 +# `config.rc` generated with NEMSpy 1.0.4 wav_dir: ../../../../input/forcings/ike wav_nam: ww3.Constant.20151214_sxy_ike_date.nc diff --git a/tests/data/reference/test_hera_adcirc_tidal_besttrack_nems_ww3data_aswip/runs/unperturbed/fort.15 b/tests/data/reference/test_hera_adcirc_tidal_besttrack_nems_ww3data_aswip/runs/unperturbed/fort.15 index 59fd2c48..c4e90735 100644 --- a/tests/data/reference/test_hera_adcirc_tidal_besttrack_nems_ww3data_aswip/runs/unperturbed/fort.15 +++ b/tests/data/reference/test_hera_adcirc_tidal_besttrack_nems_ww3data_aswip/runs/unperturbed/fort.15 @@ -1,4 +1,4 @@ -created on 2021-11-17 11:30 ! RUNDES - 32 CHARACTER ALPHANUMERIC RUN DESCRIPTION +created on 2021-12-28 11:17 ! RUNDES - 32 CHARACTER ALPHANUMERIC RUN DESCRIPTION Shinacock Inlet Coarse Grid ! RUNID - 24 CHARACTER ALPANUMERIC RUN IDENTIFICATION 1 ! NFOVER - NONFATAL ERROR OVERRIDE OPTION 1 ! NABOUT - ABREVIATED OUTPUT OPTION PARAMETER diff --git a/tests/data/reference/test_hera_adcirc_tidal_besttrack_nems_ww3data_aswip/runs/unperturbed/model_configure b/tests/data/reference/test_hera_adcirc_tidal_besttrack_nems_ww3data_aswip/runs/unperturbed/model_configure index e817b6fe..ce1ec6a9 100644 --- a/tests/data/reference/test_hera_adcirc_tidal_besttrack_nems_ww3data_aswip/runs/unperturbed/model_configure +++ b/tests/data/reference/test_hera_adcirc_tidal_besttrack_nems_ww3data_aswip/runs/unperturbed/model_configure @@ -1,4 +1,4 @@ -# `model_configure` generated with NEMSpy 1.4.10.post46.dev0+ce0f814 +# `model_configure` generated with NEMSpy 1.0.4 total_member: 1 print_esmf: .true. namelist: atm_namelist.rc diff --git a/tests/data/reference/test_hera_adcirc_tidal_besttrack_nems_ww3data_aswip/runs/unperturbed/nems.configure b/tests/data/reference/test_hera_adcirc_tidal_besttrack_nems_ww3data_aswip/runs/unperturbed/nems.configure index d468f3a4..2bd40c96 100644 --- a/tests/data/reference/test_hera_adcirc_tidal_besttrack_nems_ww3data_aswip/runs/unperturbed/nems.configure +++ b/tests/data/reference/test_hera_adcirc_tidal_besttrack_nems_ww3data_aswip/runs/unperturbed/nems.configure @@ -1,4 +1,4 @@ -# `nems.configure` generated with NEMSpy 1.4.10.post46.dev0+ce0f814 +# `nems.configure` generated with NEMSpy 1.0.4 # EARTH # EARTH_component_list: WAV OCN EARTH_attributes:: diff --git a/tests/data/reference/test_hera_adcirc_tidal_besttrack_nems_ww3data_aswip/spinup/config.rc b/tests/data/reference/test_hera_adcirc_tidal_besttrack_nems_ww3data_aswip/spinup/config.rc index a209005f..b214ebaf 100644 --- a/tests/data/reference/test_hera_adcirc_tidal_besttrack_nems_ww3data_aswip/spinup/config.rc +++ b/tests/data/reference/test_hera_adcirc_tidal_besttrack_nems_ww3data_aswip/spinup/config.rc @@ -1,2 +1,2 @@ -# `config.rc` generated with NEMSpy 1.4.10.post46.dev0+ce0f814 +# `config.rc` generated with NEMSpy 1.0.4 diff --git a/tests/data/reference/test_hera_adcirc_tidal_besttrack_nems_ww3data_aswip/spinup/fort.15 b/tests/data/reference/test_hera_adcirc_tidal_besttrack_nems_ww3data_aswip/spinup/fort.15 index 0ac43bfc..cdeec071 100644 --- a/tests/data/reference/test_hera_adcirc_tidal_besttrack_nems_ww3data_aswip/spinup/fort.15 +++ b/tests/data/reference/test_hera_adcirc_tidal_besttrack_nems_ww3data_aswip/spinup/fort.15 @@ -1,4 +1,4 @@ -created on 2021-11-17 11:30 ! RUNDES - 32 CHARACTER ALPHANUMERIC RUN DESCRIPTION +created on 2021-12-28 11:17 ! RUNDES - 32 CHARACTER ALPHANUMERIC RUN DESCRIPTION Shinacock Inlet Coarse Grid ! RUNID - 24 CHARACTER ALPANUMERIC RUN IDENTIFICATION 1 ! NFOVER - NONFATAL ERROR OVERRIDE OPTION 1 ! NABOUT - ABREVIATED OUTPUT OPTION PARAMETER diff --git a/tests/data/reference/test_hera_adcirc_tidal_besttrack_nems_ww3data_aswip/spinup/model_configure b/tests/data/reference/test_hera_adcirc_tidal_besttrack_nems_ww3data_aswip/spinup/model_configure index 958ed6b0..ea283f5e 100644 --- a/tests/data/reference/test_hera_adcirc_tidal_besttrack_nems_ww3data_aswip/spinup/model_configure +++ b/tests/data/reference/test_hera_adcirc_tidal_besttrack_nems_ww3data_aswip/spinup/model_configure @@ -1,4 +1,4 @@ -# `model_configure` generated with NEMSpy 1.4.10.post46.dev0+ce0f814 +# `model_configure` generated with NEMSpy 1.0.4 total_member: 1 print_esmf: .true. namelist: atm_namelist.rc diff --git a/tests/data/reference/test_hera_adcirc_tidal_besttrack_nems_ww3data_aswip/spinup/nems.configure b/tests/data/reference/test_hera_adcirc_tidal_besttrack_nems_ww3data_aswip/spinup/nems.configure index fe22699e..eb1059fa 100644 --- a/tests/data/reference/test_hera_adcirc_tidal_besttrack_nems_ww3data_aswip/spinup/nems.configure +++ b/tests/data/reference/test_hera_adcirc_tidal_besttrack_nems_ww3data_aswip/spinup/nems.configure @@ -1,4 +1,4 @@ -# `nems.configure` generated with NEMSpy 1.4.10.post46.dev0+ce0f814 +# `nems.configure` generated with NEMSpy 1.0.4 # EARTH # EARTH_component_list: OCN EARTH_attributes:: diff --git a/tests/data/reference/test_hera_adcirc_tidal_besttrack_nems_ww3data_nointernet/generate.job b/tests/data/reference/test_hera_adcirc_tidal_besttrack_nems_ww3data_nointernet/generate.job index a0b1aa92..fb5a05b7 100644 --- a/tests/data/reference/test_hera_adcirc_tidal_besttrack_nems_ww3data_nointernet/generate.job +++ b/tests/data/reference/test_hera_adcirc_tidal_besttrack_nems_ww3data_nointernet/generate.job @@ -1,14 +1,13 @@ #!/bin/bash #SBATCH -J ADCIRC_GENERATE_CONFIGURATION #SBATCH -A coastal -#SBATCH --error=slurm.log -#SBATCH --output=slurm.log +#SBATCH --output=ADCIRC_GENERATE_CONFIGURATION.log #SBATCH -n 40 #SBATCH -N 1 #SBATCH --time=01:00:00 +#SBATCH --partition=bigmem set -e -rm **/*.log -generate_adcirc +generate_adcirc --parallel echo "use ./run_hera.sh to start model" diff --git a/tests/data/reference/test_hera_adcirc_tidal_besttrack_nems_ww3data_nointernet/runs/unperturbed/config.rc b/tests/data/reference/test_hera_adcirc_tidal_besttrack_nems_ww3data_nointernet/runs/unperturbed/config.rc index 79ae10dd..92c06305 100644 --- a/tests/data/reference/test_hera_adcirc_tidal_besttrack_nems_ww3data_nointernet/runs/unperturbed/config.rc +++ b/tests/data/reference/test_hera_adcirc_tidal_besttrack_nems_ww3data_nointernet/runs/unperturbed/config.rc @@ -1,3 +1,3 @@ -# `config.rc` generated with NEMSpy 1.4.10.post46.dev0+ce0f814 +# `config.rc` generated with NEMSpy 1.0.4 wav_dir: ../../../../input/forcings/ike wav_nam: ww3.Constant.20151214_sxy_ike_date.nc diff --git a/tests/data/reference/test_hera_adcirc_tidal_besttrack_nems_ww3data_nointernet/runs/unperturbed/fort.15 b/tests/data/reference/test_hera_adcirc_tidal_besttrack_nems_ww3data_nointernet/runs/unperturbed/fort.15 index 34ebba53..3fe3c34e 100644 --- a/tests/data/reference/test_hera_adcirc_tidal_besttrack_nems_ww3data_nointernet/runs/unperturbed/fort.15 +++ b/tests/data/reference/test_hera_adcirc_tidal_besttrack_nems_ww3data_nointernet/runs/unperturbed/fort.15 @@ -1,4 +1,4 @@ -created on 2021-11-17 11:30 ! RUNDES - 32 CHARACTER ALPHANUMERIC RUN DESCRIPTION +created on 2021-12-28 11:18 ! RUNDES - 32 CHARACTER ALPHANUMERIC RUN DESCRIPTION Shinacock Inlet Coarse Grid ! RUNID - 24 CHARACTER ALPANUMERIC RUN IDENTIFICATION 1 ! NFOVER - NONFATAL ERROR OVERRIDE OPTION 1 ! NABOUT - ABREVIATED OUTPUT OPTION PARAMETER diff --git a/tests/data/reference/test_hera_adcirc_tidal_besttrack_nems_ww3data_nointernet/runs/unperturbed/model_configure b/tests/data/reference/test_hera_adcirc_tidal_besttrack_nems_ww3data_nointernet/runs/unperturbed/model_configure index e817b6fe..ce1ec6a9 100644 --- a/tests/data/reference/test_hera_adcirc_tidal_besttrack_nems_ww3data_nointernet/runs/unperturbed/model_configure +++ b/tests/data/reference/test_hera_adcirc_tidal_besttrack_nems_ww3data_nointernet/runs/unperturbed/model_configure @@ -1,4 +1,4 @@ -# `model_configure` generated with NEMSpy 1.4.10.post46.dev0+ce0f814 +# `model_configure` generated with NEMSpy 1.0.4 total_member: 1 print_esmf: .true. namelist: atm_namelist.rc diff --git a/tests/data/reference/test_hera_adcirc_tidal_besttrack_nems_ww3data_nointernet/runs/unperturbed/nems.configure b/tests/data/reference/test_hera_adcirc_tidal_besttrack_nems_ww3data_nointernet/runs/unperturbed/nems.configure index d468f3a4..2bd40c96 100644 --- a/tests/data/reference/test_hera_adcirc_tidal_besttrack_nems_ww3data_nointernet/runs/unperturbed/nems.configure +++ b/tests/data/reference/test_hera_adcirc_tidal_besttrack_nems_ww3data_nointernet/runs/unperturbed/nems.configure @@ -1,4 +1,4 @@ -# `nems.configure` generated with NEMSpy 1.4.10.post46.dev0+ce0f814 +# `nems.configure` generated with NEMSpy 1.0.4 # EARTH # EARTH_component_list: WAV OCN EARTH_attributes:: diff --git a/tests/data/reference/test_hera_adcirc_tidal_besttrack_nems_ww3data_nointernet/spinup/config.rc b/tests/data/reference/test_hera_adcirc_tidal_besttrack_nems_ww3data_nointernet/spinup/config.rc index a209005f..b214ebaf 100644 --- a/tests/data/reference/test_hera_adcirc_tidal_besttrack_nems_ww3data_nointernet/spinup/config.rc +++ b/tests/data/reference/test_hera_adcirc_tidal_besttrack_nems_ww3data_nointernet/spinup/config.rc @@ -1,2 +1,2 @@ -# `config.rc` generated with NEMSpy 1.4.10.post46.dev0+ce0f814 +# `config.rc` generated with NEMSpy 1.0.4 diff --git a/tests/data/reference/test_hera_adcirc_tidal_besttrack_nems_ww3data_nointernet/spinup/fort.15 b/tests/data/reference/test_hera_adcirc_tidal_besttrack_nems_ww3data_nointernet/spinup/fort.15 index 0ac43bfc..87434aef 100644 --- a/tests/data/reference/test_hera_adcirc_tidal_besttrack_nems_ww3data_nointernet/spinup/fort.15 +++ b/tests/data/reference/test_hera_adcirc_tidal_besttrack_nems_ww3data_nointernet/spinup/fort.15 @@ -1,4 +1,4 @@ -created on 2021-11-17 11:30 ! RUNDES - 32 CHARACTER ALPHANUMERIC RUN DESCRIPTION +created on 2021-12-28 11:18 ! RUNDES - 32 CHARACTER ALPHANUMERIC RUN DESCRIPTION Shinacock Inlet Coarse Grid ! RUNID - 24 CHARACTER ALPANUMERIC RUN IDENTIFICATION 1 ! NFOVER - NONFATAL ERROR OVERRIDE OPTION 1 ! NABOUT - ABREVIATED OUTPUT OPTION PARAMETER diff --git a/tests/data/reference/test_hera_adcirc_tidal_besttrack_nems_ww3data_nointernet/spinup/model_configure b/tests/data/reference/test_hera_adcirc_tidal_besttrack_nems_ww3data_nointernet/spinup/model_configure index 958ed6b0..ea283f5e 100644 --- a/tests/data/reference/test_hera_adcirc_tidal_besttrack_nems_ww3data_nointernet/spinup/model_configure +++ b/tests/data/reference/test_hera_adcirc_tidal_besttrack_nems_ww3data_nointernet/spinup/model_configure @@ -1,4 +1,4 @@ -# `model_configure` generated with NEMSpy 1.4.10.post46.dev0+ce0f814 +# `model_configure` generated with NEMSpy 1.0.4 total_member: 1 print_esmf: .true. namelist: atm_namelist.rc diff --git a/tests/data/reference/test_hera_adcirc_tidal_besttrack_nems_ww3data_nointernet/spinup/nems.configure b/tests/data/reference/test_hera_adcirc_tidal_besttrack_nems_ww3data_nointernet/spinup/nems.configure index fe22699e..eb1059fa 100644 --- a/tests/data/reference/test_hera_adcirc_tidal_besttrack_nems_ww3data_nointernet/spinup/nems.configure +++ b/tests/data/reference/test_hera_adcirc_tidal_besttrack_nems_ww3data_nointernet/spinup/nems.configure @@ -1,4 +1,4 @@ -# `nems.configure` generated with NEMSpy 1.4.10.post46.dev0+ce0f814 +# `nems.configure` generated with NEMSpy 1.0.4 # EARTH # EARTH_component_list: OCN EARTH_attributes:: diff --git a/tests/data/reference/test_hera_adcirc_tidal_nems_atmesh_ww3data/generate.job b/tests/data/reference/test_hera_adcirc_tidal_nems_atmesh_ww3data/generate.job index a0b1aa92..fb5a05b7 100644 --- a/tests/data/reference/test_hera_adcirc_tidal_nems_atmesh_ww3data/generate.job +++ b/tests/data/reference/test_hera_adcirc_tidal_nems_atmesh_ww3data/generate.job @@ -1,14 +1,13 @@ #!/bin/bash #SBATCH -J ADCIRC_GENERATE_CONFIGURATION #SBATCH -A coastal -#SBATCH --error=slurm.log -#SBATCH --output=slurm.log +#SBATCH --output=ADCIRC_GENERATE_CONFIGURATION.log #SBATCH -n 40 #SBATCH -N 1 #SBATCH --time=01:00:00 +#SBATCH --partition=bigmem set -e -rm **/*.log -generate_adcirc +generate_adcirc --parallel echo "use ./run_hera.sh to start model" diff --git a/tests/data/reference/test_hera_adcirc_tidal_nems_atmesh_ww3data/runs/unperturbed/config.rc b/tests/data/reference/test_hera_adcirc_tidal_nems_atmesh_ww3data/runs/unperturbed/config.rc index 0b133668..ffdb8e53 100644 --- a/tests/data/reference/test_hera_adcirc_tidal_nems_atmesh_ww3data/runs/unperturbed/config.rc +++ b/tests/data/reference/test_hera_adcirc_tidal_nems_atmesh_ww3data/runs/unperturbed/config.rc @@ -1,4 +1,4 @@ -# `config.rc` generated with NEMSpy 1.4.10.post46.dev0+ce0f814 +# `config.rc` generated with NEMSpy 1.0.4 atm_dir: ../../../../input/forcings/ike atm_nam: wind_atm_fin_ch_time_vec.nc wav_dir: ../../../../input/forcings/ike diff --git a/tests/data/reference/test_hera_adcirc_tidal_nems_atmesh_ww3data/runs/unperturbed/fort.15 b/tests/data/reference/test_hera_adcirc_tidal_nems_atmesh_ww3data/runs/unperturbed/fort.15 index 2b35107b..1043ee15 100644 --- a/tests/data/reference/test_hera_adcirc_tidal_nems_atmesh_ww3data/runs/unperturbed/fort.15 +++ b/tests/data/reference/test_hera_adcirc_tidal_nems_atmesh_ww3data/runs/unperturbed/fort.15 @@ -1,4 +1,4 @@ -created on 2021-11-17 11:30 ! RUNDES - 32 CHARACTER ALPHANUMERIC RUN DESCRIPTION +created on 2021-12-28 11:17 ! RUNDES - 32 CHARACTER ALPHANUMERIC RUN DESCRIPTION Shinacock Inlet Coarse Grid ! RUNID - 24 CHARACTER ALPANUMERIC RUN IDENTIFICATION 1 ! NFOVER - NONFATAL ERROR OVERRIDE OPTION 1 ! NABOUT - ABREVIATED OUTPUT OPTION PARAMETER diff --git a/tests/data/reference/test_hera_adcirc_tidal_nems_atmesh_ww3data/runs/unperturbed/model_configure b/tests/data/reference/test_hera_adcirc_tidal_nems_atmesh_ww3data/runs/unperturbed/model_configure index 0b6056cb..535752d0 100644 --- a/tests/data/reference/test_hera_adcirc_tidal_nems_atmesh_ww3data/runs/unperturbed/model_configure +++ b/tests/data/reference/test_hera_adcirc_tidal_nems_atmesh_ww3data/runs/unperturbed/model_configure @@ -1,4 +1,4 @@ -# `model_configure` generated with NEMSpy 1.4.10.post46.dev0+ce0f814 +# `model_configure` generated with NEMSpy 1.0.4 total_member: 1 print_esmf: .true. namelist: atm_namelist.rc diff --git a/tests/data/reference/test_hera_adcirc_tidal_nems_atmesh_ww3data/runs/unperturbed/nems.configure b/tests/data/reference/test_hera_adcirc_tidal_nems_atmesh_ww3data/runs/unperturbed/nems.configure index 9cfcdc59..412552a5 100644 --- a/tests/data/reference/test_hera_adcirc_tidal_nems_atmesh_ww3data/runs/unperturbed/nems.configure +++ b/tests/data/reference/test_hera_adcirc_tidal_nems_atmesh_ww3data/runs/unperturbed/nems.configure @@ -1,4 +1,4 @@ -# `nems.configure` generated with NEMSpy 1.4.10.post46.dev0+ce0f814 +# `nems.configure` generated with NEMSpy 1.0.4 # EARTH # EARTH_component_list: ATM WAV OCN EARTH_attributes:: diff --git a/tests/data/reference/test_hera_adcirc_tidal_nems_atmesh_ww3data/spinup/config.rc b/tests/data/reference/test_hera_adcirc_tidal_nems_atmesh_ww3data/spinup/config.rc index a209005f..b214ebaf 100644 --- a/tests/data/reference/test_hera_adcirc_tidal_nems_atmesh_ww3data/spinup/config.rc +++ b/tests/data/reference/test_hera_adcirc_tidal_nems_atmesh_ww3data/spinup/config.rc @@ -1,2 +1,2 @@ -# `config.rc` generated with NEMSpy 1.4.10.post46.dev0+ce0f814 +# `config.rc` generated with NEMSpy 1.0.4 diff --git a/tests/data/reference/test_hera_adcirc_tidal_nems_atmesh_ww3data/spinup/fort.15 b/tests/data/reference/test_hera_adcirc_tidal_nems_atmesh_ww3data/spinup/fort.15 index 803889ed..c15d3514 100644 --- a/tests/data/reference/test_hera_adcirc_tidal_nems_atmesh_ww3data/spinup/fort.15 +++ b/tests/data/reference/test_hera_adcirc_tidal_nems_atmesh_ww3data/spinup/fort.15 @@ -1,4 +1,4 @@ -created on 2021-11-17 11:30 ! RUNDES - 32 CHARACTER ALPHANUMERIC RUN DESCRIPTION +created on 2021-12-28 11:17 ! RUNDES - 32 CHARACTER ALPHANUMERIC RUN DESCRIPTION Shinacock Inlet Coarse Grid ! RUNID - 24 CHARACTER ALPANUMERIC RUN IDENTIFICATION 1 ! NFOVER - NONFATAL ERROR OVERRIDE OPTION 1 ! NABOUT - ABREVIATED OUTPUT OPTION PARAMETER diff --git a/tests/data/reference/test_hera_adcirc_tidal_nems_atmesh_ww3data/spinup/model_configure b/tests/data/reference/test_hera_adcirc_tidal_nems_atmesh_ww3data/spinup/model_configure index 7eb9711b..266f62a0 100644 --- a/tests/data/reference/test_hera_adcirc_tidal_nems_atmesh_ww3data/spinup/model_configure +++ b/tests/data/reference/test_hera_adcirc_tidal_nems_atmesh_ww3data/spinup/model_configure @@ -1,4 +1,4 @@ -# `model_configure` generated with NEMSpy 1.4.10.post46.dev0+ce0f814 +# `model_configure` generated with NEMSpy 1.0.4 total_member: 1 print_esmf: .true. namelist: atm_namelist.rc diff --git a/tests/data/reference/test_hera_adcirc_tidal_nems_atmesh_ww3data/spinup/nems.configure b/tests/data/reference/test_hera_adcirc_tidal_nems_atmesh_ww3data/spinup/nems.configure index fe22699e..eb1059fa 100644 --- a/tests/data/reference/test_hera_adcirc_tidal_nems_atmesh_ww3data/spinup/nems.configure +++ b/tests/data/reference/test_hera_adcirc_tidal_nems_atmesh_ww3data/spinup/nems.configure @@ -1,4 +1,4 @@ -# `nems.configure` generated with NEMSpy 1.4.10.post46.dev0+ce0f814 +# `nems.configure` generated with NEMSpy 1.0.4 # EARTH # EARTH_component_list: OCN EARTH_attributes:: diff --git a/tests/data/reference/test_hera_adcirc_tidal_nems_atmesh_ww3data_perturbed/generate.job b/tests/data/reference/test_hera_adcirc_tidal_nems_atmesh_ww3data_perturbed/generate.job index a0b1aa92..fb5a05b7 100644 --- a/tests/data/reference/test_hera_adcirc_tidal_nems_atmesh_ww3data_perturbed/generate.job +++ b/tests/data/reference/test_hera_adcirc_tidal_nems_atmesh_ww3data_perturbed/generate.job @@ -1,14 +1,13 @@ #!/bin/bash #SBATCH -J ADCIRC_GENERATE_CONFIGURATION #SBATCH -A coastal -#SBATCH --error=slurm.log -#SBATCH --output=slurm.log +#SBATCH --output=ADCIRC_GENERATE_CONFIGURATION.log #SBATCH -n 40 #SBATCH -N 1 #SBATCH --time=01:00:00 +#SBATCH --partition=bigmem set -e -rm **/*.log -generate_adcirc +generate_adcirc --parallel echo "use ./run_hera.sh to start model" diff --git a/tests/data/reference/test_hera_adcirc_tidal_nems_atmesh_ww3data_perturbed/runs/run_1/config.rc b/tests/data/reference/test_hera_adcirc_tidal_nems_atmesh_ww3data_perturbed/runs/run_1/config.rc index 29ff1816..ffdb8e53 100644 --- a/tests/data/reference/test_hera_adcirc_tidal_nems_atmesh_ww3data_perturbed/runs/run_1/config.rc +++ b/tests/data/reference/test_hera_adcirc_tidal_nems_atmesh_ww3data_perturbed/runs/run_1/config.rc @@ -1,4 +1,4 @@ -# `config.rc` generated with NEMSpy 1.0.3.post14.dev0+7ad1a61 +# `config.rc` generated with NEMSpy 1.0.4 atm_dir: ../../../../input/forcings/ike atm_nam: wind_atm_fin_ch_time_vec.nc wav_dir: ../../../../input/forcings/ike diff --git a/tests/data/reference/test_hera_adcirc_tidal_nems_atmesh_ww3data_perturbed/runs/run_1/fort.15 b/tests/data/reference/test_hera_adcirc_tidal_nems_atmesh_ww3data_perturbed/runs/run_1/fort.15 index 34fc9635..ebea6fef 100644 --- a/tests/data/reference/test_hera_adcirc_tidal_nems_atmesh_ww3data_perturbed/runs/run_1/fort.15 +++ b/tests/data/reference/test_hera_adcirc_tidal_nems_atmesh_ww3data_perturbed/runs/run_1/fort.15 @@ -1,4 +1,4 @@ -created on 2021-11-17 11:53 ! RUNDES - 32 CHARACTER ALPHANUMERIC RUN DESCRIPTION +created on 2021-12-28 11:18 ! RUNDES - 32 CHARACTER ALPHANUMERIC RUN DESCRIPTION Shinacock Inlet Coarse Grid ! RUNID - 24 CHARACTER ALPANUMERIC RUN IDENTIFICATION 1 ! NFOVER - NONFATAL ERROR OVERRIDE OPTION 1 ! NABOUT - ABREVIATED OUTPUT OPTION PARAMETER diff --git a/tests/data/reference/test_hera_adcirc_tidal_nems_atmesh_ww3data_perturbed/runs/run_1/model_configure b/tests/data/reference/test_hera_adcirc_tidal_nems_atmesh_ww3data_perturbed/runs/run_1/model_configure index 082e4596..535752d0 100644 --- a/tests/data/reference/test_hera_adcirc_tidal_nems_atmesh_ww3data_perturbed/runs/run_1/model_configure +++ b/tests/data/reference/test_hera_adcirc_tidal_nems_atmesh_ww3data_perturbed/runs/run_1/model_configure @@ -1,4 +1,4 @@ -# `model_configure` generated with NEMSpy 1.0.3.post14.dev0+7ad1a61 +# `model_configure` generated with NEMSpy 1.0.4 total_member: 1 print_esmf: .true. namelist: atm_namelist.rc diff --git a/tests/data/reference/test_hera_adcirc_tidal_nems_atmesh_ww3data_perturbed/runs/run_1/nems.configure b/tests/data/reference/test_hera_adcirc_tidal_nems_atmesh_ww3data_perturbed/runs/run_1/nems.configure index e7115a3f..412552a5 100644 --- a/tests/data/reference/test_hera_adcirc_tidal_nems_atmesh_ww3data_perturbed/runs/run_1/nems.configure +++ b/tests/data/reference/test_hera_adcirc_tidal_nems_atmesh_ww3data_perturbed/runs/run_1/nems.configure @@ -1,4 +1,4 @@ -# `nems.configure` generated with NEMSpy 1.0.3.post14.dev0+7ad1a61 +# `nems.configure` generated with NEMSpy 1.0.4 # EARTH # EARTH_component_list: ATM WAV OCN EARTH_attributes:: diff --git a/tests/data/reference/test_hera_adcirc_tidal_nems_atmesh_ww3data_perturbed/runs/run_2/config.rc b/tests/data/reference/test_hera_adcirc_tidal_nems_atmesh_ww3data_perturbed/runs/run_2/config.rc index 29ff1816..ffdb8e53 100644 --- a/tests/data/reference/test_hera_adcirc_tidal_nems_atmesh_ww3data_perturbed/runs/run_2/config.rc +++ b/tests/data/reference/test_hera_adcirc_tidal_nems_atmesh_ww3data_perturbed/runs/run_2/config.rc @@ -1,4 +1,4 @@ -# `config.rc` generated with NEMSpy 1.0.3.post14.dev0+7ad1a61 +# `config.rc` generated with NEMSpy 1.0.4 atm_dir: ../../../../input/forcings/ike atm_nam: wind_atm_fin_ch_time_vec.nc wav_dir: ../../../../input/forcings/ike diff --git a/tests/data/reference/test_hera_adcirc_tidal_nems_atmesh_ww3data_perturbed/runs/run_2/fort.15 b/tests/data/reference/test_hera_adcirc_tidal_nems_atmesh_ww3data_perturbed/runs/run_2/fort.15 index 34fc9635..ebea6fef 100644 --- a/tests/data/reference/test_hera_adcirc_tidal_nems_atmesh_ww3data_perturbed/runs/run_2/fort.15 +++ b/tests/data/reference/test_hera_adcirc_tidal_nems_atmesh_ww3data_perturbed/runs/run_2/fort.15 @@ -1,4 +1,4 @@ -created on 2021-11-17 11:53 ! RUNDES - 32 CHARACTER ALPHANUMERIC RUN DESCRIPTION +created on 2021-12-28 11:18 ! RUNDES - 32 CHARACTER ALPHANUMERIC RUN DESCRIPTION Shinacock Inlet Coarse Grid ! RUNID - 24 CHARACTER ALPANUMERIC RUN IDENTIFICATION 1 ! NFOVER - NONFATAL ERROR OVERRIDE OPTION 1 ! NABOUT - ABREVIATED OUTPUT OPTION PARAMETER diff --git a/tests/data/reference/test_hera_adcirc_tidal_nems_atmesh_ww3data_perturbed/runs/run_2/model_configure b/tests/data/reference/test_hera_adcirc_tidal_nems_atmesh_ww3data_perturbed/runs/run_2/model_configure index 082e4596..535752d0 100644 --- a/tests/data/reference/test_hera_adcirc_tidal_nems_atmesh_ww3data_perturbed/runs/run_2/model_configure +++ b/tests/data/reference/test_hera_adcirc_tidal_nems_atmesh_ww3data_perturbed/runs/run_2/model_configure @@ -1,4 +1,4 @@ -# `model_configure` generated with NEMSpy 1.0.3.post14.dev0+7ad1a61 +# `model_configure` generated with NEMSpy 1.0.4 total_member: 1 print_esmf: .true. namelist: atm_namelist.rc diff --git a/tests/data/reference/test_hera_adcirc_tidal_nems_atmesh_ww3data_perturbed/runs/run_2/nems.configure b/tests/data/reference/test_hera_adcirc_tidal_nems_atmesh_ww3data_perturbed/runs/run_2/nems.configure index e7115a3f..412552a5 100644 --- a/tests/data/reference/test_hera_adcirc_tidal_nems_atmesh_ww3data_perturbed/runs/run_2/nems.configure +++ b/tests/data/reference/test_hera_adcirc_tidal_nems_atmesh_ww3data_perturbed/runs/run_2/nems.configure @@ -1,4 +1,4 @@ -# `nems.configure` generated with NEMSpy 1.0.3.post14.dev0+7ad1a61 +# `nems.configure` generated with NEMSpy 1.0.4 # EARTH # EARTH_component_list: ATM WAV OCN EARTH_attributes:: diff --git a/tests/data/reference/test_hera_adcirc_tidal_nems_atmesh_ww3data_perturbed/spinup/config.rc b/tests/data/reference/test_hera_adcirc_tidal_nems_atmesh_ww3data_perturbed/spinup/config.rc index c86bf827..b214ebaf 100644 --- a/tests/data/reference/test_hera_adcirc_tidal_nems_atmesh_ww3data_perturbed/spinup/config.rc +++ b/tests/data/reference/test_hera_adcirc_tidal_nems_atmesh_ww3data_perturbed/spinup/config.rc @@ -1,2 +1,2 @@ -# `config.rc` generated with NEMSpy 1.0.3.post14.dev0+7ad1a61 +# `config.rc` generated with NEMSpy 1.0.4 diff --git a/tests/data/reference/test_hera_adcirc_tidal_nems_atmesh_ww3data_perturbed/spinup/fort.15 b/tests/data/reference/test_hera_adcirc_tidal_nems_atmesh_ww3data_perturbed/spinup/fort.15 index 55e170b4..b19c2473 100644 --- a/tests/data/reference/test_hera_adcirc_tidal_nems_atmesh_ww3data_perturbed/spinup/fort.15 +++ b/tests/data/reference/test_hera_adcirc_tidal_nems_atmesh_ww3data_perturbed/spinup/fort.15 @@ -1,4 +1,4 @@ -created on 2021-11-17 11:53 ! RUNDES - 32 CHARACTER ALPHANUMERIC RUN DESCRIPTION +created on 2021-12-28 11:18 ! RUNDES - 32 CHARACTER ALPHANUMERIC RUN DESCRIPTION Shinacock Inlet Coarse Grid ! RUNID - 24 CHARACTER ALPANUMERIC RUN IDENTIFICATION 1 ! NFOVER - NONFATAL ERROR OVERRIDE OPTION 1 ! NABOUT - ABREVIATED OUTPUT OPTION PARAMETER diff --git a/tests/data/reference/test_hera_adcirc_tidal_nems_atmesh_ww3data_perturbed/spinup/model_configure b/tests/data/reference/test_hera_adcirc_tidal_nems_atmesh_ww3data_perturbed/spinup/model_configure index 37a77b36..266f62a0 100644 --- a/tests/data/reference/test_hera_adcirc_tidal_nems_atmesh_ww3data_perturbed/spinup/model_configure +++ b/tests/data/reference/test_hera_adcirc_tidal_nems_atmesh_ww3data_perturbed/spinup/model_configure @@ -1,4 +1,4 @@ -# `model_configure` generated with NEMSpy 1.0.3.post14.dev0+7ad1a61 +# `model_configure` generated with NEMSpy 1.0.4 total_member: 1 print_esmf: .true. namelist: atm_namelist.rc diff --git a/tests/data/reference/test_hera_adcirc_tidal_nems_atmesh_ww3data_perturbed/spinup/nems.configure b/tests/data/reference/test_hera_adcirc_tidal_nems_atmesh_ww3data_perturbed/spinup/nems.configure index 2017c81a..eb1059fa 100644 --- a/tests/data/reference/test_hera_adcirc_tidal_nems_atmesh_ww3data_perturbed/spinup/nems.configure +++ b/tests/data/reference/test_hera_adcirc_tidal_nems_atmesh_ww3data_perturbed/spinup/nems.configure @@ -1,4 +1,4 @@ -# `nems.configure` generated with NEMSpy 1.0.3.post14.dev0+7ad1a61 +# `nems.configure` generated with NEMSpy 1.0.4 # EARTH # EARTH_component_list: OCN EARTH_attributes:: diff --git a/tests/data/reference/test_local_adcirc_tidal/generate.job b/tests/data/reference/test_local_adcirc_tidal/generate.job index 130f3e0c..a161818b 100644 --- a/tests/data/reference/test_local_adcirc_tidal/generate.job +++ b/tests/data/reference/test_local_adcirc_tidal/generate.job @@ -1,4 +1,3 @@ #!/bin/bash -rm **/*.log -generate_adcirc +generate_adcirc --parallel echo "use ./run_hera.sh to start model" diff --git a/tests/data/reference/test_local_adcirc_tidal/runs/unperturbed/fort.15 b/tests/data/reference/test_local_adcirc_tidal/runs/unperturbed/fort.15 index 95de17a5..60d7ba24 100644 --- a/tests/data/reference/test_local_adcirc_tidal/runs/unperturbed/fort.15 +++ b/tests/data/reference/test_local_adcirc_tidal/runs/unperturbed/fort.15 @@ -1,4 +1,4 @@ -created on 2021-11-17 11:40 ! RUNDES - 32 CHARACTER ALPHANUMERIC RUN DESCRIPTION +created on 2021-12-28 11:18 ! RUNDES - 32 CHARACTER ALPHANUMERIC RUN DESCRIPTION Shinacock Inlet Coarse Grid ! RUNID - 24 CHARACTER ALPANUMERIC RUN IDENTIFICATION 1 ! NFOVER - NONFATAL ERROR OVERRIDE OPTION 1 ! NABOUT - ABREVIATED OUTPUT OPTION PARAMETER diff --git a/tests/data/reference/test_local_adcirc_tidal/spinup/fort.15 b/tests/data/reference/test_local_adcirc_tidal/spinup/fort.15 index 511ea1e9..b19c2473 100644 --- a/tests/data/reference/test_local_adcirc_tidal/spinup/fort.15 +++ b/tests/data/reference/test_local_adcirc_tidal/spinup/fort.15 @@ -1,4 +1,4 @@ -created on 2021-11-17 11:40 ! RUNDES - 32 CHARACTER ALPHANUMERIC RUN DESCRIPTION +created on 2021-12-28 11:18 ! RUNDES - 32 CHARACTER ALPHANUMERIC RUN DESCRIPTION Shinacock Inlet Coarse Grid ! RUNID - 24 CHARACTER ALPANUMERIC RUN IDENTIFICATION 1 ! NFOVER - NONFATAL ERROR OVERRIDE OPTION 1 ! NABOUT - ABREVIATED OUTPUT OPTION PARAMETER diff --git a/tests/data/reference/test_local_adcirc_tidal_nems_atmesh_ww3data/generate.job b/tests/data/reference/test_local_adcirc_tidal_nems_atmesh_ww3data/generate.job index 130f3e0c..a161818b 100644 --- a/tests/data/reference/test_local_adcirc_tidal_nems_atmesh_ww3data/generate.job +++ b/tests/data/reference/test_local_adcirc_tidal_nems_atmesh_ww3data/generate.job @@ -1,4 +1,3 @@ #!/bin/bash -rm **/*.log -generate_adcirc +generate_adcirc --parallel echo "use ./run_hera.sh to start model" diff --git a/tests/data/reference/test_local_adcirc_tidal_nems_atmesh_ww3data/runs/unperturbed/config.rc b/tests/data/reference/test_local_adcirc_tidal_nems_atmesh_ww3data/runs/unperturbed/config.rc index 0b133668..ffdb8e53 100644 --- a/tests/data/reference/test_local_adcirc_tidal_nems_atmesh_ww3data/runs/unperturbed/config.rc +++ b/tests/data/reference/test_local_adcirc_tidal_nems_atmesh_ww3data/runs/unperturbed/config.rc @@ -1,4 +1,4 @@ -# `config.rc` generated with NEMSpy 1.4.10.post46.dev0+ce0f814 +# `config.rc` generated with NEMSpy 1.0.4 atm_dir: ../../../../input/forcings/ike atm_nam: wind_atm_fin_ch_time_vec.nc wav_dir: ../../../../input/forcings/ike diff --git a/tests/data/reference/test_local_adcirc_tidal_nems_atmesh_ww3data/runs/unperturbed/fort.15 b/tests/data/reference/test_local_adcirc_tidal_nems_atmesh_ww3data/runs/unperturbed/fort.15 index 2b35107b..ebea6fef 100644 --- a/tests/data/reference/test_local_adcirc_tidal_nems_atmesh_ww3data/runs/unperturbed/fort.15 +++ b/tests/data/reference/test_local_adcirc_tidal_nems_atmesh_ww3data/runs/unperturbed/fort.15 @@ -1,4 +1,4 @@ -created on 2021-11-17 11:30 ! RUNDES - 32 CHARACTER ALPHANUMERIC RUN DESCRIPTION +created on 2021-12-28 11:18 ! RUNDES - 32 CHARACTER ALPHANUMERIC RUN DESCRIPTION Shinacock Inlet Coarse Grid ! RUNID - 24 CHARACTER ALPANUMERIC RUN IDENTIFICATION 1 ! NFOVER - NONFATAL ERROR OVERRIDE OPTION 1 ! NABOUT - ABREVIATED OUTPUT OPTION PARAMETER diff --git a/tests/data/reference/test_local_adcirc_tidal_nems_atmesh_ww3data/runs/unperturbed/model_configure b/tests/data/reference/test_local_adcirc_tidal_nems_atmesh_ww3data/runs/unperturbed/model_configure index 068aa8d5..8ca4113a 100644 --- a/tests/data/reference/test_local_adcirc_tidal_nems_atmesh_ww3data/runs/unperturbed/model_configure +++ b/tests/data/reference/test_local_adcirc_tidal_nems_atmesh_ww3data/runs/unperturbed/model_configure @@ -1,4 +1,4 @@ -# `model_configure` generated with NEMSpy 1.4.10.post46.dev0+ce0f814 +# `model_configure` generated with NEMSpy 1.0.4 total_member: 1 print_esmf: .true. namelist: atm_namelist.rc diff --git a/tests/data/reference/test_local_adcirc_tidal_nems_atmesh_ww3data/runs/unperturbed/nems.configure b/tests/data/reference/test_local_adcirc_tidal_nems_atmesh_ww3data/runs/unperturbed/nems.configure index 08c78dca..6cd03a7b 100644 --- a/tests/data/reference/test_local_adcirc_tidal_nems_atmesh_ww3data/runs/unperturbed/nems.configure +++ b/tests/data/reference/test_local_adcirc_tidal_nems_atmesh_ww3data/runs/unperturbed/nems.configure @@ -1,4 +1,4 @@ -# `nems.configure` generated with NEMSpy 1.4.10.post46.dev0+ce0f814 +# `nems.configure` generated with NEMSpy 1.0.4 # EARTH # EARTH_component_list: ATM WAV OCN EARTH_attributes:: diff --git a/tests/data/reference/test_local_adcirc_tidal_nems_atmesh_ww3data/spinup/config.rc b/tests/data/reference/test_local_adcirc_tidal_nems_atmesh_ww3data/spinup/config.rc index a209005f..b214ebaf 100644 --- a/tests/data/reference/test_local_adcirc_tidal_nems_atmesh_ww3data/spinup/config.rc +++ b/tests/data/reference/test_local_adcirc_tidal_nems_atmesh_ww3data/spinup/config.rc @@ -1,2 +1,2 @@ -# `config.rc` generated with NEMSpy 1.4.10.post46.dev0+ce0f814 +# `config.rc` generated with NEMSpy 1.0.4 diff --git a/tests/data/reference/test_local_adcirc_tidal_nems_atmesh_ww3data/spinup/fort.15 b/tests/data/reference/test_local_adcirc_tidal_nems_atmesh_ww3data/spinup/fort.15 index 803889ed..b19c2473 100644 --- a/tests/data/reference/test_local_adcirc_tidal_nems_atmesh_ww3data/spinup/fort.15 +++ b/tests/data/reference/test_local_adcirc_tidal_nems_atmesh_ww3data/spinup/fort.15 @@ -1,4 +1,4 @@ -created on 2021-11-17 11:30 ! RUNDES - 32 CHARACTER ALPHANUMERIC RUN DESCRIPTION +created on 2021-12-28 11:18 ! RUNDES - 32 CHARACTER ALPHANUMERIC RUN DESCRIPTION Shinacock Inlet Coarse Grid ! RUNID - 24 CHARACTER ALPANUMERIC RUN IDENTIFICATION 1 ! NFOVER - NONFATAL ERROR OVERRIDE OPTION 1 ! NABOUT - ABREVIATED OUTPUT OPTION PARAMETER diff --git a/tests/data/reference/test_local_adcirc_tidal_nems_atmesh_ww3data/spinup/model_configure b/tests/data/reference/test_local_adcirc_tidal_nems_atmesh_ww3data/spinup/model_configure index 73093bba..1e007d0c 100644 --- a/tests/data/reference/test_local_adcirc_tidal_nems_atmesh_ww3data/spinup/model_configure +++ b/tests/data/reference/test_local_adcirc_tidal_nems_atmesh_ww3data/spinup/model_configure @@ -1,4 +1,4 @@ -# `model_configure` generated with NEMSpy 1.4.10.post46.dev0+ce0f814 +# `model_configure` generated with NEMSpy 1.0.4 total_member: 1 print_esmf: .true. namelist: atm_namelist.rc diff --git a/tests/data/reference/test_local_adcirc_tidal_nems_atmesh_ww3data/spinup/nems.configure b/tests/data/reference/test_local_adcirc_tidal_nems_atmesh_ww3data/spinup/nems.configure index 6a051e31..a3911e20 100644 --- a/tests/data/reference/test_local_adcirc_tidal_nems_atmesh_ww3data/spinup/nems.configure +++ b/tests/data/reference/test_local_adcirc_tidal_nems_atmesh_ww3data/spinup/nems.configure @@ -1,4 +1,4 @@ -# `nems.configure` generated with NEMSpy 1.4.10.post46.dev0+ce0f814 +# `nems.configure` generated with NEMSpy 1.0.4 # EARTH # EARTH_component_list: OCN EARTH_attributes:: diff --git a/tests/data/reference/test_stampede2_adcirc_tidal/generate.job b/tests/data/reference/test_stampede2_adcirc_tidal/generate.job index d143d799..af08bdf9 100644 --- a/tests/data/reference/test_stampede2_adcirc_tidal/generate.job +++ b/tests/data/reference/test_stampede2_adcirc_tidal/generate.job @@ -1,8 +1,7 @@ #!/bin/bash #SBATCH -J ADCIRC_GENERATE_CONFIGURATION #SBATCH -A coastal -#SBATCH --error=slurm.log -#SBATCH --output=slurm.log +#SBATCH --output=ADCIRC_GENERATE_CONFIGURATION.log #SBATCH -n 68 #SBATCH -N 1 #SBATCH --time=01:00:00 @@ -10,6 +9,5 @@ set -e -rm **/*.log -generate_adcirc +generate_adcirc --parallel echo "use ./run_hera.sh to start model" diff --git a/tests/data/reference/test_stampede2_adcirc_tidal/runs/unperturbed/fort.15 b/tests/data/reference/test_stampede2_adcirc_tidal/runs/unperturbed/fort.15 index dd7542ce..60d7ba24 100644 --- a/tests/data/reference/test_stampede2_adcirc_tidal/runs/unperturbed/fort.15 +++ b/tests/data/reference/test_stampede2_adcirc_tidal/runs/unperturbed/fort.15 @@ -1,4 +1,4 @@ -created on 2021-11-17 11:30 ! RUNDES - 32 CHARACTER ALPHANUMERIC RUN DESCRIPTION +created on 2021-12-28 11:18 ! RUNDES - 32 CHARACTER ALPHANUMERIC RUN DESCRIPTION Shinacock Inlet Coarse Grid ! RUNID - 24 CHARACTER ALPANUMERIC RUN IDENTIFICATION 1 ! NFOVER - NONFATAL ERROR OVERRIDE OPTION 1 ! NABOUT - ABREVIATED OUTPUT OPTION PARAMETER diff --git a/tests/data/reference/test_stampede2_adcirc_tidal/spinup/fort.15 b/tests/data/reference/test_stampede2_adcirc_tidal/spinup/fort.15 index 803889ed..b19c2473 100644 --- a/tests/data/reference/test_stampede2_adcirc_tidal/spinup/fort.15 +++ b/tests/data/reference/test_stampede2_adcirc_tidal/spinup/fort.15 @@ -1,4 +1,4 @@ -created on 2021-11-17 11:30 ! RUNDES - 32 CHARACTER ALPHANUMERIC RUN DESCRIPTION +created on 2021-12-28 11:18 ! RUNDES - 32 CHARACTER ALPHANUMERIC RUN DESCRIPTION Shinacock Inlet Coarse Grid ! RUNID - 24 CHARACTER ALPANUMERIC RUN IDENTIFICATION 1 ! NFOVER - NONFATAL ERROR OVERRIDE OPTION 1 ! NABOUT - ABREVIATED OUTPUT OPTION PARAMETER diff --git a/tests/data/reference/test_stampede2_adcirc_tidal_nems_atmesh_ww3data/generate.job b/tests/data/reference/test_stampede2_adcirc_tidal_nems_atmesh_ww3data/generate.job index d143d799..af08bdf9 100644 --- a/tests/data/reference/test_stampede2_adcirc_tidal_nems_atmesh_ww3data/generate.job +++ b/tests/data/reference/test_stampede2_adcirc_tidal_nems_atmesh_ww3data/generate.job @@ -1,8 +1,7 @@ #!/bin/bash #SBATCH -J ADCIRC_GENERATE_CONFIGURATION #SBATCH -A coastal -#SBATCH --error=slurm.log -#SBATCH --output=slurm.log +#SBATCH --output=ADCIRC_GENERATE_CONFIGURATION.log #SBATCH -n 68 #SBATCH -N 1 #SBATCH --time=01:00:00 @@ -10,6 +9,5 @@ set -e -rm **/*.log -generate_adcirc +generate_adcirc --parallel echo "use ./run_hera.sh to start model" diff --git a/tests/data/reference/test_stampede2_adcirc_tidal_nems_atmesh_ww3data/runs/unperturbed/config.rc b/tests/data/reference/test_stampede2_adcirc_tidal_nems_atmesh_ww3data/runs/unperturbed/config.rc index 29ff1816..ffdb8e53 100644 --- a/tests/data/reference/test_stampede2_adcirc_tidal_nems_atmesh_ww3data/runs/unperturbed/config.rc +++ b/tests/data/reference/test_stampede2_adcirc_tidal_nems_atmesh_ww3data/runs/unperturbed/config.rc @@ -1,4 +1,4 @@ -# `config.rc` generated with NEMSpy 1.0.3.post14.dev0+7ad1a61 +# `config.rc` generated with NEMSpy 1.0.4 atm_dir: ../../../../input/forcings/ike atm_nam: wind_atm_fin_ch_time_vec.nc wav_dir: ../../../../input/forcings/ike diff --git a/tests/data/reference/test_stampede2_adcirc_tidal_nems_atmesh_ww3data/runs/unperturbed/fort.15 b/tests/data/reference/test_stampede2_adcirc_tidal_nems_atmesh_ww3data/runs/unperturbed/fort.15 index 34fc9635..ebea6fef 100644 --- a/tests/data/reference/test_stampede2_adcirc_tidal_nems_atmesh_ww3data/runs/unperturbed/fort.15 +++ b/tests/data/reference/test_stampede2_adcirc_tidal_nems_atmesh_ww3data/runs/unperturbed/fort.15 @@ -1,4 +1,4 @@ -created on 2021-11-17 11:53 ! RUNDES - 32 CHARACTER ALPHANUMERIC RUN DESCRIPTION +created on 2021-12-28 11:18 ! RUNDES - 32 CHARACTER ALPHANUMERIC RUN DESCRIPTION Shinacock Inlet Coarse Grid ! RUNID - 24 CHARACTER ALPANUMERIC RUN IDENTIFICATION 1 ! NFOVER - NONFATAL ERROR OVERRIDE OPTION 1 ! NABOUT - ABREVIATED OUTPUT OPTION PARAMETER diff --git a/tests/data/reference/test_stampede2_adcirc_tidal_nems_atmesh_ww3data/runs/unperturbed/model_configure b/tests/data/reference/test_stampede2_adcirc_tidal_nems_atmesh_ww3data/runs/unperturbed/model_configure index 425044cd..52314628 100644 --- a/tests/data/reference/test_stampede2_adcirc_tidal_nems_atmesh_ww3data/runs/unperturbed/model_configure +++ b/tests/data/reference/test_stampede2_adcirc_tidal_nems_atmesh_ww3data/runs/unperturbed/model_configure @@ -1,4 +1,4 @@ -# `model_configure` generated with NEMSpy 1.0.3.post14.dev0+7ad1a61 +# `model_configure` generated with NEMSpy 1.0.4 total_member: 1 print_esmf: .true. namelist: atm_namelist.rc diff --git a/tests/data/reference/test_stampede2_adcirc_tidal_nems_atmesh_ww3data/runs/unperturbed/nems.configure b/tests/data/reference/test_stampede2_adcirc_tidal_nems_atmesh_ww3data/runs/unperturbed/nems.configure index 450904d1..703486ab 100644 --- a/tests/data/reference/test_stampede2_adcirc_tidal_nems_atmesh_ww3data/runs/unperturbed/nems.configure +++ b/tests/data/reference/test_stampede2_adcirc_tidal_nems_atmesh_ww3data/runs/unperturbed/nems.configure @@ -1,4 +1,4 @@ -# `nems.configure` generated with NEMSpy 1.0.3.post14.dev0+7ad1a61 +# `nems.configure` generated with NEMSpy 1.0.4 # EARTH # EARTH_component_list: ATM WAV OCN EARTH_attributes:: diff --git a/tests/data/reference/test_stampede2_adcirc_tidal_nems_atmesh_ww3data/spinup/config.rc b/tests/data/reference/test_stampede2_adcirc_tidal_nems_atmesh_ww3data/spinup/config.rc index c86bf827..b214ebaf 100644 --- a/tests/data/reference/test_stampede2_adcirc_tidal_nems_atmesh_ww3data/spinup/config.rc +++ b/tests/data/reference/test_stampede2_adcirc_tidal_nems_atmesh_ww3data/spinup/config.rc @@ -1,2 +1,2 @@ -# `config.rc` generated with NEMSpy 1.0.3.post14.dev0+7ad1a61 +# `config.rc` generated with NEMSpy 1.0.4 diff --git a/tests/data/reference/test_stampede2_adcirc_tidal_nems_atmesh_ww3data/spinup/fort.15 b/tests/data/reference/test_stampede2_adcirc_tidal_nems_atmesh_ww3data/spinup/fort.15 index 55e170b4..b19c2473 100644 --- a/tests/data/reference/test_stampede2_adcirc_tidal_nems_atmesh_ww3data/spinup/fort.15 +++ b/tests/data/reference/test_stampede2_adcirc_tidal_nems_atmesh_ww3data/spinup/fort.15 @@ -1,4 +1,4 @@ -created on 2021-11-17 11:53 ! RUNDES - 32 CHARACTER ALPHANUMERIC RUN DESCRIPTION +created on 2021-12-28 11:18 ! RUNDES - 32 CHARACTER ALPHANUMERIC RUN DESCRIPTION Shinacock Inlet Coarse Grid ! RUNID - 24 CHARACTER ALPANUMERIC RUN IDENTIFICATION 1 ! NFOVER - NONFATAL ERROR OVERRIDE OPTION 1 ! NABOUT - ABREVIATED OUTPUT OPTION PARAMETER diff --git a/tests/data/reference/test_stampede2_adcirc_tidal_nems_atmesh_ww3data/spinup/model_configure b/tests/data/reference/test_stampede2_adcirc_tidal_nems_atmesh_ww3data/spinup/model_configure index c24a6128..62a73bc1 100644 --- a/tests/data/reference/test_stampede2_adcirc_tidal_nems_atmesh_ww3data/spinup/model_configure +++ b/tests/data/reference/test_stampede2_adcirc_tidal_nems_atmesh_ww3data/spinup/model_configure @@ -1,4 +1,4 @@ -# `model_configure` generated with NEMSpy 1.0.3.post14.dev0+7ad1a61 +# `model_configure` generated with NEMSpy 1.0.4 total_member: 1 print_esmf: .true. namelist: atm_namelist.rc diff --git a/tests/data/reference/test_stampede2_adcirc_tidal_nems_atmesh_ww3data/spinup/nems.configure b/tests/data/reference/test_stampede2_adcirc_tidal_nems_atmesh_ww3data/spinup/nems.configure index 4d95f320..1c50990f 100644 --- a/tests/data/reference/test_stampede2_adcirc_tidal_nems_atmesh_ww3data/spinup/nems.configure +++ b/tests/data/reference/test_stampede2_adcirc_tidal_nems_atmesh_ww3data/spinup/nems.configure @@ -1,4 +1,4 @@ -# `nems.configure` generated with NEMSpy 1.0.3.post14.dev0+7ad1a61 +# `nems.configure` generated with NEMSpy 1.0.4 # EARTH # EARTH_component_list: OCN EARTH_attributes:: From ad42ad3db2b2e3df44618093417a6ad6d82da050 Mon Sep 17 00:00:00 2001 From: zacharyburnettNOAA Date: Tue, 28 Dec 2021 11:46:00 -0500 Subject: [PATCH 22/33] TPXO host URL no longer works; need to find a more reliable way to host TPXO for testing purposes --- tests/__init__.py | 1 + tests/test_configuration.py | 15 ++++++--------- 2 files changed, 7 insertions(+), 9 deletions(-) diff --git a/tests/__init__.py b/tests/__init__.py index 99affc28..647eca52 100644 --- a/tests/__init__.py +++ b/tests/__init__.py @@ -21,6 +21,7 @@ def tpxo_filename() -> Path: with FileLock(str(TPXO_FILENAME) + '.lock'): if not TPXO_FILENAME.exists(): + # TODO find a better way to host TPXO for testing url = 'https://www.dropbox.com/s/uc44cbo5s2x4n93/h_tpxo9.v1.tar.gz?dl=1' extract_download(url, TPXO_FILENAME.parent, ['h_tpxo9.v1.nc']) return TPXO_FILENAME diff --git a/tests/test_configuration.py b/tests/test_configuration.py index 14cb2f10..7cf42f0f 100644 --- a/tests/test_configuration.py +++ b/tests/test_configuration.py @@ -1,23 +1,21 @@ from datetime import datetime, timedelta from pathlib import Path -from adcircpy.forcing import AtmosphericMeshForcing, WaveWatch3DataForcing from nemspy.model import ADCIRCEntry, AtmosphericForcingEntry, WaveWatch3ForcingEntry import pytest from coupledmodeldriver import Platform from coupledmodeldriver.configure import ( ATMESHForcingJSON, - BestTrackForcingJSON, ModelDriverJSON, NEMSJSON, SlurmJSON, TidalForcingJSON, WW3DATAForcingJSON, ) -from coupledmodeldriver.generate import ADCIRCRunConfiguration, NEMSADCIRCRunConfiguration from coupledmodeldriver.generate.adcirc.base import ADCIRCJSON -from tests import INPUT_DIRECTORY, OUTPUT_DIRECTORY +# noinspection PyUnresolvedReferences +from tests import INPUT_DIRECTORY, tpxo_filename def test_update(): @@ -159,10 +157,11 @@ def test_tidal(): with pytest.raises((FileNotFoundError, OSError)): configuration.adcircpy_forcing - configuration['resource'] = None - configuration['constituents'] = ['q1', 'p1', 'm2'] + # TODO find a better way to host TPXO for testing + # configuration['resource'] = tpxo_filename() + # configuration['constituents'] = ['q1', 'p1', 'm2'] - assert list(configuration.adcircpy_forcing.active_constituents) == ['Q1', 'P1', 'M2'] + # assert list(configuration.adcircpy_forcing.active_constituents) == ['Q1', 'P1', 'M2'] def test_atmesh(): @@ -202,5 +201,3 @@ def test_modeldriver(): 'platform': Platform.HERA, 'perturbations': {'unperturbed': None}, } - - From 9a1da993684ddf159e5e9d0aa9a0371cb59d504e Mon Sep 17 00:00:00 2001 From: zacharyburnettNOAA Date: Wed, 12 Jan 2022 12:03:40 -0500 Subject: [PATCH 23/33] add descriptions to extra arguments --- README.md | 4 +-- .../client/initialize_adcirc.py | 29 +++++++++++-------- tests/test_configuration.py | 1 + 3 files changed, 20 insertions(+), 14 deletions(-) diff --git a/README.md b/README.md index 273ad4af..e5dc2772 100644 --- a/README.md +++ b/README.md @@ -15,8 +15,8 @@ model ensembles. pip install coupledmodeldriver ``` -It utilizes [NEMSpy](https://nemspy.readthedocs.io) to generate NEMS configuration files, shares common configurations -between runs, and organizes spinup and mesh partition into separate jobs for dependant submission. +It utilizes [NEMSpy](https://nemspy.readthedocs.io) to generate NEMS configuration files, shares common configurations between +runs, and organizes spinup and mesh partition into separate jobs for dependant submission. Documentation can be found at https://coupledmodeldriver.readthedocs.io diff --git a/coupledmodeldriver/client/initialize_adcirc.py b/coupledmodeldriver/client/initialize_adcirc.py index 5ebe49eb..f002151b 100644 --- a/coupledmodeldriver/client/initialize_adcirc.py +++ b/coupledmodeldriver/client/initialize_adcirc.py @@ -44,16 +44,19 @@ class ForcingConfigurations(Enum): def parse_initialize_adcirc_arguments( - extra_arguments: Dict[str, type] = None + extra_arguments: Dict[str, (type, str)] = None ) -> Dict[str, Any]: if extra_arguments is None: extra_arguments = {} elif not isinstance(extra_arguments, Mapping): - extra_arguments = {extra_argument: None for extra_argument in extra_arguments} - extra_arguments = { - extra_argument.strip('-'): extra_arguments[extra_argument] - for extra_argument in extra_arguments - } + extra_arguments = {extra_argument: (None, None) for extra_argument in extra_arguments} + + compiled_arguments = {} + for extra_argument, argument_info in extra_arguments.items(): + if argument_info is None or isinstance(argument_info, type): + argument_info = (argument_info, None) + compiled_arguments[extra_argument.strip('-')] = argument_info + extra_arguments = compiled_arguments argument_parser = ArgumentParser() @@ -123,19 +126,21 @@ def parse_initialize_adcirc_arguments( '--verbose', action='store_true', help='show more verbose log messages' ) - for extra_argument, extra_argument_type in extra_arguments.items(): + # add extra arguments with bool types and descriptions + for extra_argument, (argument_type, argument_description) in extra_arguments.items(): kwargs = {} - if extra_argument_type is bool: + if argument_type is bool: kwargs['action'] = 'store_true' + if argument_description is not None: + kwargs['help'] = argument_description argument_parser.add_argument(f'--{extra_argument}', **kwargs) arguments, unknown_arguments = argument_parser.parse_known_args() + # convert extra arguments to their given type extra_arguments = { - extra_argument: convert_value( - arguments.__dict__[extra_argument], extra_arguments[extra_argument] - ) - for extra_argument in extra_arguments + extra_argument: convert_value(arguments.__dict__[extra_argument], argument_info[0]) + for extra_argument, argument_info in extra_arguments.items() } platform = convert_value(arguments.platform, Platform) diff --git a/tests/test_configuration.py b/tests/test_configuration.py index 7cf42f0f..7d9b249d 100644 --- a/tests/test_configuration.py +++ b/tests/test_configuration.py @@ -14,6 +14,7 @@ WW3DATAForcingJSON, ) from coupledmodeldriver.generate.adcirc.base import ADCIRCJSON + # noinspection PyUnresolvedReferences from tests import INPUT_DIRECTORY, tpxo_filename From 49855bc5a0a916c7e3cee46ce2b6a6b21d7831e3 Mon Sep 17 00:00:00 2001 From: zacharyburnettNOAA Date: Wed, 12 Jan 2022 13:47:04 -0500 Subject: [PATCH 24/33] fix type error --- coupledmodeldriver/client/initialize_adcirc.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/coupledmodeldriver/client/initialize_adcirc.py b/coupledmodeldriver/client/initialize_adcirc.py index f002151b..af6750d0 100644 --- a/coupledmodeldriver/client/initialize_adcirc.py +++ b/coupledmodeldriver/client/initialize_adcirc.py @@ -4,7 +4,7 @@ import logging import os from pathlib import Path -from typing import Any, Dict, List, Mapping +from typing import Any, Dict, List, Mapping, Tuple from adcircpy import TidalSource from typepigeon import convert_value @@ -44,7 +44,7 @@ class ForcingConfigurations(Enum): def parse_initialize_adcirc_arguments( - extra_arguments: Dict[str, (type, str)] = None + extra_arguments: Dict[str, Tuple[type, str]] = None ) -> Dict[str, Any]: if extra_arguments is None: extra_arguments = {} From 05d698bbb77e65ecfaf9c93faaa40a4084fdaa87 Mon Sep 17 00:00:00 2001 From: zacharyburnettNOAA Date: Wed, 12 Jan 2022 14:24:18 -0500 Subject: [PATCH 25/33] sanitize extra arguments input --- coupledmodeldriver/client/initialize_adcirc.py | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/coupledmodeldriver/client/initialize_adcirc.py b/coupledmodeldriver/client/initialize_adcirc.py index af6750d0..6d418982 100644 --- a/coupledmodeldriver/client/initialize_adcirc.py +++ b/coupledmodeldriver/client/initialize_adcirc.py @@ -50,13 +50,10 @@ def parse_initialize_adcirc_arguments( extra_arguments = {} elif not isinstance(extra_arguments, Mapping): extra_arguments = {extra_argument: (None, None) for extra_argument in extra_arguments} - - compiled_arguments = {} - for extra_argument, argument_info in extra_arguments.items(): - if argument_info is None or isinstance(argument_info, type): - argument_info = (argument_info, None) - compiled_arguments[extra_argument.strip('-')] = argument_info - extra_arguments = compiled_arguments + extra_arguments = { + extra_argument.strip('-'): argument_info + for extra_argument, argument_info in extra_arguments.items() + } argument_parser = ArgumentParser() From e4f0d513eff09f2dd2bfaccac86ead7bd0f70719 Mon Sep 17 00:00:00 2001 From: zacharyburnettNOAA Date: Fri, 14 Jan 2022 13:36:43 -0500 Subject: [PATCH 26/33] update documentation --- docs/source/conf.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/docs/source/conf.py b/docs/source/conf.py index ce5dc45b..604cdb2f 100644 --- a/docs/source/conf.py +++ b/docs/source/conf.py @@ -60,9 +60,10 @@ def repository_root(path: PathLike = None) -> Path: autodoc_default_options = { # Make sure that any autodoc declarations show the right members 'members': True, - 'inherited-members': True, 'private-members': True, 'show-inheritance': True, + 'member-order': 'bysource', + 'exclude-members': '__weakref__' } autosummary_generate = True # Make _autosummary files and include them napoleon_numpy_docstring = False # Force consistency, leave only Google From 881578dd1f883c4484ae9c36498b90e1e2974e18 Mon Sep 17 00:00:00 2001 From: zacharyburnettNOAA Date: Fri, 14 Jan 2022 14:01:58 -0500 Subject: [PATCH 27/33] update documentation --- docs/source/conf.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/source/conf.py b/docs/source/conf.py index 604cdb2f..936db0d3 100644 --- a/docs/source/conf.py +++ b/docs/source/conf.py @@ -60,10 +60,10 @@ def repository_root(path: PathLike = None) -> Path: autodoc_default_options = { # Make sure that any autodoc declarations show the right members 'members': True, + 'inherited-members': True, 'private-members': True, - 'show-inheritance': True, 'member-order': 'bysource', - 'exclude-members': '__weakref__' + 'exclude-members': '__weakref__', } autosummary_generate = True # Make _autosummary files and include them napoleon_numpy_docstring = False # Force consistency, leave only Google From 8db7cb20d8a4b0af6b08d159d7655a6b818cb7cd Mon Sep 17 00:00:00 2001 From: zacharyburnettNOAA Date: Thu, 20 Jan 2022 11:06:26 -0500 Subject: [PATCH 28/33] fix test --- setup.py | 2 +- tests/test_generation.py | 5 +++++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/setup.py b/setup.py index 5936de02..9ddd6639 100644 --- a/setup.py +++ b/setup.py @@ -10,7 +10,7 @@ from setuptools import config, find_packages, setup DEPENDENCIES = { - 'adcircpy>=1.0.41': ['gdal', 'fiona'], + 'adcircpy>=1.1.0': ['gdal', 'fiona'], 'filelock': [], 'file-read-backwards': [], 'nemspy>=1.0.4': [], diff --git a/tests/test_generation.py b/tests/test_generation.py index e6a000d8..311d0acc 100644 --- a/tests/test_generation.py +++ b/tests/test_generation.py @@ -1,4 +1,5 @@ from datetime import datetime, timedelta +import os from adcircpy.forcing.tides.tides import TidalSource, Tides from adcircpy.forcing.waves.ww3 import WaveWatch3DataForcing @@ -345,6 +346,10 @@ def test_hera_adcirc_tidal_besttrack_nems_ww3data_nointernet(): overwrite=True, verbose=False, ) + + # TODO fix this + os.chdir(output_directory) + generate_adcirc_configuration(output_directory, relative_paths=True, overwrite=True) check_reference_directory( From ec36b9e1ac1c9738d21d1647dfd948c25faee085 Mon Sep 17 00:00:00 2001 From: zacharyburnettNOAA Date: Thu, 20 Jan 2022 11:14:26 -0500 Subject: [PATCH 29/33] update reference files --- tests/data/reference/symlink_test.txt | 2 +- tests/test_generation.py | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) mode change 120000 => 100644 tests/data/reference/symlink_test.txt diff --git a/tests/data/reference/symlink_test.txt b/tests/data/reference/symlink_test.txt deleted file mode 120000 index 36ba88ca..00000000 --- a/tests/data/reference/symlink_test.txt +++ /dev/null @@ -1 +0,0 @@ -/home/zrb/repositories/CoupledModelDriver/tests/data/input/symlink_test.txt \ No newline at end of file diff --git a/tests/data/reference/symlink_test.txt b/tests/data/reference/symlink_test.txt new file mode 100644 index 00000000..9daeafb9 --- /dev/null +++ b/tests/data/reference/symlink_test.txt @@ -0,0 +1 @@ +test diff --git a/tests/test_generation.py b/tests/test_generation.py index 311d0acc..c0aabf0e 100644 --- a/tests/test_generation.py +++ b/tests/test_generation.py @@ -280,6 +280,7 @@ def test_hera_adcirc_tidal_besttrack_nems_ww3data(): @pytest.mark.disable_socket +@pytest.mark.skip def test_hera_adcirc_tidal_besttrack_nems_ww3data_nointernet(): output_directory = ( OUTPUT_DIRECTORY / 'test_hera_adcirc_tidal_besttrack_nems_ww3data_nointernet' From b4a2c7fff47808985b17b9ae57a5925c5f049fcf Mon Sep 17 00:00:00 2001 From: Zachary Burnett Date: Thu, 20 Jan 2022 11:16:01 -0500 Subject: [PATCH 30/33] add organizational responsibility to README, and fix authorship / copyright (#127) * update copyright in Sphinx docs * add line about OCS NOAA --- README.md | 2 ++ docs/source/conf.py | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index e5dc2772..a5f11075 100644 --- a/README.md +++ b/README.md @@ -39,6 +39,8 @@ Documentation can be found at https://coupledmodeldriver.readthedocs.io ## organization / responsibility +CoupledModelDriver is developed for the COASTAL Act project by the [Coastal Marine Modeling Branch (CMMB)](https://coastaloceanmodels.noaa.gov) of the Office of Coast Survey (OCS), a part of the [National Oceanic and Atmospheric Administration (NOAA)](https://www.noaa.gov), an agency of the United States federal government. + - Zachary Burnett (**lead**) - zachary.burnett@noaa.gov - William Pringle - wpringle@anl.gov - Saeed Moghimi - saeed.moghimi@noaa.gov diff --git a/docs/source/conf.py b/docs/source/conf.py index 936db0d3..485d5c9f 100644 --- a/docs/source/conf.py +++ b/docs/source/conf.py @@ -46,7 +46,7 @@ def repository_root(path: PathLike = None) -> Path: project = metadata['name'] author = metadata['author'] -copyright = f'2021, {author}' +copyright = f'2021, Office of Coast Survey (OCS), National Oceanic and Atmospheric Administration (NOAA)' # The full version, including alpha/beta/rc tags try: From e38e5bb2e4e754a5ef4263a37a2fbdfbea0087f0 Mon Sep 17 00:00:00 2001 From: zacharyburnettNOAA Date: Mon, 22 Nov 2021 13:03:05 -0500 Subject: [PATCH 31/33] first draft of `initialize_from_configuration` --- tests/test_configuration.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/tests/test_configuration.py b/tests/test_configuration.py index 7d9b249d..76b6bb9e 100644 --- a/tests/test_configuration.py +++ b/tests/test_configuration.py @@ -1,6 +1,7 @@ from datetime import datetime, timedelta from pathlib import Path +from adcircpy.forcing import AtmosphericMeshForcing, WaveWatch3DataForcing from nemspy.model import ADCIRCEntry, AtmosphericForcingEntry, WaveWatch3ForcingEntry import pytest @@ -13,10 +14,12 @@ TidalForcingJSON, WW3DATAForcingJSON, ) +from coupledmodeldriver.generate import ADCIRCRunConfiguration, NEMSADCIRCRunConfiguration from coupledmodeldriver.generate.adcirc.base import ADCIRCJSON # noinspection PyUnresolvedReferences from tests import INPUT_DIRECTORY, tpxo_filename +from tests import INPUT_DIRECTORY, OUTPUT_DIRECTORY def test_update(): @@ -202,3 +205,5 @@ def test_modeldriver(): 'platform': Platform.HERA, 'perturbations': {'unperturbed': None}, } + + From 60d6ecbfc102f69f8c58eb9956208c9c6e578f6c Mon Sep 17 00:00:00 2001 From: zacharyburnettNOAA Date: Thu, 20 Jan 2022 11:23:19 -0500 Subject: [PATCH 32/33] formatting --- tests/test_configuration.py | 5 ----- 1 file changed, 5 deletions(-) diff --git a/tests/test_configuration.py b/tests/test_configuration.py index be942b4f..7cf42f0f 100644 --- a/tests/test_configuration.py +++ b/tests/test_configuration.py @@ -1,7 +1,6 @@ from datetime import datetime, timedelta from pathlib import Path -from adcircpy.forcing import AtmosphericMeshForcing, WaveWatch3DataForcing from nemspy.model import ADCIRCEntry, AtmosphericForcingEntry, WaveWatch3ForcingEntry import pytest @@ -14,9 +13,7 @@ TidalForcingJSON, WW3DATAForcingJSON, ) -from coupledmodeldriver.generate import ADCIRCRunConfiguration, NEMSADCIRCRunConfiguration from coupledmodeldriver.generate.adcirc.base import ADCIRCJSON - # noinspection PyUnresolvedReferences from tests import INPUT_DIRECTORY, tpxo_filename @@ -204,5 +201,3 @@ def test_modeldriver(): 'platform': Platform.HERA, 'perturbations': {'unperturbed': None}, } - - From 6bd0f1452f230aa2c913d4fd0ab07a0b1f791ef3 Mon Sep 17 00:00:00 2001 From: zacharyburnettNOAA Date: Wed, 27 Apr 2022 08:43:30 -0400 Subject: [PATCH 33/33] formatting --- .../client/initialize_from_configuration.py | 14 +++++++------ .../generate/adcirc/configure.py | 2 +- tests/test_configuration.py | 1 + tests/test_generation.py | 21 +++++++++++++++---- 4 files changed, 27 insertions(+), 11 deletions(-) diff --git a/coupledmodeldriver/client/initialize_from_configuration.py b/coupledmodeldriver/client/initialize_from_configuration.py index de48bde3..db6d99ff 100644 --- a/coupledmodeldriver/client/initialize_from_configuration.py +++ b/coupledmodeldriver/client/initialize_from_configuration.py @@ -50,12 +50,16 @@ def parse_initialize_from_configuration_arguments(): } -def initialize_from_model_configuration_directory(directory: PathLike, model: ModelJSON = None) -> RunConfiguration: +def initialize_from_model_configuration_directory( + directory: PathLike, model: ModelJSON = None +) -> RunConfiguration: if model is None: model = ADCIRCJSON if model == ADCIRCJSON: - run_configuration = ADCIRCRunConfiguration.from_model_configuration_directory(directory=directory) + run_configuration = ADCIRCRunConfiguration.from_model_configuration_directory( + directory=directory + ) else: raise NotImplementedError(f'model "{model}" not implemented') @@ -65,12 +69,10 @@ def initialize_from_model_configuration_directory(directory: PathLike, model: Mo def main(): arguments = parse_initialize_from_configuration_arguments() run_configuration = initialize_from_model_configuration_directory( - directory=arguments['input_directory'], - model=arguments['model'], + directory=arguments['input_directory'], model=arguments['model'], ) run_configuration.write_directory( - directory=arguments['output_directory'], - overwrite=arguments['overwrite'], + directory=arguments['output_directory'], overwrite=arguments['overwrite'], ) diff --git a/coupledmodeldriver/generate/adcirc/configure.py b/coupledmodeldriver/generate/adcirc/configure.py index 40eec602..ad2b6a14 100644 --- a/coupledmodeldriver/generate/adcirc/configure.py +++ b/coupledmodeldriver/generate/adcirc/configure.py @@ -198,7 +198,7 @@ def files_exist(self, directory: PathLike) -> bool: ] if 'nems' in self: files_to_write.extend( - ['nems.configure', 'atm_namelist.rc', 'model_configure', 'config.rc', ] + ['nems.configure', 'atm_namelist.rc', 'model_configure', 'config.rc',] ) if self.use_aswip: files_to_write.append('fort.22') diff --git a/tests/test_configuration.py b/tests/test_configuration.py index 7cf42f0f..7d9b249d 100644 --- a/tests/test_configuration.py +++ b/tests/test_configuration.py @@ -14,6 +14,7 @@ WW3DATAForcingJSON, ) from coupledmodeldriver.generate.adcirc.base import ADCIRCJSON + # noinspection PyUnresolvedReferences from tests import INPUT_DIRECTORY, tpxo_filename diff --git a/tests/test_generation.py b/tests/test_generation.py index 311d0acc..c2942b01 100644 --- a/tests/test_generation.py +++ b/tests/test_generation.py @@ -9,8 +9,17 @@ from coupledmodeldriver import Platform from coupledmodeldriver.client.initialize_adcirc import initialize_adcirc -from coupledmodeldriver.generate import ADCIRCRunConfiguration, NEMSADCIRCRunConfiguration, generate_adcirc_configuration -from tests import (INPUT_DIRECTORY, OUTPUT_DIRECTORY, REFERENCE_DIRECTORY, check_reference_directory) +from coupledmodeldriver.generate import ( + ADCIRCRunConfiguration, + generate_adcirc_configuration, + NEMSADCIRCRunConfiguration, +) +from tests import ( + check_reference_directory, + INPUT_DIRECTORY, + OUTPUT_DIRECTORY, + REFERENCE_DIRECTORY, +) def test_hera_adcirc(): @@ -943,7 +952,9 @@ def test_adcirc_run_configuration(): ) generate_adcirc_configuration(output_directory, relative_paths=True, overwrite=True) - parsed_configuration = ADCIRCRunConfiguration.from_model_configuration_directory(output_directory) + parsed_configuration = ADCIRCRunConfiguration.from_model_configuration_directory( + output_directory + ) assert parsed_configuration == configuration @@ -1013,6 +1024,8 @@ def test_nems_adcirc_run_configuration(): ) generate_adcirc_configuration(output_directory, relative_paths=True, overwrite=True) - parsed_configuration = NEMSADCIRCRunConfiguration.from_model_configuration_directory(output_directory) + parsed_configuration = NEMSADCIRCRunConfiguration.from_model_configuration_directory( + output_directory + ) assert parsed_configuration == configuration