


UPDATEGEOMETRY - update the geometry during after a time step
Update geometry once given a new thickness, in the transient solutions
Usage:
[new_bed,new_surface,new_thickness]=UpdateGeometry(md,new_thickness,bed,surface)

0001 function [new_bed,new_surface,new_thickness]=UpdateGeometry(md,new_thickness,bed,surface) 0002 %UPDATEGEOMETRY - update the geometry during after a time step 0003 % 0004 % Update geometry once given a new thickness, in the transient solutions 0005 % 0006 % Usage: 0007 % [new_bed,new_surface,new_thickness]=UpdateGeometry(md,new_thickness,bed,surface) 0008 0009 %initialize bed 0010 new_bed=zeros(md.numberofgrids,1); 0011 new_surface=zeros(md.numberofgrids,1); 0012 0013 %First, check that thickness is >0 0014 pos=find(new_thickness<0); 0015 new_thickness(pos)=10; %minimum thickness 0016 0017 %For grids on ice sheet, the new bed remains the same, the new surface becomes bed+new_thickness. 0018 pos=find(md.gridonicesheet); 0019 new_bed(pos)=bed(pos); 0020 new_surface(pos)=bed(pos)+new_thickness(pos); 0021 0022 %For grids on ice shelt, we have hydrostatic equilibrium (for now) 0023 pos=find(md.gridoniceshelf); 0024 new_bed(pos)=-md.rho_ice/md.rho_water*new_thickness(pos); 0025 new_surface(pos)=(1-md.rho_ice/md.rho_water)*new_thickness(pos); 0026 0027 %Deal with grounding line migration: later on.