data=load('date.mat', "temp_data_2030_245", "salinity_data_2030_245", "CO3_data_2030_245");
data1=load('245.mat',"co3_lat_245", "co3_lon_245");
temp_data = data.temp_data_2030_245;
salinity_data = data.salinity_data_2030_245;
CO3_data = data.CO3_data_2030_245;
CO3_data = CO3_data/1025;
Ca_values = (salinity_data/35)*0.01028;
Ksp_values = -171.945 - (0.077993 .* T) + (2903.293 ./ T) + (71.595 .* log10(T)) ...
+ ((0.0017276 .* T - 0.068393 + (88.135 ./ T)) .* sqrt(S)) ...
- (0.10018 .* S) + (0.0059415 .* S.^1.5);
omega = (CO3_data) .* Ca_values ./ 10.^Ksp_values;
directory = '/Users/sophie/Documents/Masters/Research Project/01_Data';
fileName = 'WCMC008_CoralReef2021_Py_v4_1.shp';
filePath = fullfile(directory, fileName);
CurrentCoral = shaperead(filePath);
sgtitle('Aragonite Saturation State under SSP 245 in Summer');
land = shaperead('landareas', 'UseGeoCoords', true);
geoshow(lat, lon, omega, 'DisplayType', 'texturemap');
mlabel off; plabel off; gridm off
geoshow(land, 'DisplayType', 'polygon', 'FaceColor', 'k');
set(gcf, 'Position', [100, 100, 800, 600]);
plotm(Y, X, 'ro', 'MarkerSize', 1, 'MarkerFaceColor', 'r');