Skip to content

Commit

Permalink
Bugfix
Browse files Browse the repository at this point in the history
  • Loading branch information
jmcvey3 committed Dec 7, 2022
1 parent a716476 commit 645c1a6
Show file tree
Hide file tree
Showing 9 changed files with 11 additions and 11 deletions.
2 changes: 1 addition & 1 deletion dolfyn/tests/data/RDI_7f79.nc
Git LFS file not shown
2 changes: 1 addition & 1 deletion dolfyn/tests/data/RDI_test01.nc
Git LFS file not shown
2 changes: 1 addition & 1 deletion dolfyn/tests/data/RDI_withBT.nc
Git LFS file not shown
2 changes: 1 addition & 1 deletion dolfyn/tests/data/RiverPro_test01.nc
Git LFS file not shown
2 changes: 1 addition & 1 deletion dolfyn/tests/data/vmdas01.nc
Git LFS file not shown
2 changes: 1 addition & 1 deletion dolfyn/tests/data/winriver01.nc
Git LFS file not shown
2 changes: 1 addition & 1 deletion dolfyn/tests/data/winriver02.nc
Git LFS file not shown
2 changes: 1 addition & 1 deletion dolfyn/tests/data/winriver02_transect.nc
Git LFS file not shown
6 changes: 3 additions & 3 deletions dolfyn/velocity.py
Original file line number Diff line number Diff line change
Expand Up @@ -916,7 +916,7 @@ def calc_tke(self, veldat, noise=[0, 0, 0], detrend=True):
else:
vel = self.demean(vel)

if 'b5' in veldat.name:
if 'time_b5' in veldat.dims:
time = self.mean(veldat.time_b5.values)
else:
time = self.mean(veldat.time.values)
Expand All @@ -938,7 +938,7 @@ def calc_tke(self, veldat, noise=[0, 0, 0], detrend=True):
da = da.assign_coords({'tke': ["upup_", "vpvp_", "wpwp_"],
'time': time})
else:
if 'b5' in veldat.name:
if 'time_b5' in veldat.dims:
da = da.assign_coords({'time_b5': time})
else:
da = da.assign_coords({'time': time})
Expand Down Expand Up @@ -986,7 +986,7 @@ def calc_psd(self, veldat,
The spectra in the 'u', 'v', and 'w' directions.
"""

if 'b5' in veldat.name:
if 'time_b5' in veldat.dims:
time = self.mean(veldat.time_b5.values)
time_str = 'time_b5'
else:
Expand Down

0 comments on commit 645c1a6

Please sign in to comment.