Skip to content

Commit

Permalink
Fixed path issue when specifying tpxo inputs using environment variab…
Browse files Browse the repository at this point in the history
…les. Fixes schism-dev#118
  • Loading branch information
tomdurrant committed Jan 22, 2024
1 parent ac3bcfc commit d7a5bdd
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions pyschism/forcing/bctides/tpxo.py
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ def lat_v(self) -> np.ndarray:
def h(self):
if not hasattr(self, '_h'):
if self._h_file is None:
self._h_file = os.getenv('TPXO_ELEVATION')
self._h_file = pathlib.Path(os.getenv('TPXO_ELEVATION'))
if self._h_file is None:
self._h_file = pathlib.Path(
appdirs.user_data_dir('tpxo')) / TPXO_ELEVATION
Expand All @@ -110,7 +110,7 @@ def h(self):
def uv(self):
if not hasattr(self, '_uv'):
if self._u_file is None:
self._u_file = os.getenv('TPXO_VELOCITY')
self._u_file = pathlib.Path(os.getenv('TPXO_VELOCITY'))
if self._u_file is None:
self._u_file = pathlib.Path(
appdirs.user_data_dir('tpxo')) / TPXO_VELOCITY
Expand Down

0 comments on commit d7a5bdd

Please sign in to comment.