Skip to content

Commit

Permalink
Merge pull request #68 from noaa-ocs-modeling/develop
Browse files Browse the repository at this point in the history
overwrite NEMS entries in `configure_nems.json` with configuration from their respective JSON files
  • Loading branch information
zacharyburnett committed Apr 8, 2021
2 parents 5ba9c3a + 3a10ca9 commit b6cd89d
Show file tree
Hide file tree
Showing 51 changed files with 263 additions and 232 deletions.
13 changes: 9 additions & 4 deletions coupledmodeldriver/generate/adcirc/configure.py
Original file line number Diff line number Diff line change
Expand Up @@ -307,16 +307,21 @@ def read_directory(cls, directory: PathLike) -> 'NEMSADCIRCRunConfiguration':
else:
raise FileNotFoundError(f'missing required configuration file "{filename}"')

driver, nems, slurm, adcirc = configurations

forcings = []
for configuration_class in cls.forcings:
filename = directory / configuration_class.default_filename
if filename.exists():
forcings.append(configuration_class.from_file(filename))

nems['models'] = [entry.nemspy_entry for entry in (adcirc, *forcings)
if isinstance(entry, NEMSCapJSON)]

return cls.from_configurations(
driver=configurations[0],
nems=configurations[1],
slurm=configurations[2],
adcirc=configurations[3],
driver=driver,
nems=nems,
slurm=slurm,
adcirc=adcirc,
forcings=forcings,
)
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@
packages=find_packages(),
python_requires='>=3.6',
setup_requires=['dunamai', 'setuptools>=41.2'],
install_requires=['adcircpy>=1.0.28', 'nemspy>=0.6.13', 'numpy', 'requests'],
install_requires=['adcircpy>=1.0.29', 'nemspy>=0.6.13', 'numpy', 'requests'],
extras_require={
'testing': ['flake8', 'pytest', 'pytest-cov', 'wget'],
'development': ['oitnb'],
Expand Down
30 changes: 15 additions & 15 deletions tests/data/reference/adcirc/hera_shinnecock_ike/coldstart/fort.15
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
created on 2021-04-07 17:49 ! RUNDES
created on 2021-04-08 11:21 ! RUNDES
Shinacock Inlet Coarse Grid ! RUNID
1 ! NFOVER
1 ! NABOUT
Expand Down Expand Up @@ -31,38 +31,38 @@ primitive_weighting_in_continuity_equation
0 ! CORI
8 ! NTIF
Q1
0.019256 6.49585E-05 0.695 1.14647 45.2841
0.019256 6.49585E-05 0.695 1.1459 103.157
O1
0.100514 6.75977E-05 0.695 1.14647 51.0784
0.100514 6.75977E-05 0.695 1.1459 272.96
P1
0.046843 7.25229E-05 0.706 1 322.487
0.046843 7.25229E-05 0.706 1 131.152
K1
0.141565 7.29212E-05 0.736 1.09047 42.801
0.141565 7.29212E-05 0.736 1.09012 234.173
N2
0.046398 0.00013788 0.693 0.972523 90.2443
0.046398 0.00013788 0.693 0.972665 339.505
M2
0.242334 0.000140519 0.693 0.972523 96.0386
0.242334 0.000140519 0.693 0.972665 149.308
S2
0.112841 0.000145444 0.693 1 0
K2
0.030704 0.000145842 0.693 1.23912 266.15
0.030704 0.000145842 0.693 1.23794 288.895
8
Q1
6.49585E-05 1.14647 45.2841
6.49585E-05 1.1459 103.157
O1
6.75977E-05 1.14647 51.0784
6.75977E-05 1.1459 272.96
P1
7.25229E-05 1 322.487
7.25229E-05 1 131.152
K1
7.29212E-05 1.09047 42.801
7.29212E-05 1.09012 234.173
N2
0.00013788 0.972523 90.2443
0.00013788 0.972665 339.505
M2
0.000140519 0.972523 96.0386
0.000140519 0.972665 149.308
S2
0.000145444 1 0
K2
0.000145842 1.23912 266.15
0.000145842 1.23794 288.895
Q1
1.13893401e-02 1.83698935e+02
1.21085823e-02 1.73352953e+02
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
created on 2021-04-07 17:50 ! RUNDES
created on 2021-04-08 11:21 ! RUNDES
Shinacock Inlet Coarse Grid ! RUNID
1 ! NFOVER
1 ! NABOUT
Expand Down Expand Up @@ -31,38 +31,38 @@ primitive_weighting_in_continuity_equation
0 ! CORI
8 ! NTIF
Q1
0.019256 6.49585E-05 0.695 1.14647 45.2841
0.019256 6.49585E-05 0.695 1.1459 103.157
O1
0.100514 6.75977E-05 0.695 1.14647 51.0784
0.100514 6.75977E-05 0.695 1.1459 272.96
P1
0.046843 7.25229E-05 0.706 1 322.487
0.046843 7.25229E-05 0.706 1 131.152
K1
0.141565 7.29212E-05 0.736 1.09047 42.801
0.141565 7.29212E-05 0.736 1.09012 234.173
N2
0.046398 0.00013788 0.693 0.972523 90.2443
0.046398 0.00013788 0.693 0.972665 339.505
M2
0.242334 0.000140519 0.693 0.972523 96.0386
0.242334 0.000140519 0.693 0.972665 149.308
S2
0.112841 0.000145444 0.693 1 0
K2
0.030704 0.000145842 0.693 1.23912 266.15
0.030704 0.000145842 0.693 1.23794 288.895
8
Q1
6.49585E-05 1.14647 45.2841
6.49585E-05 1.1459 103.157
O1
6.75977E-05 1.14647 51.0784
6.75977E-05 1.1459 272.96
P1
7.25229E-05 1 322.487
7.25229E-05 1 131.152
K1
7.29212E-05 1.09047 42.801
7.29212E-05 1.09012 234.173
N2
0.00013788 0.972523 90.2443
0.00013788 0.972665 339.505
M2
0.000140519 0.972523 96.0386
0.000140519 0.972665 149.308
S2
0.000145444 1 0
K2
0.000145842 1.23912 266.15
0.000145842 1.23794 288.895
Q1
1.13893401e-02 1.83698935e+02
1.21085823e-02 1.73352953e+02
Expand Down
30 changes: 15 additions & 15 deletions tests/data/reference/adcirc/local_shinnecock_ike/coldstart/fort.15
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
created on 2021-04-07 17:49 ! RUNDES
created on 2021-04-08 11:21 ! RUNDES
Shinacock Inlet Coarse Grid ! RUNID
1 ! NFOVER
1 ! NABOUT
Expand Down Expand Up @@ -31,38 +31,38 @@ primitive_weighting_in_continuity_equation
0 ! CORI
8 ! NTIF
Q1
0.019256 6.49585E-05 0.695 1.14647 45.2841
0.019256 6.49585E-05 0.695 1.1459 103.157
O1
0.100514 6.75977E-05 0.695 1.14647 51.0784
0.100514 6.75977E-05 0.695 1.1459 272.96
P1
0.046843 7.25229E-05 0.706 1 322.487
0.046843 7.25229E-05 0.706 1 131.152
K1
0.141565 7.29212E-05 0.736 1.09047 42.801
0.141565 7.29212E-05 0.736 1.09012 234.173
N2
0.046398 0.00013788 0.693 0.972523 90.2443
0.046398 0.00013788 0.693 0.972665 339.505
M2
0.242334 0.000140519 0.693 0.972523 96.0386
0.242334 0.000140519 0.693 0.972665 149.308
S2
0.112841 0.000145444 0.693 1 0
K2
0.030704 0.000145842 0.693 1.23912 266.15
0.030704 0.000145842 0.693 1.23794 288.895
8
Q1
6.49585E-05 1.14647 45.2841
6.49585E-05 1.1459 103.157
O1
6.75977E-05 1.14647 51.0784
6.75977E-05 1.1459 272.96
P1
7.25229E-05 1 322.487
7.25229E-05 1 131.152
K1
7.29212E-05 1.09047 42.801
7.29212E-05 1.09012 234.173
N2
0.00013788 0.972523 90.2443
0.00013788 0.972665 339.505
M2
0.000140519 0.972523 96.0386
0.000140519 0.972665 149.308
S2
0.000145444 1 0
K2
0.000145842 1.23912 266.15
0.000145842 1.23794 288.895
Q1
1.13893401e-02 1.83698935e+02
1.21085823e-02 1.73352953e+02
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
created on 2021-04-07 17:49 ! RUNDES
created on 2021-04-08 11:21 ! RUNDES
Shinacock Inlet Coarse Grid ! RUNID
1 ! NFOVER
1 ! NABOUT
Expand Down Expand Up @@ -31,38 +31,38 @@ primitive_weighting_in_continuity_equation
0 ! CORI
8 ! NTIF
Q1
0.019256 6.49585E-05 0.695 1.14647 45.2841
0.019256 6.49585E-05 0.695 1.1459 103.157
O1
0.100514 6.75977E-05 0.695 1.14647 51.0784
0.100514 6.75977E-05 0.695 1.1459 272.96
P1
0.046843 7.25229E-05 0.706 1 322.487
0.046843 7.25229E-05 0.706 1 131.152
K1
0.141565 7.29212E-05 0.736 1.09047 42.801
0.141565 7.29212E-05 0.736 1.09012 234.173
N2
0.046398 0.00013788 0.693 0.972523 90.2443
0.046398 0.00013788 0.693 0.972665 339.505
M2
0.242334 0.000140519 0.693 0.972523 96.0386
0.242334 0.000140519 0.693 0.972665 149.308
S2
0.112841 0.000145444 0.693 1 0
K2
0.030704 0.000145842 0.693 1.23912 266.15
0.030704 0.000145842 0.693 1.23794 288.895
8
Q1
6.49585E-05 1.14647 45.2841
6.49585E-05 1.1459 103.157
O1
6.75977E-05 1.14647 51.0784
6.75977E-05 1.1459 272.96
P1
7.25229E-05 1 322.487
7.25229E-05 1 131.152
K1
7.29212E-05 1.09047 42.801
7.29212E-05 1.09012 234.173
N2
0.00013788 0.972523 90.2443
0.00013788 0.972665 339.505
M2
0.000140519 0.972523 96.0386
0.000140519 0.972665 149.308
S2
0.000145444 1 0
K2
0.000145842 1.23912 266.15
0.000145842 1.23794 288.895
Q1
1.13893401e-02 1.83698935e+02
1.21085823e-02 1.73352953e+02
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
created on 2021-04-07 17:50 ! RUNDES
created on 2021-04-08 11:21 ! RUNDES
Shinacock Inlet Coarse Grid ! RUNID
1 ! NFOVER
1 ! NABOUT
Expand Down Expand Up @@ -31,38 +31,38 @@ primitive_weighting_in_continuity_equation
0 ! CORI
8 ! NTIF
Q1
0.019256 6.49585E-05 0.695 1.14647 45.2841
0.019256 6.49585E-05 0.695 1.1459 103.157
O1
0.100514 6.75977E-05 0.695 1.14647 51.0784
0.100514 6.75977E-05 0.695 1.1459 272.96
P1
0.046843 7.25229E-05 0.706 1 322.487
0.046843 7.25229E-05 0.706 1 131.152
K1
0.141565 7.29212E-05 0.736 1.09047 42.801
0.141565 7.29212E-05 0.736 1.09012 234.173
N2
0.046398 0.00013788 0.693 0.972523 90.2443
0.046398 0.00013788 0.693 0.972665 339.505
M2
0.242334 0.000140519 0.693 0.972523 96.0386
0.242334 0.000140519 0.693 0.972665 149.308
S2
0.112841 0.000145444 0.693 1 0
K2
0.030704 0.000145842 0.693 1.23912 266.15
0.030704 0.000145842 0.693 1.23794 288.895
8
Q1
6.49585E-05 1.14647 45.2841
6.49585E-05 1.1459 103.157
O1
6.75977E-05 1.14647 51.0784
6.75977E-05 1.1459 272.96
P1
7.25229E-05 1 322.487
7.25229E-05 1 131.152
K1
7.29212E-05 1.09047 42.801
7.29212E-05 1.09012 234.173
N2
0.00013788 0.972523 90.2443
0.00013788 0.972665 339.505
M2
0.000140519 0.972523 96.0386
0.000140519 0.972665 149.308
S2
0.000145444 1 0
K2
0.000145842 1.23912 266.15
0.000145842 1.23794 288.895
Q1
1.13893401e-02 1.83698935e+02
1.21085823e-02 1.73352953e+02
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
created on 2021-04-07 17:50 ! RUNDES
created on 2021-04-08 11:21 ! RUNDES
Shinacock Inlet Coarse Grid ! RUNID
1 ! NFOVER
1 ! NABOUT
Expand Down Expand Up @@ -31,38 +31,38 @@ primitive_weighting_in_continuity_equation
0 ! CORI
8 ! NTIF
Q1
0.019256 6.49585E-05 0.695 1.14647 45.2841
0.019256 6.49585E-05 0.695 1.1459 103.157
O1
0.100514 6.75977E-05 0.695 1.14647 51.0784
0.100514 6.75977E-05 0.695 1.1459 272.96
P1
0.046843 7.25229E-05 0.706 1 322.487
0.046843 7.25229E-05 0.706 1 131.152
K1
0.141565 7.29212E-05 0.736 1.09047 42.801
0.141565 7.29212E-05 0.736 1.09012 234.173
N2
0.046398 0.00013788 0.693 0.972523 90.2443
0.046398 0.00013788 0.693 0.972665 339.505
M2
0.242334 0.000140519 0.693 0.972523 96.0386
0.242334 0.000140519 0.693 0.972665 149.308
S2
0.112841 0.000145444 0.693 1 0
K2
0.030704 0.000145842 0.693 1.23912 266.15
0.030704 0.000145842 0.693 1.23794 288.895
8
Q1
6.49585E-05 1.14647 45.2841
6.49585E-05 1.1459 103.157
O1
6.75977E-05 1.14647 51.0784
6.75977E-05 1.1459 272.96
P1
7.25229E-05 1 322.487
7.25229E-05 1 131.152
K1
7.29212E-05 1.09047 42.801
7.29212E-05 1.09012 234.173
N2
0.00013788 0.972523 90.2443
0.00013788 0.972665 339.505
M2
0.000140519 0.972523 96.0386
0.000140519 0.972665 149.308
S2
0.000145444 1 0
K2
0.000145842 1.23912 266.15
0.000145842 1.23794 288.895
Q1
1.13893401e-02 1.83698935e+02
1.21085823e-02 1.73352953e+02
Expand Down
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
# `config.rc` generated with NEMSpy 1.2.6.post15.dev0+79ef4e6
# `config.rc` generated with NEMSpy 1.2.8.post5.dev0+434c79d

Loading

0 comments on commit b6cd89d

Please sign in to comment.