Skip to content

Commit

Permalink
Fix case in rinkoDoPP when depth (positive down) is <= -5m.
Browse files Browse the repository at this point in the history
  • Loading branch information
ggalibert committed Oct 10, 2017
1 parent 25470a1 commit 03f4a8d
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions Preprocessing/rinkoDoPP.m
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,11 @@
else
if depthIdx > 0
depth = sam.(depthType){depthIdx}.data;

% any depth values <= -5 are discarded (reminder, depth is
% positive down), this allow use of gsw_p_from_z without error.
depth(depth <= -5) = NaN;

if ~isempty(sam.geospatial_lat_min) && ~isempty(sam.geospatial_lat_max)
% compute depth with Gibbs-SeaWater toolbox
% relative_pressure ~= gsw_p_from_z(-depth, latitude)
Expand Down

0 comments on commit 03f4a8d

Please sign in to comment.