
 namerun='erai61c' 
 yd='1993' 
 yf='1994' 

%namerun='erai51c';
%yd='1993'
%yf='1994'

ydur=[yd '-' yf]
rep=[yd '0101_' yf '1231'] 

%champ='<CHAMP>';
 champ='tos';

 root_dir=['/net/adonis/usr/adonis/phybiocar/cholod/peru12_nemo/']

 fs=[root_dir '/' namerun '/' rep '/peru12_5d_' rep '_grid_T_2D.' namerun '.nc']
 
 fg=[root_dir 'mesh_mask_PERU12.nc']
 fo=[root_dir 'data/SST_avhrr_19931994.nc']
 
nc=netcdf(fs,'r');
ng=netcdf(fg,'r');
no=netcdf(fo,'r');
lat=ng{'nav_lat'}(:);
lon=ng{'nav_lon'}(:);
 
%        float tos(time_counter, lat, lon) ;
champ2=nc{champ}(:,:,:);
mchamp=squeeze(mean(champ2,1));

obs=squeeze(no{'SST'}(1,:,:));
delta=mchamp-obs;


opengl neverselect % pour pb cartes graphiques

figure;
pcolor(lon,lat,delta);
shading flat;
set(gca,'PlotBoxAspectRatio',[0.6 1 1]);
set(gca,'FontS',12);
caxis([-1 3]);
title(['SST - obs (°C) - ' namerun ' (' ydur ')'], 'FontSize',16);
hcc=colorbar; set(hcc,'FontS',12);

print ('-dpng','figure1.png')

quit
