Skip to content

Commit 767b73c

Browse files
committed
Add unit conversion to SchismDataReferenceReader
1 parent 89ddeb5 commit 767b73c

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

schismviz/schismui.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,8 @@ def load(self, **attributes) -> pd.DataFrame:
5757
except KeyError as e:
5858
logger.warning(str(e).strip("'\""))
5959
raise
60+
if self._manager.convert_units:
61+
df, unit = schismstudy.convert_to_SI(df, unit)
6062
df = df[slice(df.first_valid_index(), df.last_valid_index())]
6163
df.attrs["unit"] = unit
6264
df.attrs["ptype"] = "INST-VAL"

0 commit comments

Comments
 (0)