   clear all; close all;

%-------------------------------------------------------------------------------
   root_dir=['/loceanfs/pulsation/cholod'];

%%% exp, period
   exp_name1={'erai70c','erai70e'};
   config='peru12_nemo';
   yd='2000';
   yf='2007';

%%%  Season
   season_name1={'JFM','AMJ','JAS','OND','annual'};

%%% field
   field_name='thetao'; title1='sst (m)'; field_title='sst';

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

   for num_exp=1:size(exp_name1,2)
%  num_exp=1
      exp_name=char(exp_name1(num_exp));
      disp([exp_name ' - ' ydur ' - ' field_name]);
   
      fs=[root_dir '/' config '/outputs/' exp_name '/' rep '/peru12_1s_' rep '_grid_T_T3D.' exp_name '.nc']
      ncid=netcdf(fs,'r');
      lat=ncid{'nav_lat'}(:);
      lon=ncid{'nav_lon'}(:);
      field=squeeze(ncid{field_name}(:,1,:,:));
      close(ncid);


      for num_season=1:size(season_name1,2)
%         num_season=1
 
         figure(num_season);
         season_name=char(season_name1(num_season));
         pcolor(lon,lat,squeeze(field(num_season,:,:))); shading flat;
         caxis([17 30]);
         hcc=colorbar; set(hcc,'FontS',12);
         set(gca,'PlotBoxAspectRatio',[0.6 1 1]); set(gca,'FontS',12);
         hct=title([title1 ' - ' exp_name ' (' season_name ' ' ydur ')']); set(hct,'FontSize',12,'FontWeight','bold');  
   
         fig_name=['ave_' field_title '_' exp_name '_' season_name '_' ydur '.png']; 
%        print ('-dpng',fig_name)
         saveSameSize(gcf,'format','png','file', fig_name);

      end
   end


quit



