Skip to content

Commit

Permalink
Black
Browse files Browse the repository at this point in the history
  • Loading branch information
manishvenu committed Dec 30, 2024
1 parent f3973c5 commit b5b3e38
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions regional_mom6/regridding.py
Original file line number Diff line number Diff line change
Expand Up @@ -458,7 +458,7 @@ def get_boundary_mask(
minimum_depth=0,
x_dim_name="lonh",
y_dim_name="lath",
add_land_exceptions = True
add_land_exceptions=True,
) -> np.ndarray:
"""
Mask out the boundary conditions based on the bathymetry. We don't want to have boundary conditions on land.
Expand Down Expand Up @@ -548,10 +548,10 @@ def get_boundary_mask(
boundary_mask[(i * 2)] = land

if add_land_exceptions:
# Land points that can't be NaNs: Corners & 3 points at the coast
# Land points that can't be NaNs: Corners & 3 points at the coast

# Looks like in the boundary between land and ocean - in NWA for example - we basically need to remove 3 points closest to ocean as a buffer.
# Search for intersections
# Looks like in the boundary between land and ocean - in NWA for example - we basically need to remove 3 points closest to ocean as a buffer.
# Search for intersections
coasts_lower_index = []
coasts_higher_index = []
for index in range(1, len(boundary_mask) - 1):
Expand Down Expand Up @@ -589,7 +589,7 @@ def mask_dataset(
segment_name: str,
y_dim_name="lath",
x_dim_name="lonh",
add_land_exceptions = True
add_land_exceptions=True,
) -> xr.Dataset:
"""
This function masks the dataset to the provided bathymetry. If bathymetry is not provided, it fills all NaNs with 0.
Expand Down Expand Up @@ -621,7 +621,7 @@ def mask_dataset(
minimum_depth=0,
x_dim_name=x_dim_name,
y_dim_name=y_dim_name,
add_land_exceptions = add_land_exceptions
add_land_exceptions=add_land_exceptions,
)
if orientation in ["east", "west"]:
mask = mask[:, np.newaxis]
Expand Down

0 comments on commit b5b3e38

Please sign in to comment.