-
Notifications
You must be signed in to change notification settings - Fork 15
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Bug fix in gsw_SA_Sstar_from_SP (line 182).
- Loading branch information
1 parent
c5b91a1
commit d276f56
Showing
184 changed files
with
812 additions
and
1,492 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -17,9 +17,9 @@ | |
% Absolute_Pressure = Absolute Pressure [ Pa ] | ||
% | ||
% AUTHOR: | ||
% Trevor McDougall and Paul Barker [ [email protected] ] | ||
% Trevor McDougall and Paul Barker [ [email protected] ] | ||
% | ||
% VERSION NUMBER: 3.0 (29th March, 2011) | ||
% VERSION NUMBER: 3.01 (29th March, 2011) | ||
% | ||
% REFERENCES: | ||
% IOC, SCOR and IAPSO, 2010: The international thermodynamic equation of | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -15,9 +15,9 @@ | |
% C3515 = Conductivity at (SP=35, t_68=15, p=0) [ mS/cm ] | ||
% | ||
% AUTHOR: | ||
% Trevor McDougall and Paul Barker [ [email protected] ] | ||
% Trevor McDougall and Paul Barker [ [email protected] ] | ||
% | ||
% VERSION NUMBER: 3.0 (29th March, 2011) | ||
% VERSION NUMBER: 3.01 (29th March, 2011) | ||
% | ||
% REFERENCES: | ||
% Culkin and Smith, 1980: Determination of the Concentration of Potassium | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -32,9 +32,9 @@ | |
% at constant SA. CT_pt is dimensionless. [ unitless ] | ||
% | ||
% AUTHOR: | ||
% Trevor McDougall and Paul Barker [ [email protected] ] | ||
% Trevor McDougall and Paul Barker [ [email protected] ] | ||
% | ||
% VERSION NUMBER: 3.0 (11th April 2011) | ||
% VERSION NUMBER: 3.01 (11th April 2011) | ||
% | ||
% REFERENCES: | ||
% IOC, SCOR and IAPSO, 2010: The international thermodynamic equation of | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -31,7 +31,7 @@ | |
% AUTHOR: | ||
% Trevor McDougall, Paul Barker and Rainer Feistal [ [email protected] ] | ||
% | ||
% VERSION NUMBER: 3.0 (4th November, 2011) | ||
% VERSION NUMBER: 3.01 (4th November, 2011) | ||
% | ||
% REFERENCES: | ||
% IOC, SCOR and IAPSO, 2010: The international thermodynamic equation of | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -20,9 +20,9 @@ | |
% CT = Conservative Temperature (ITS-90) [ deg C ] | ||
% | ||
% AUTHOR: | ||
% Trevor McDougall and Paul Barker. [ [email protected] ] | ||
% Trevor McDougall and Paul Barker. [ [email protected] ] | ||
% | ||
% VERSION NUMBER: 3.0 (3rd March, 2011) | ||
% VERSION NUMBER: 3.01 (3rd March, 2011) | ||
% | ||
% REFERENCES: | ||
% IOC, SCOR and IAPSO, 2010: The international thermodynamic equation of | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -20,9 +20,9 @@ | |
% CT = Conservative Temperature (ITS-90) [ deg C ] | ||
% | ||
% AUTHOR: | ||
% David Jackett, Trevor McDougall and Paul Barker [ [email protected] ] | ||
% David Jackett, Trevor McDougall and Paul Barker [ [email protected] ] | ||
% | ||
% VERSION NUMBER: 3.0 (29th March, 2011) | ||
% VERSION NUMBER: 3.01 (29th March, 2011) | ||
% This function is unchanged from version 2.0 (24th September, 2010). | ||
% | ||
% REFERENCES: | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -41,9 +41,9 @@ | |
% called with two outputs the second variable will be set to NaN. | ||
% | ||
% AUTHOR: | ||
% Trevor McDougall & Paul Barker [ [email protected] ] | ||
% Trevor McDougall & Paul Barker [ [email protected] ] | ||
% | ||
% VERSION NUMBER: 3.0 (21th April, 2011) | ||
% VERSION NUMBER: 3.01 (21th April, 2011) | ||
% | ||
% REFERENCES: | ||
% IOC, SCOR and IAPSO, 2010: The international thermodynamic equation of | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -32,9 +32,9 @@ | |
% outputs the second variable will be set to NaN. | ||
% | ||
% AUTHOR: | ||
% Trevor McDougall & Paul Barker [ [email protected] ] | ||
% Trevor McDougall & Paul Barker [ [email protected] ] | ||
% | ||
% VERSION NUMBER: 3.0 (21th April, 2011) | ||
% VERSION NUMBER: 3.01 (21th April, 2011) | ||
% | ||
% REFERENCES: | ||
% IOC, SCOR and IAPSO, 2010: The international thermodynamic equation of | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -23,9 +23,9 @@ | |
% CT = Conservative Temperature (ITS-90) [ deg C ] | ||
% | ||
% AUTHOR: | ||
% David Jackett, Trevor McDougall and Paul Barker [ [email protected] ] | ||
% David Jackett, Trevor McDougall and Paul Barker [ [email protected] ] | ||
% | ||
% VERSION NUMBER: 3.0 (27th March, 2011) | ||
% VERSION NUMBER: 3.01 (27th March, 2011) | ||
% This function is unchanged from version 2.0 (24th September, 2010). | ||
% | ||
% REFERENCES: | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -34,9 +34,9 @@ | |
% given Absolute Salinity and pressure. | ||
% | ||
% AUTHOR: | ||
% Trevor McDougall & Paul Barker [ [email protected] ] | ||
% Trevor McDougall & Paul Barker [ [email protected] ] | ||
% | ||
% VERSION NUMBER: 3.0 (3rd April, 2011) | ||
% VERSION NUMBER: 3.01 (3rd April, 2011) | ||
% | ||
% REFERENCES: | ||
% IOC, SCOR and IAPSO, 2010: The international thermodynamic equation of | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -26,9 +26,9 @@ | |
% given Absolute Salinity and pressure. | ||
% | ||
% AUTHOR: | ||
% Trevor McDougall & Paul Barker [ [email protected] ] | ||
% Trevor McDougall & Paul Barker [ [email protected] ] | ||
% | ||
% VERSION NUMBER: 3.0 (3rd April, 2011) | ||
% VERSION NUMBER: 3.01 (3rd April, 2011) | ||
% | ||
% REFERENCES: | ||
% IOC, SCOR and IAPSO, 2010: The international thermodynamic equation of | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -42,9 +42,9 @@ | |
% CT_pt_pt has units of: [ 1/K ] | ||
% | ||
% AUTHOR: | ||
% Trevor McDougall and Paul Barker [ [email protected] ] | ||
% Trevor McDougall and Paul Barker [ [email protected] ] | ||
% | ||
% VERSION NUMBER: 3.0 (29th March, 2011) | ||
% VERSION NUMBER: 3.01 (29th March, 2011) | ||
% This function is unchanged from version 2.0 (24th September, 2010). | ||
% | ||
% REFERENCES: | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -41,9 +41,9 @@ | |
% C = conductivity [ mS/cm ] | ||
% | ||
% AUTHOR: | ||
% Trevor McDougall, Paul Barker and Rich Pawlowicz [ [email protected] ] | ||
% Trevor McDougall, Paul Barker and Rich Pawlowicz [ [email protected] ] | ||
% | ||
% VERSION NUMBER: 3.0 (1st April, 2011) | ||
% VERSION NUMBER: 3.01 (1st April, 2011) | ||
% | ||
% REFERENCES: | ||
% Hill, K.D., T.M. Dauphinee and D.J. Woods, 1986: The extension of the | ||
|
@@ -57,7 +57,7 @@ | |
% See appendix E of this TEOS-10 Manual. | ||
% | ||
% Unesco, 1983: Algorithms for computation of fundamental properties of | ||
% seawater. Unesco Technical Papers in Marine Science, 44, 53 pp. | ||
% seawater. Unesco Technical Papers in Marine Science, 44, 53 pp. | ||
% | ||
% The software is available from http://www.TEOS-10.org | ||
% | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -22,9 +22,9 @@ | |
% Helmholtz_energy_t_exact = Helmholtz energy [ J/kg ] | ||
% | ||
% AUTHOR: | ||
% Trevor McDougall [ [email protected] ] | ||
% Trevor McDougall [ [email protected] ] | ||
% | ||
% VERSION NUMBER: 3.0 (29th March, 2011) | ||
% VERSION NUMBER: 3.01 (29th March, 2011) | ||
% | ||
% REFERENCES: | ||
% IOC, SCOR and IAPSO, 2010: The international thermodynamic equation of | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -51,9 +51,9 @@ | |
% That is, p_mid is on a (M-1)xN grid. [ dbar ] | ||
% | ||
% AUTHOR: | ||
% Trevor McDougall and Paul Barker [ [email protected] ] | ||
% Trevor McDougall and Paul Barker [ [email protected] ] | ||
% | ||
% VERSION NUMBER: 3.0 (23rd March, 2011) | ||
% VERSION NUMBER: 3.01 (23rd March, 2011) | ||
% | ||
% REFERENCES: | ||
% IOC, SCOR and IAPSO, 2010: The international thermodynamic equation of | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -46,9 +46,9 @@ | |
% p_mid = Mid pressure between p grid (M-1xN) [ dbar ] | ||
% | ||
% AUTHOR: | ||
% Trevor McDougall and Paul Barker [ [email protected] ] | ||
% Trevor McDougall and Paul Barker [ [email protected] ] | ||
% | ||
% VERSION NUMBER: 3.0 (22nd March, 2011) | ||
% VERSION NUMBER: 3.01 (22nd March, 2011) | ||
% | ||
% REFERENCES: | ||
% Griffies, S. M., 2004: Fundamentals of Ocean Climate Models. Princeton, | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -13,9 +13,9 @@ | |
% P0 = Absolute Pressure of one standard atmosphere. [ Pa ] | ||
% | ||
% AUTHOR: | ||
% Trevor McDougall and Paul Barker [ [email protected] ] | ||
% Trevor McDougall and Paul Barker [ [email protected] ] | ||
% | ||
% VERSION NUMBER: 3.0 (29th March, 2011) | ||
% VERSION NUMBER: 3.01 (29th March, 2011) | ||
% | ||
% REFERENCES: | ||
% IOC, SCOR and IAPSO, 2010: The international thermodynamic equation of | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -41,9 +41,9 @@ | |
% R = conductivity ratio [ unitless ] | ||
% | ||
% AUTHOR: | ||
% Trevor McDougall, Paul Barker and Rich Pawlowicz [ [email protected] ] | ||
% Trevor McDougall, Paul Barker and Rich Pawlowicz [ [email protected] ] | ||
% | ||
% VERSION NUMBER: 3.0 (6th April, 2011) | ||
% VERSION NUMBER: 3.01 (6th April, 2011) | ||
% | ||
% REFERENCES: | ||
% Culkin and Smith, 1980: Determination of the Concentration of Potassium | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -40,14 +40,14 @@ function gsw_SA_CT_plot(SA,CT,p_ref,isopycs,title_string) | |
% isopycs can be either 1x1 or 1xN or Mx1 | ||
% | ||
% AUTHOR: | ||
% Rich Pawlowicz [ [email protected] ] | ||
% Rich Pawlowicz [ [email protected] ] | ||
% Note. This function was extracted and adapted from Rich Pawlowicz's | ||
% ocean toolbox. | ||
% | ||
% MODIFIED: | ||
% Paul Barker & Trevor McDougall | ||
% | ||
% VERSION NUMBER: 3.0 (29th March, 2011) | ||
% VERSION NUMBER: 3.01 (6th March, 2012) | ||
% | ||
% REFERENCES: | ||
% McDougall T.J., P.M. Barker, R. Feistel and D.R. Jackett, 2011: A | ||
|
@@ -68,12 +68,27 @@ function gsw_SA_CT_plot(SA,CT,p_ref,isopycs,title_string) | |
isopycs = 5; | ||
end | ||
|
||
if ischar(p_ref) == 1 | ||
title_string = p_ref; | ||
p_ref = 0; | ||
isopycs = 5; | ||
end | ||
|
||
if ~isscalar(unique(p_ref)) | ||
error('gsw_SA_CT_plot: Multiple reference pressures'); | ||
else | ||
p_ref = unique(p_ref); | ||
end | ||
|
||
if ~exist('isopycs','var'), | ||
isopycs = 5; | ||
end | ||
|
||
if ischar(isopycs) == 1 | ||
title_string = isopycs; | ||
isopycs = 5; | ||
end | ||
|
||
isopycs = isopycs(:); | ||
min_SA_data = min(min(SA(:))); | ||
max_SA_data = max(max(SA(:))); | ||
|
@@ -103,7 +118,7 @@ function gsw_SA_CT_plot(SA,CT,p_ref,isopycs,title_string) | |
[c1,h] = contour(SA_gridded,CT_gridded,isopycs_gridded,isopycs,':','Color',[.5 .5 .5]); | ||
end | ||
hold on; | ||
[c2] = plot(SA(:,1),CT(:,1),'k.','linewidth',2); | ||
[c2] = plot(SA,CT,'.','linewidth',2); | ||
|
||
if exist('c1','var') | ||
clabel(c1,h,'labelspacing',360,'fontsize',8,'color',[.5 .5 .5]); | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -36,7 +36,7 @@ | |
% AUTHOR: | ||
% Paul Barker and Trevor McDougall [ [email protected] ] | ||
% | ||
% VERSION NUMBER: 3.0 (11th November, 2011) | ||
% VERSION NUMBER: 3.01 (11th November, 2011) | ||
% | ||
% REFERENCES: | ||
% IOC, SCOR and IAPSO, 2010: The international thermodynamic equation of | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -33,7 +33,7 @@ | |
% AUTHOR: | ||
% David Jackett, Trevor McDougall & Paul Barker [ [email protected] ] | ||
% | ||
% VERSION NUMBER: 3.0 (31st May, 2011) | ||
% VERSION NUMBER: 3.01 (31st May, 2011) | ||
% | ||
% REFERENCES: | ||
% IOC, SCOR and IAPSO, 2010: The international thermodynamic equation of | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -29,9 +29,9 @@ | |
% hundred kilometres inland from the coast. | ||
% | ||
% AUTHOR: | ||
% David Jackett, Trevor McDougall and Paul Barker [ [email protected] ] | ||
% David Jackett, Trevor McDougall and Paul Barker [ [email protected] ] | ||
% | ||
% VERSION NUMBER: 3.0 (27th March, 2011) | ||
% VERSION NUMBER: 3.01 (27th March, 2011) | ||
% | ||
% REFERENCES: | ||
% IOC, SCOR and IAPSO, 2010: The international thermodynamic equation of | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -35,9 +35,9 @@ | |
% Scale of Millero et al. (2008). | ||
% | ||
% AUTHOR: | ||
% Trevor McDougall & Paul Barker [ [email protected] ] | ||
% Trevor McDougall & Paul Barker [ [email protected] ] | ||
% | ||
% VERSION NUMBER: 3.0 (4th April, 2011) | ||
% VERSION NUMBER: 3.01 (4th April, 2011) | ||
% | ||
% REFERENCES: | ||
% IOC, SCOR and IAPSO, 2010: The international thermodynamic equation of | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -41,9 +41,9 @@ | |
% Scale of Millero et al. (2008). | ||
% | ||
% AUTHOR: | ||
% Trevor McDougall & Paul Barker [ [email protected] ] | ||
% Trevor McDougall & Paul Barker [ [email protected] ] | ||
% | ||
% VERSION NUMBER: 3.0 (4th April, 2011) | ||
% VERSION NUMBER: 3.01 (4th April, 2011) | ||
% | ||
% REFERENCES: | ||
% IOC, SCOR and IAPSO, 2010: The international thermodynamic equation of | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -27,9 +27,9 @@ | |
% Scale of Millero et al. (2008). | ||
% | ||
% AUTHOR: | ||
% Trevor McDougall & Paul Barker [ [email protected] ] | ||
% Trevor McDougall & Paul Barker [ [email protected] ] | ||
% | ||
% VERSION NUMBER: 3.0 (28th March, 2011) | ||
% VERSION NUMBER: 3.01 (28th March, 2011) | ||
% | ||
% REFERENCES: | ||
% IOC, SCOR and IAPSO, 2010: The international thermodynamic equation of | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,54 @@ | ||
function SK = gsw_SK_from_SP(SP) | ||
|
||
% gsw_SK_from_SP Knudsen Salinity from Practical Salinity | ||
%========================================================================== | ||
% | ||
% USAGE: | ||
% SK = gsw_SK_from_SP(SP) | ||
% | ||
% DESCRIPTION: | ||
% Calculates Knudsen Salinity from Practical Salinity. | ||
% | ||
% INPUT: | ||
% SP = Practical Salinity (PSS-78) [ unitless ] | ||
% | ||
% OUTPUT: | ||
% SK = Knudsen Salinity [parts per thousand, ppt] | ||
% | ||
% AUTHOR: | ||
% Trevor McDougall and Paul Barker [ [email protected] ] | ||
% | ||
% VERSION NUMBER: 3.01 (16th November, 2011) | ||
% | ||
% REFERENCES: | ||
% IOC, SCOR and IAPSO, 2010: The international thermodynamic equation of | ||
% seawater - 2010: Calculation and use of thermodynamic properties. | ||
% Intergovernmental Oceanographic Commission, Manuals and Guides No. 56, | ||
% UNESCO (English), 196 pp. Available from http://www.TEOS-10.org | ||
% See Appendix A.3 of this TEOS-10 Manual. | ||
% | ||
% The software is available from http://www.TEOS-10.org | ||
% | ||
%========================================================================== | ||
|
||
%-------------------------------------------------------------------------- | ||
% Check variables | ||
%-------------------------------------------------------------------------- | ||
|
||
if ~(nargin == 1) | ||
error('gsw_SK_from_SP: Requires only one input') | ||
end %if | ||
|
||
%-------------------------------------------------------------------------- | ||
% Start of the calculation | ||
%-------------------------------------------------------------------------- | ||
|
||
% These few lines ensure that SP is non-negative. | ||
[I_neg_SP] = find(SP < 0); | ||
if ~isempty(I_neg_SP) | ||
SP(I_neg_SP) = 0; | ||
end | ||
|
||
SK = 0.03 + SP.*(1.805/1.80655); | ||
|
||
end |
Oops, something went wrong.