Skip to content

Commit

Permalink
hotfix: Change add_elev_ic offset value
Browse files Browse the repository at this point in the history
  • Loading branch information
jreniel committed Mar 24, 2021
1 parent c0f3994 commit 79bbfd4
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions pyschism/driver/driver.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,14 +30,14 @@ def __init__(self, path: Union[str, os.PathLike], iteration=None):
["combine_hotstart7", '-i', f'{iteration}'], cwd=path)
self.path = path / f"hotstart_it={iteration}.nc"

def add_elev_ic(self, hgrid):
def add_elev_ic(self, hgrid, offset=-0.1):
nc = Dataset(self.path, 'r+')
mask = np.logical_and(
hgrid.values > 0.,
nc['eta2'][:] < hgrid.values
)
idxs = np.where(mask)
nc['eta2'][idxs] = hgrid.values[idxs] - 0.01
nc['eta2'][idxs] = hgrid.values[idxs] + offset
nc.close()


Expand Down

0 comments on commit 79bbfd4

Please sign in to comment.