Changeset 856
- Timestamp:
- 06/09/09 08:23:14 (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
issm/trunk/src/m/classes/public/ThicknessCorrection.m
r41 r856 1 function md=ThicknessCorrection(md, filename,distance)1 function md=ThicknessCorrection(md,varargin) 2 2 %THICKNESSCORRECTION - correct the thickness of the ice shelf near the grounding line 3 3 % 4 % This routine corrects the thickness and the bed at the transition ice sheet - shelf 5 % due to the assumption of hydrostatic equilibrium. 6 % it treats the area given by the Argus file given in input as follows: 7 % 1: linearize the transition iceshelf ice sheet 8 % thickness = coeff * thickness_GL + (1-coeff) * thickness_shelf 9 % coeff = min(0,ditance to GL / distance) 10 % 2: take the minimum between this linearized thickness and the previous thickness 11 % thickness = min(linearized thickness, previous thickness) 4 % This routine corrects the thickness and the bed on the transition zone 5 % by forcing the hydrostatic equilibrium. 6 % the thickness is modified as follows: 7 % thickness = coeff * thickness_observation + (1-coeff) * thickness_hydrostatic 8 % where: 9 % coeff=(d/distance)^2; 10 % distance=10km by default but can be specified 12 11 % 13 12 % Usage: 14 % md=ThicknessCorrection(md,filename,distance) 13 % md=ThicknessCorrection(md,varargin); 14 % 15 % Example: 16 % md=ThicknessCorrection(md); 17 % md=ThicknessCorrection(md,15000); 15 18 16 %some checks 17 if ~exist(filename), 18 error(['ThicknessCorrection error message: the file ' filename ' does not exist']); 19 %initialize thickness with the observations, and get hydrostatic thickness from the dem 20 thickness=md.thickness; 21 thickness_hydro=md.surface/(1-md.rho_ice/md.rho_water); 22 23 %get nodes on ice sheet and on ice shelf 24 pos_shelf=find(~md.gridonicesheet); 25 pos_GL=intersect(unique(md.elements(find(md.elementonicesheet),:)),unique(md.elements(find(md.elementoniceshelf),:))); 26 27 %get distance 28 if nargin==2, 29 distance=varargin{1}; 30 else 31 distance=10000; 19 32 end 20 33 21 in=ContourToMesh(md.elements,md.x,md.y,expread(filename,1),'node',1); 22 pos_shelf=find(in & ~md.gridonicesheet); 23 pos_sheet=find(in & md.gridonicesheet); 34 %modify thickness 24 35 for i=1:length(pos_shelf) 25 36 %search the grid on ice sheet the closest to i 26 [d posd]=min(sqrt((md.x(pos_shelf(i))-md.x(pos_sheet)).^2+(md.y(pos_shelf(i))-md.y(pos_sheet)).^2)); 27 %thickness is minimum between hydrostatic equilibrium and thickness of the closest grid on ice sheet 28 coeff=min(1,d/distance); 29 md.thickness(pos_shelf(i))=min(coeff*md.thickness(pos_shelf(i))+(1-coeff)*md.thickness(pos_sheet(posd)),md.thickness(pos_shelf(i))); 37 [d posd]=min(sqrt((md.x(pos_shelf(i))-md.x(pos_GL)).^2+(md.y(pos_shelf(i))-md.y(pos_GL)).^2)); 38 39 if d>distance, 40 41 %if d > 15km, hydrostatique equilibrium 42 thickness(pos_shelf(i))=thickness_hydro(pos_shelf(i)); 43 44 else 45 46 %else: quadratic combination of hydrostatic equilibrium and observations 47 coeff=(d/distance)^2; 48 thickness(pos_shelf(i))=(1-coeff)*thickness(pos_shelf(i))+coeff*thickness_hydro(pos_shelf(i)); 49 50 end 30 51 end 31 52 32 53 %check the computed thickness 33 di=md.rho_ice/md.rho_water; 34 minth=1/(1-di); 54 minth=1/(1-md.rho_ice/md.rho_water); 35 55 pos=find(isnan(md.thickness) | (md.thickness<=0)); 36 md.thickness(pos)=minth;56 thickness(pos)=minth; 37 57 38 58 %change bed to take into account the changes in thickness 59 md.thickness=thickness; 39 60 md.bed=md.surface-md.thickness;
Note:
See TracChangeset
for help on using the changeset viewer.