Skip to content

Commit

Permalink
Officially change boundary function names to verb names
Browse files Browse the repository at this point in the history
  • Loading branch information
manishvenu committed Sep 25, 2024
1 parent 3d5c61c commit eabbc8c
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 33 deletions.
2 changes: 1 addition & 1 deletion demos/reanalysis-forced.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -301,7 +301,7 @@
" ) \n",
"\n",
"# Set up the four boundary conditions. Remember that in the glorys_path, we have four boundary files names north_unprocessed.nc etc. \n",
"expt.rectangular_boundaries(\n",
"expt.setup_ocean_state_rectangular_boundaries(\n",
" glorys_path,\n",
" ocean_varnames,\n",
" boundaries = [\"south\", \"north\", \"west\", \"east\"],\n",
Expand Down
31 changes: 0 additions & 31 deletions regional_mom6/regional_mom6.py
Original file line number Diff line number Diff line change
Expand Up @@ -1053,25 +1053,6 @@ def get_glorys_rectangular(
)
return

def rectangular_boundaries(
self,
raw_boundaries_path,
varnames,
boundaries=["south", "north", "west", "east"],
arakawa_grid="A",
):
warnings.filterwarnings("default") # Set warnings back to on
warnings.warn(
'The rectangular_boundaries function has been changed in favor of a verb format, more description, and to accomodate tides. Drop-in replace with "setup_ocean_state_rectangular_boundaries"'
)
warnings.filterwarnings("ignore") # Set warnings back off
return self.setup_ocean_state_rectangular_boundaries(
raw_boundaries_path,
varnames,
boundaries=boundaries,
arakawa_grid=arakawa_grid,
)

def setup_ocean_state_rectangular_boundaries(
self,
raw_boundaries_path,
Expand Down Expand Up @@ -1124,18 +1105,6 @@ def setup_ocean_state_rectangular_boundaries(
arakawa_grid=arakawa_grid,
)

def simple_boundary(
self, path_to_bc, varnames, orientation, segment_number, arakawa_grid="A"
):
warnings.filterwarnings("default") # Set warnings back to on
warnings.warn(
'The simple_boundary function has been changed in favor of a verb format, more description, and to accomodate tides. Drop-in replace with "setup_ocean_state_simple_boundary"'
)
warnings.filterwarnings("ignore") # Turn warnings off
return self.setup_ocean_state_simple_boundary(
path_to_bc, varnames, orientation, segment_number, arakawa_grid="A"
)

def setup_ocean_state_simple_boundary(
self, path_to_bc, varnames, orientation, segment_number, arakawa_grid="A"
):
Expand Down
2 changes: 1 addition & 1 deletion tests/test_expt_class.py
Original file line number Diff line number Diff line change
Expand Up @@ -470,4 +470,4 @@ def test_rectangular_boundaries(
"tracers": {"temp": "temp", "salt": "salt"},
}

expt.rectangular_boundaries(tmp_path, varnames, ["east"])
expt.setup_ocean_state_rectangular_boundaries(tmp_path, varnames, ["east"])

0 comments on commit eabbc8c

Please sign in to comment.