% This script traces the map of a 2D (latitude-longitude) geophysical field contained in the array "field"
% give to "field" the value you want as specified below, and specify the longitude and
% latitude vectors in "longi" and "lati". 

% you will need to install in your work directory the matlab library "m_map", you will find

longint=[-90 30]; %insert longitude interval for map
latint=[20 80];   %   "   latitude     "      "   "
field=eof(:,:,1); %insert field to be contoured field(lati,longi)
longi=lon;        % longitudes
lati=lat;         % latitudes
nlev=15;          % number of contour levels

path(path,'/misc/home/dandrea/m_map'); % substitute here the path to the directory where you have m_map

field=squeeze(field);
ma=max(max(field));mi=min(min(field));
lev=mi:((ma-mi)/nlev):ma;

m_proj('miller','long',longint,'lat',latint);
[C,h]=m_contour(longi,lati,field,lev,'color','k');
m_grid('box','fancy');hold on
m_coast('color',[0 0 0]);
clabel(C)      
