Skip to content

Commit

Permalink
Fix bug in WQM parser where applied_offset variable attribute is not …
Browse files Browse the repository at this point in the history
…added to PRES_REL variable but another variable in the NetCDF file.
  • Loading branch information
ggalibert committed Aug 11, 2016
1 parent e9f6952 commit 6f14705
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion Parser/readWQMdat.m
Original file line number Diff line number Diff line change
Expand Up @@ -339,7 +339,7 @@ case upper('DO(mg/l)') % DOX1_3
sample_data.variables{end}.comment = comment;

% WQM uses SeaBird pressure sensor
if strncmp('PRES_REL', sample_data.variables{k-3}.name, 8)
if strncmp('PRES_REL', sample_data.variables{end}.name, 8)
% let's document the constant pressure atmosphere offset previously
% applied by SeaBird software on the absolute presure measurement
sample_data.variables{end}.applied_offset = sample_data.variables{end}.typeCastFunc(-14.7*0.689476);
Expand Down
4 changes: 2 additions & 2 deletions Parser/readWQMraw.m
Original file line number Diff line number Diff line change
Expand Up @@ -249,10 +249,10 @@
sample_data.variables{end}.comment = comment;

% WQM uses SeaBird pressure sensor
if strncmp('PRES_REL', sample_data.variables{k}.name, 8)
if strncmp('PRES_REL', sample_data.variables{end}.name, 8)
% let's document the constant pressure atmosphere offset previously
% applied by SeaBird software on the absolute presure measurement
sample_data.variables{k}.applied_offset = sample_data.variables{k}.typeCastFunc(-14.7*0.689476);
sample_data.variables{end}.applied_offset = sample_data.variables{end}.typeCastFunc(-14.7*0.689476);
end
end

Expand Down

0 comments on commit 6f14705

Please sign in to comment.