Changes between Version 1 and Version 2 of shelf_thickness


Ignore:
Timestamp:
10/12/10 14:39:19 (14 years ago)
Author:
Mathieu Morlighem
Comment:

Added ThicknessCorrection

Legend:

Unmodified
Added
Removed
Modified
  • shelf_thickness

    v1 v2  
    11== Matlab file ==
     2
     3{{{
     4#!m
    25
    36%Paths to datasets
     
    2326%Correct thickness using Bamber's dem
    2427md=ThicknessCorrection(md,15000);
     28}}}
     29ThicknessCorrection is the following routine:
     30
     31{{{
     32#!m
     33
     34function md=ThicknessCorrection(md,distance)
     35%THICKNESSCORRECTION - correct the thickness of the ice shelf near the grounding line
     36%
     37%   This routine corrects the thickness and the bed on the transition zone
     38%   by forcing the hydrostatic equilibrium.
     39%   the thickness is modified as follows:
     40%      thickness = coeff * thickness_observation + (1-coeff) * thickness_hydrostatic
     41%   where:
     42%      coeff=(d/distance)^2;
     43%      distance=10km by default but can be specified
     44%
     45%   Usage:
     46%      md=ThicknessCorrection(md,distance);
     47%
     48%   Example:
     49%      md=ThicknessCorrection(md,15000);
     50
     51%initialize thickness with the observations, and get hydrostatic thickness from the dem
     52thickness=md.thickness;
     53thickness_hydro=md.surface/(1-md.rho_ice/md.rho_water);
     54
     55%get nodes on ice sheet and on ice shelf
     56pos_shelf=find(~md.gridonicesheet);
     57pos_GL=intersect(unique(md.elements(find(md.elementonicesheet),:)),unique(md.elements(find(md.elementoniceshelf),:)));
     58debug=(length(pos_shelf)>50000);
     59
     60%modify thickness
     61if (debug), fprintf('%s','      correction progress:   0.00 %'); end
     62for i=1:length(pos_shelf)
     63
     64   %search the grid on ice sheet the closest to i
     65   [d posd]=min(sqrt((md.x(pos_shelf(i))-md.x(pos_GL)).^2+(md.y(pos_shelf(i))-md.y(pos_GL)).^2));
     66
     67   if d>distance,
     68
     69      %if d > 15km, hydrostatique equilibrium
     70      thickness(pos_shelf(i))=thickness_hydro(pos_shelf(i));
     71
     72   else
     73
     74      %else: quadratic combination of hydrostatic equilibrium and observations (this line might be commented if the original thickness is good close to the GL)
     75      coeff=(d/distance)^2;
     76      thickness(pos_shelf(i))=(1-coeff)*thickness(pos_shelf(i))+coeff*thickness_hydro(pos_shelf(i));
     77
     78   end
     79end
     80
     81%check the computed thickness
     82minth=1/(1-md.rho_ice/md.rho_water);
     83pos=find(isnan(md.thickness) | (md.thickness<=0));
     84thickness(pos)=minth;
     85
     86%change bed to take into account the changes in thickness
     87md.thickness=thickness;
     88md.bed=md.surface-md.thickness;
     89}}}