%  DoMaps.m       - create a series of horizontal maps of variables on depth or
%                   density surfaces. 
%                   Saves figures to postscript files. 
%    needs variables set:  GEOMINFO CRUISEINFO DEFAULTS
%    sets variables: CruiseName Line FixGrid DepthResolution MaskLand 
%                    xrange yrange MinDepth UseDepth Depth2Plot Dens2Plot cl
%    calls: SetupPlots Tmap Smap O2map Sigmap DynTopomap Tmaxmap

TmaxPlot=1;
%TmaxPlot=0;

%DynTopoPlot=1;
DynTopoPlot=0;

%TmapPlot=1;
TmapPlot=0;

%SmapPlot=1;
SmapPlot=0;

%SigmapPlot=1;
SigmapPlot=0;

%SetDefaults;

DepthResolution='OneMeter';
%CRUISEINFO=0;
Line='grid';
FixGrid=0;
CruiseName='NBP0103';
%CruiseName='NBP0104';
%CruiseName='NBP0202';
SetupPlots;
MaskLand=1;

%                    Whole area
xrange=[0 550];
yrange=[-50 300];
%                 Marguerite Bay and Adelaide Island
%xrange=[150 500];
%yrange=[-75 175];

if TmaxPlot
  UsePotTemp=1;
  MinDepth=200;
  cl=[0 .2 .4 .6 .8 1 1.2 1.4 1.6 1.8 2];
  Tmaxmap;
  print('-dpsc2',['Tmaxmap.' CruiseName '.ps'])
end

if DynTopoPlot
  RefPress=350;
%  RefPress=400;
  DynTopomap;
  print('-dps2',['DynTopomap.' CruiseName '.' num2str(RefPress) '.ps'])
end

if TmapPlot
  UsePotTemp=1;
  UseDepth=1;
%  Depth2Plot=300;
%  cl=[0 .2 .4 .6 .8 1 1.2 1.4 1.6 1.8 2];
%  Depth2Plot=50;
%  Depth2Plot=20;
  Depth2Plot=10;
  cl=[-2 -1.8 -1.6 -1.4 -1.2 -1.0 -.8 -.6 -.4];
%               winter conditions
%  cl=[-1.85 -1.8 -1.75 -1.7 -1.65 -1.6 ];
  Tmap
  print('-dpsc2',['Tmap.' CruiseName '.' num2str(Depth2Plot) '.ps'])
end

if SmapPlot
%  Depth2Plot=50;
  Depth2Plot=20;
%  Depth2Plot=10;
  cl=[33.0 33.1 33.2 33.3 33.4 33.5 33.6 33.7 33.8 33.9 34.0];
  Smap
  print('-dpsc2',['Smap.' CruiseName '.' num2str(Depth2Plot) '.ps'])
end

if O2mapPlot
  Depth2Plot=300;
  cl=[4 4.1 4.15 4.2 4.25 4.3 4.35 4.4 4.5 4.6 4.7 4.8 4.9 5 5.5 6 6.5 7 7.5 8];
  O2map
%  print('-dpsc2',['O2map.' CruiseName '.' num2str(Depth2Plot) '.ps'])
end

if SigmapPlot
%  Depth2Plot=300;
  cl=[27.7 27.72 27.74 27.75 27.76 27,77 27.78 27.8];
  Sigmap
%  print('-dpsc2',['Sigmap.' CruiseName '.' num2str(Depth2Plot) '.ps'])
end




