%   Powered by He Yanchun, PKU,NZC 
%   $Revision: 1.0  $  $Date: 2010/08/02 19:13:41 $

clear all;
close all;

%% Define Constants

%% Define Vars

%% Load Data
load grid;
load coast;
% loadfilename.mat b
[FILE, PATH,FilterIndex] = uigetfile( {'*.nc','NetCDF-files (*.nc)'; ...
   '*.*',  'All Files (*.*)'}, ...
   'Pick a MICOM model NetCDF file');

% flx11=nc_varget([PATH,FILE],'flx11_ave');
flx11=nc_varget([PATH,FILE],'flx11_acc');
plat(end+1,:)=plat(1,:);
plon(end+1,:)=plon(1,:);
flx11(end+1,:)=flx11(1,:);
%% Plot Figures
axesm('stereo','origin',[-90 -20],'maplatlimit',[-90 -20]);
axis off;framem on;gridm on;mlabel on;plabel on;
setm(gca,'mlabelparallel',-20);
framem on;

Hm_axes=axesm('MapProjection','eqdcylin');
pcolorm(plat,plon,flx11);shading flat;
setm(gca,'Frame','on','MeridianLabel','on',...
	'MLabelParallel','south','MLabelLocation',60,...
	'ParallelLabel','on','PLabelLocation',30,...
	'MapLatLimit',[-90 90],'MapLonLimit',[0 360],'Origin',[0 180 0]);

patchm(lat,long,'facecolor',[0.6 0.6 0.6]);
