Skip to content

Commit

Permalink
Fix unintialized struct in readWQMdata when density needs to be compu…
Browse files Browse the repository at this point in the history
…ted to get DOX2 and there is conductivity but no salinity.

psal was previous used as type real, but when returning from gsw_SP_from_R you are trying to create a struct.
  • Loading branch information
sspagnol authored and ggalibert committed Jul 12, 2017
1 parent 4efea08 commit 86f7e67
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Parser/readWQMdat.m
Original file line number Diff line number Diff line change
Expand Up @@ -379,7 +379,7 @@ case upper('DO(mg/l)') % DOX1_3
cndc = sample_data.variables{cndc};
% conductivity is in S/m and gsw_C3515 in mS/cm
crat = 10*cndc.data ./ gsw_C3515;

psal = struct;
psal.data = gsw_SP_from_R(crat, temp.data, pres.data);
end

Expand Down

0 comments on commit 86f7e67

Please sign in to comment.