Skip to content

Commit

Permalink
improved exception error to also hint to the cast direction setup
Browse files Browse the repository at this point in the history
  • Loading branch information
giumas committed Oct 20, 2024
1 parent aff9293 commit 640f559
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion hyo2/ssm2/lib/profile/profile.py
Original file line number Diff line number Diff line change
Expand Up @@ -583,7 +583,8 @@ def reduce_up_down(self, ssp_direction, use_pressure=False):
self.data.flag[i] = Dicts.flags['valid'] # switch back to valid the last flagged one

if np.sum(self.data_valid) <= 1:
raise RuntimeError('Unable to locate the upcast values. Double check their presence in the input file.')
raise RuntimeError('Unable to retrieve the cast values. Double check their presence in the input file and '
'the direction of the cast values in the SSM setup.')

if ssp_direction == Dicts.ssp_directions['up']:
logger.debug("flipping data for up direction")
Expand Down

0 comments on commit 640f559

Please sign in to comment.