Skip to content

Commit 207a77b

Browse files
committed
Tides keyword fixing
tidals to tides
1 parent 2f2739c commit 207a77b

1 file changed

Lines changed: 25 additions & 25 deletions

File tree

schimpy/bctide.py

Lines changed: 25 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -97,14 +97,14 @@ def __init__(self, hgrid,bc_yaml=None,boundary_segments=None):
9797

9898
main_id = "bctides"
9999
self.date = bc_yaml[main_id]["date"]
100-
if "earth_tidals" in bc_yaml[main_id].keys():
101-
self.earth_tidals = bc_yaml[main_id]["earth_tidals"]
100+
if "earth_tides" in bc_yaml[main_id].keys():
101+
self.earth_tides = bc_yaml[main_id]["earth_tides"]
102102
else:
103-
self.earth_tidals = None
103+
self.earth_tides = None
104104
if "bounary_forcing_tidals" in bc_yaml[main_id].keys():
105-
self.boundary_tidals = bc_yaml[main_id]["bounary_forcing_tidals"]
105+
self.boundary_tides = bc_yaml[main_id]["bounary_forcing_tidals"]
106106
else:
107-
self.boundary_tidals = None
107+
self.boundary_tides = None
108108

109109
self.open_boundaries = bc_yaml[main_id]["open_boundaries"]
110110
self.hgrid = hgrid
@@ -390,32 +390,32 @@ def write_bctides(self, bctides_file):
390390
# expect a list of dicts with explicit keys.
391391

392392

393-
if self.earth_tidals and "tidal_constituents" in self.earth_tidals:
394-
self.earth_tidals["tidal_constituents"] = _norm_earth(
395-
self.earth_tidals["tidal_constituents"]
393+
if self.earth_tides and "tidal_constituents" in self.earth_tides:
394+
self.earth_tides["tidal_constituents"] = self._norm_earth(
395+
self.earth_tides["tidal_constituents"]
396396
)
397-
if self.boundary_tidals and "tidal_constituents" in self.boundary_tidals:
398-
self.boundary_tidals["tidal_constituents"] = _norm_boundary(
399-
self.boundary_tidals["tidal_constituents"]
397+
if self.boundary_tides and "tidal_constituents" in self.boundary_tides:
398+
self.boundary_tides["tidal_constituents"] = self._norm_boundary(
399+
self.boundary_tides["tidal_constituents"]
400400
)
401401
##out earth tidal potential if any
402-
if self.earth_tidals:
403-
num_tidal = len(self.earth_tidals["tidal_constituents"])
404-
cutoff_depth = self.earth_tidals["tidal_cutoff_depth"]
402+
if self.earth_tides:
403+
num_tidal = len(self.earth_tides["tidal_constituents"])
404+
cutoff_depth = self.earth_tides["tidal_cutoff_depth"]
405405
outf.write(str(num_tidal) + " " + str(cutoff_depth) + "\n")
406406
for i in range(num_tidal):
407407
outf.write(
408-
self.earth_tidals["tidal_constituents"][i]["name"]
408+
self.earth_tides["tidal_constituents"][i]["name"]
409409
)
410410
outf.write("\n")
411-
amp = self.earth_tidals["tidal_constituents"][i]["amplitude"]
412-
node_factor = self.earth_tidals["tidal_constituents"][i][
411+
amp = self.earth_tides["tidal_constituents"][i]["amplitude"]
412+
node_factor = self.earth_tides["tidal_constituents"][i][
413413
"node_factor"
414414
]
415-
freq = self.earth_tidals["tidal_constituents"][i][
415+
freq = self.earth_tides["tidal_constituents"][i][
416416
"angular_frequency"
417417
]
418-
eqa = self.earth_tidals["tidal_constituents"][i][
418+
eqa = self.earth_tides["tidal_constituents"][i][
419419
"earth_equilibrium_argument"
420420
]
421421
outf.write(
@@ -434,21 +434,21 @@ def write_bctides(self, bctides_file):
434434
outf.write(str(num_tidal) + " " + str(cutoff_depth) + "\n")
435435

436436
## out boundary forcing tidal
437-
if self.boundary_tidals:
438-
num_tidal = len(self.boundary_tidals["tidal_constituents"])
437+
if self.boundary_tides:
438+
num_tidal = len(self.boundary_tides["tidal_constituents"])
439439
outf.write(str(num_tidal) + "\n")
440440
for i in range(num_tidal):
441441
outf.write(
442-
self.boundary_tidals["tidal_constituents"][i]["name"]
442+
self.boundary_tides["tidal_constituents"][i]["name"]
443443
)
444444
outf.write("\n")
445-
freq = self.boundary_tidals["tidal_constituents"][i][
445+
freq = self.boundary_tides["tidal_constituents"][i][
446446
"angular_frequency"
447447
]
448-
node_factor = self.boundary_tidals["tidal_constituents"][i][
448+
node_factor = self.boundary_tides["tidal_constituents"][i][
449449
"node_factor"
450450
]
451-
eqa = self.boundary_tidals["tidal_constituents"][i][
451+
eqa = self.boundary_tides["tidal_constituents"][i][
452452
"earth_equilibrium_argument"
453453
]
454454
outf.write(str(freq) + " " + str(node_factor) + " " + str(eqa))

0 commit comments

Comments
 (0)