
!copy swf_grid3.nc swf_grid4.nc
fname = 'swf_grid4.nc'; %copy of swfl_grid3.nc
 
h_m = nc_varget(fname,'h');
h_m=h_m.*0.3048; %convert feet to meters





mask = nc_varget(fname,'mask_rho');
hplot=h_m;
hplot(~mask) = nan;

figure;
pcolor(hplot)
colorbar


% %increase depth upstream Calusa
% 
x = [-81.7471 -81.7617 -81.8085 -81.8091 -81.8259 -81.8394 -81.7545 ...
    -81.7088 -81.7564 -81.8412 -81.6888];
y = [ 26.7185 26.7169 26.6994 26.6995 26.6939 26.6921 26.7226 ...
    26.7271 26.7268 26.6966 26.7318];
z = [4 5.75 5.75 5 4 3 5 6.5 5 3 6.5];

[sortx,ix]=sort(x);
zsort=z(ix);
figure;plot(sortx,zsort,'*-')





i=[192 192 193 194 195 196 197 197 198 198 199  199 199 199 ...
    199 199 199 199 199 199 ...
    199 199 199 199 199 199 199 199 199 199 ...
    199 199 199 199 199 199 199 199]-1;
j=[150 149 149 149 149 148 148 147 147 148 120:147];

z=[3 3 4 5 5.5 5.5 5.5 5.5 5.5 5.5 ones(1,25).*6 6.5 6.5 6.5];

for m=1:length(i),
    h_m(i(m),j(m))=z(m);
end

% h_m(i,j)=z;
nc_varput(fname,'h',h_m);


hplot=h_m;
hplot(~mask) = nan;

figure;
pcolor(hplot)
colorbar
title('fixed')

