% TEC mapper script for Greenland.
% Written by Tibor Durgonics.
% Modified by Hans-Henrik von Benzon to run on Matlab2015.

states = shaperead('landareas.shp', 'UseGeoCoords', true); % Read vector features and attributes from the landareas shapefile.
greenland=states(4,1); % Select Greenland contour.
   
j = 21; % Which epoch should be displayed (1..24) 

figure(j+12)

worldmap('greenland')
meshm(TECMatrixDay (:,:,j),[1,86,-75],[90 180]); 
title(['RIM-',num2str(EPOCH_OF_FIRST_MAP(1,1)),'/',...
num2str(EPOCH_OF_FIRST_MAP(2,1)),'/',num2str(EPOCH_OF_FIRST_MAP(3,1))...
    ,' : ',num2str(j-1),' hour(s) [UT-19 sec]',' (#St:',num2str(N_OF_STATIONS),' #Sat:',num2str(N_OF_SATELLITES),')']); 
mapColor=hsv(256);
myMap=mapColor(1:180,:);
colormap(myMap(180:-1:1,:));
colorbar;
h=colorbar;
ylabel(h,'TECU','FontSize', 11);
maxTEC = ceil(max(max(max(TECMatrixDay(:,:,j)))));
caxis([0 maxTEC]);
geoshow(greenland.Lat,greenland.Lon,'Color','black','LineWidth',1)
