Changeset 856


Ignore:
Timestamp:
06/09/09 08:23:14 (16 years ago)
Author:
Mathieu Morlighem
Message:

new way of correcting thickness at the GL (Bamber)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • issm/trunk/src/m/classes/public/ThicknessCorrection.m

    r41 r856  
    1 function md=ThicknessCorrection(md,filename,distance)
     1function md=ThicknessCorrection(md,varargin)
    22%THICKNESSCORRECTION - correct the thickness of the ice shelf near the grounding line
    33%
    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
    1211%
    1312%   Usage:
    14 %      md=ThicknessCorrection(md,filename,distance)
     13%      md=ThicknessCorrection(md,varargin);
     14%
     15%   Example:
     16%      md=ThicknessCorrection(md);
     17%      md=ThicknessCorrection(md,15000);
    1518
    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
     20thickness=md.thickness;
     21thickness_hydro=md.surface/(1-md.rho_ice/md.rho_water);
     22
     23%get nodes on ice sheet and on ice shelf
     24pos_shelf=find(~md.gridonicesheet);
     25pos_GL=intersect(unique(md.elements(find(md.elementonicesheet),:)),unique(md.elements(find(md.elementoniceshelf),:)));
     26
     27%get distance
     28if nargin==2,
     29        distance=varargin{1};
     30else
     31        distance=10000;
    1932end
    2033
    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
    2435for i=1:length(pos_shelf)
    2536        %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
    3051end
    3152
    3253%check the computed thickness
    33 di=md.rho_ice/md.rho_water;
    34 minth=1/(1-di);
     54minth=1/(1-md.rho_ice/md.rho_water);
    3555pos=find(isnan(md.thickness) | (md.thickness<=0));
    36 md.thickness(pos)=minth;
     56thickness(pos)=minth;
    3757
    3858%change bed to take into account the changes in thickness
     59md.thickness=thickness;
    3960md.bed=md.surface-md.thickness;
Note: See TracChangeset for help on using the changeset viewer.