clear all
close all

figure(); hold on; 

%% grid
lat_min = 33;
lat_max = 42;
lon_min = -125;
lon_max = -115;
for lat = lat_min:0.5:lat_max
    plot([lon_min,lon_max],[lat,lat],'-.','LineWidth',0.2,'color',[0.5 0.6 0.2]);
end
for lon = lon_min:0.5:lon_max
    plot([lon,lon],[lat_min,lat_max],'k-.','LineWidth',0.2,'color',[0.5 0.6 0.2]);
end
axis([lon_min lon_max lat_min lat_max]);

%% plot blue ocean and land in drought condition
CAcoastNI = load('CA_coast_line_no_islands.txt');
n = size(CAcoastNI,1);
land = CAcoastNI;
land(n+1,1) = lon_max;
land(n+1,2) = max(land(1:n,2));
land(n+2,1) = lon_max;
land(n+2,2) = min(land(1:n,2));

color = [0.8 0.8 0.2];
h = patch(land(:,1),land(:,2),color);
h.FaceAlpha = 'flat';
h.FaceVertexAlphaData = [0.3];

ocean = CAcoastNI;
ocean(n+1,1) = lon_min;
ocean(n+1,2) = max(ocean(1:n,2));
ocean(n+2,1) = lon_min;
ocean(n+2,2) = min(ocean(1:n,2));

color = [0.2 0.2 0.8];
h = patch(ocean(:,1),ocean(:,2),color);
h.FaceAlpha = 'flat';
h.FaceVertexAlphaData = [0.3];

%% coast line with islands and San Andreas fault
CAcoast   = load('CA_coast_line.txt');
SAfault = load('SA_fault.txt');
scatter(CAcoast(:,1),CAcoast(:,2),10,'k','filled')
scatter(SAfault(:,1),SAfault(:,2),10,'r','filled')

%% land section of moving Pacific plate
plate = load('plate.txt');


color = [0.4 0.2 0.2];
h = patch(plate(:,1),plate(:,2),color);
h.FaceAlpha = 'flat';
h.FaceVertexAlphaData = [0.3];

