From df5bedc0d8f2e2d66055de6e6f5458b0ae2d093c Mon Sep 17 00:00:00 2001 From: Jacques Grelet <jacques.grelet@ird.fr> Date: Mon, 26 Nov 2007 09:34:58 +0000 Subject: [PATCH] =?UTF-8?q?adaptation=20de=20l'algorithme=20de=20recherche?= =?UTF-8?q?=20des=20points=20dans=20la=20climato=20aux=20demi-degr=C3=A9s?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- tsgqc_GUI.m | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/tsgqc_GUI.m b/tsgqc_GUI.m index 4d1c0c6..fe3b8c9 100644 --- a/tsgqc_GUI.m +++ b/tsgqc_GUI.m @@ -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); -- GitLab