%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%                    LATEXtools                         %%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%  This  file  is  free software ;  it  is distributed  in  %
%%  the hope that  it  will  be  useful,  but  without  any  %
%%  warranty.  You  can  redistribute  it and/or modify  it  %
%%  under  the  terms  of  the  GNU  General Public License  %
%%  as  published  by  the   Free  Software  Foundation  at  %
%%       http://www.gnu.org/copyleft/gpl.html                %
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%% script for loading data of the FSLE data
%%%
%%% function [fsle_lon, fsle_lat]=load_FSLE(fname,threshold)
%%% 
%%% INPUT : FSLE_yyyymmdd.mat
%%%
%%% OUTPUT: lon and lat of the points with FSLE > .2 [days^-1]<-CHECK!!!!!!
%%% 
%%%
%%% ALGORITHM: load MAT file containing the position of the FSLE > 
%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%% 27/07/15 AD: adapted for OSCAHR: read the SPASSO output files
%% 24/06/13 : andrea.doglioli@univ-amu.fr : first official release
%%
%% Credits: F.Nencioli
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

function [fsle_lon, fsle_lat]=load_FSLE(fname,threshold)

load([fname]);

[i,j]=find(-60*60*24*lambda>threshold);

fsle_lon=lonvv(j);
fsle_lat=latvv(i);

return

