Skip to content

Commit

Permalink
bug fix for profiles reading in up-direction
Browse files Browse the repository at this point in the history
  • Loading branch information
giumas committed Nov 5, 2018
1 parent 22b21c3 commit 3a0d9e7
Show file tree
Hide file tree
Showing 5 changed files with 15 additions and 4 deletions.
2 changes: 1 addition & 1 deletion hyo/soundspeed/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
log = logging.getLogger(__name__)
log.addHandler(logging.NullHandler())

__version__ = '2018.1.47'
__version__ = '2018.1.48'
__doc__ = "Sound Speed"
__author__ = '[email protected]; [email protected]; [email protected]; ' \
'[email protected]'
Expand Down
11 changes: 11 additions & 0 deletions hyo/soundspeed/profile/profile.py
Original file line number Diff line number Diff line change
Expand Up @@ -575,6 +575,17 @@ def reduce_up_down(self, ssp_direction, use_pressure=False):
max_reached = True
last_value = value

if ssp_direction == Dicts.ssp_directions['up']:
logger.debug("flipping data for up direction")
self.data.pressure[:] = np.flipud(self.data.pressure)
self.data.depth[:] = np.flipud(self.data.depth)
self.data.speed[:] = np.flipud(self.data.speed)
self.data.temp[:] = np.flipud(self.data.temp)
self.data.conductivity[:] = np.flipud(self.data.conductivity)
self.data.sal[:] = np.flipud(self.data.sal)
self.data.source[:] = np.flipud(self.data.source)
self.data.flag[:] = np.flipud(self.data.flag)

def calc_salinity_from_conductivity(self):
if np.count_nonzero(self.data.pressure):
pressure = self.data.pressure
Expand Down
2 changes: 1 addition & 1 deletion hyo/soundspeedmanager/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
logger = logging.getLogger(__name__)
logger.addHandler(logging.NullHandler())

__version__ = '2018.1.47'
__version__ = '2018.1.48'
__doc__ = "Sound Speed Manager"
__author__ = '[email protected]; [email protected]; [email protected]; ' \
'[email protected]'
Expand Down
2 changes: 1 addition & 1 deletion hyo/soundspeedsettings/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
logger = logging.getLogger(__name__)
logger.addHandler(logging.NullHandler())

__version__ = '2018.1.47'
__version__ = '2018.1.48'
__doc__ = "Sound Speed Settings"
__author__ = '[email protected]; [email protected]; [email protected]; ' \
'[email protected]'
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ def txt_read(*paths):
setup_args = dict()

setup_args['name'] = 'hyo.soundspeed'
setup_args['version'] = '2018.1.47'
setup_args['version'] = '2018.1.48'
setup_args['url'] = 'https://bitbucket.org/ccomjhc/hyo_soundspeed/'
setup_args['license'] = 'LGPLv2.1 or CCOM-UNH Industrial Associate license'
setup_args['author'] = 'Giuseppe Masetti(UNH,CCOM); Barry Gallagher(NOAA,OCS); ' \
Expand Down

0 comments on commit 3a0d9e7

Please sign in to comment.