Skip to content
Snippets Groups Projects
Commit 8783bfbd authored by Yves Gouriou's avatar Yves Gouriou
Browse files

Modification de la fonction d'étalonnage. Tous les cas

n'étaient pas pris en compte
parent 748aca96
No related branches found
No related tags found
No related merge requests found
......@@ -7,9 +7,20 @@ Installation:
- Installer la toolbox m_map (>= 1.4) sous Matlab
voir: http://www2.ocgy.ubc.ca/~rich/map.html
- Installer la toolbox mexnc (NetCDF) sous Matlab depuis:
- Installer la toolbox mexnc sous Matlab depuis:
http://mexcdf.sourceforge.net/downloads/
voir lien galement sous http://www.ird.fr/us191/spip.php?article18
- Installer la toolbox NetCDF sous Matlab depuis:
http://mexcdf.sourceforge.net/downloads/
voir lien galement sous http://www.ird.fr/us191/spip.php?article18#
Modifier la documentation sous SPIP (bien hirarchiser) :
Installation MEXNC
Sous Windows
Sous Linux
Installation NETCDF
- Copier les 3 fichiers de climato de surface Levitus dans un de vos
rpertoires Matlab accessible via matlabpath sous:
......@@ -20,6 +31,8 @@ Installation:
- Ne pas oublier de modifier votre path Matlab sous Windows ou la variable
MATLABPATH sous Linux afin que ces toolbox soient utilisables.
Dcrire le cheminement des paths et des variables d'environnements (Systme ou Matlab)
Configuration:
-------------
......
......@@ -22,8 +22,15 @@ for i = 1:3
para1 = [PARA(i,:) '_LINCOEF'];
para2 = [PARA(i,:) '_CAL'];
tsg.(para2)= tsg.(para1)(1) * tsg.(PARA(i,:)) + tsg.(para1)(2);
% If the Slope = 1 and the offset = 0 : No calibration
% The variable _CAL must be emptied
% ---------------------------------------------------------------------
if abs(1-tsg.(para1)(1)) > .00000001 || abs(0-tsg.(para1)(2)) > .00000001
tsg.(para2) = tsg.(para1)(1) * tsg.(PARA(i,:)) + tsg.(para1)(2);
else
tsg.(para2) = [];
end
elseif strcmp( PARA(i,:), 'CNDC' ) || strcmp( PARA(i,:), 'SSJT' )
......@@ -36,8 +43,43 @@ end
% Compute salinity - Use CSIRO functions
% --------------------------------------
tsg.SSPS_CAL = sw_salt( ...
tsg.CNDC_CAL/sw_c3515(), t90TOt68(tsg.SSJT_CAL), zeros(size(tsg.CNDC_CAL)));
% Test if Conductivity or temperature has been calibrated
% -------------------------------------------------------
indC = find( isnan( tsg.CNDC_CAL ) == 0 );
indT = find( isnan( tsg.SSJT_CAL ) == 0 );
if ~isempty( indC ) || ~isempty( indT )
% If SSJT has not been calibrated used SSJT and not SSJT_CAL to compute
% SSPS_CAL
% ---------------------------------------------------------------------
temp = tsg.SSJT_CAL;
ind = find( isnan( temp ) == 0 );
if isempty(ind)
temp = tsg.SSJT;
end
% If CNDC has not been calibrated used CNDC and not CNDC_CAL to compute
% SSPS_CAL
% ---------------------------------------------------------------------
cond = tsg.CNDC_CAL;
ind = find( isnan( temp ) == 0 );
if isempty(ind)
cond = tsg.CNDC;
end
if ~isempty( temp ) && ~isempty( cond )
tsg.SSPS_CAL = sw_salt( ...
tsg.CNDC_CAL/sw_c3515(), t90TOt68(temp), zeros(size(tsg.CNDC_CAL)));
end
else
% If CNDC_CAL is empty SSPS_CAL must be also empty
% ------------------------------------------------
tsg.SSPS_CAL = [];
end
% Save tsg application data
% --------------------------
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment