Skip to content
Snippets Groups Projects
Commit df5bedc0 authored by jacques.grelet_ird.fr's avatar jacques.grelet_ird.fr
Browse files

adaptation de l'algorithme de recherche des points dans la climato aux demi-degrés

parent 7845f5e7
No related branches found
No related tags found
No related merge requests found
......@@ -44,7 +44,7 @@ function tsgqc_GUI
];
addpath( p, '-END' );
rehash;
% Screen limits for the GUI
% -------------------------
set(0,'Units','normalized');
......@@ -745,18 +745,18 @@ function tsgqc_GUI
% round positive latitude and Longitude toward zero
% -------------------------------------------------
ind = find(tsg.LATITUDE > 0);
lat(ind) = fix(tsg.LATITUDE(ind));
lat(ind) = fix(tsg.LATITUDE(ind)) + 0.5;
ind = find(tsg.LONGITUDE > 0);
lon(ind) = fix(tsg.LONGITUDE(ind));
lon(ind) = fix(tsg.LONGITUDE(ind)) + 0.5;
% rounds negative latitude and Longitudeto the nearest lowest integers
% ---------------------------------------------------------------------
ind = find(tsg.LATITUDE <= 0);
lat(ind) = floor(tsg.LATITUDE(ind));
lat(ind) = floor(tsg.LATITUDE(ind)) + 0.5;
ind = find(tsg.LONGITUDE <= 0);
lon(ind) = floor(tsg.LONGITUDE(ind));
lon(ind) = floor(tsg.LONGITUDE(ind)) + 0.5;
% Calculates differences between adjacent elements of X.
% 0 if adajacent latitude or longitude are equal
......@@ -774,7 +774,7 @@ function tsgqc_GUI
temp = tsg.TEMP_TSG( ind );
psal = tsg.PSAL( ind );
% Get Climatology, a tester et verifier
% Get Climatology
% LATX(80) = -0.5 et LATX(81) = 0.5
% LONX(180) = -0.5 et LONX(181) = 0.5
% ----------------
......@@ -784,8 +784,8 @@ function tsgqc_GUI
std_temp=zeros(size(ind));
std_psal=zeros(size(ind));
for i=1:length(ind)
ilat = find(tsg.LEVITUS.WOA01_LATX == floor(lat2(i))+0.5);
ilon = find(tsg.LEVITUS.WOA01_LONX == floor(lon2(i))+0.5);
ilat = find(tsg.LEVITUS.WOA01_LATX == lat2(i));
ilon = find(tsg.LEVITUS.WOA01_LONX == lon2(i));
mean_temp(i) = tsg.LEVITUS.WOA01_MEAN_TEMP(ilat,ilon,1);
mean_psal(i) = tsg.LEVITUS.WOA01_MEAN_PSAL(ilat,ilon,1);
std_temp(i) = tsg.LEVITUS.WOA01_STD_TEMP(ilat,ilon,1);
......
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