Ignore:
Timestamp:
09/07/11 08:24:03 (14 years ago)
Author:
Mathieu Morlighem
Message:

temporary commit

File:
1 copied

Legend:

Unmodified
Added
Removed
  • issm/trunk/src/m/model/mask.m

    r9636 r9640  
    1 function md=geography(md,iceshelfname,icesheetname)
     1function md=setmask(md,floatingicename,groundedicename)
    22%GEOGRAPHY - establish boundaries between grounded and floating ice.
    33%
    4 %   By default, ice is considered grounded. The contour iceshelfname defines nodes
    5 %   for which ice is floating. The contour icesheetname defines nodes inside an iceshelf,
     4%   By default, ice is considered grounded. The contour floatingicename defines nodes
     5%   for which ice is floating. The contour groundedicename defines nodes inside an floatingice,
    66%   that are grounded (ie: ice rises, islands, etc ...)
    77%   All input files are in the Argus format (extension .exp).
    88%
    99%   Usage:
    10 %      md=geography(md,iceshelfname,icesheetname)
     10%      md=setmask(md,floatingicename,groundedicename)
    1111%
    1212%   Examples:
    13 %      md=geography(md,'all','');
    14 %      md=geography(md,'Iceshelves.exp','Islands.exp');
     13%      md=setmask(md,'all','');
     14%      md=setmask(md,'Iceshelves.exp','Islands.exp');
    1515
    1616%some checks on list of arguments
    1717if ((nargin~=3) | (nargout~=1)),
    18         help geography
    19         error('geography error message');
     18        help mask
     19        error('mask error message');
    2020end
    2121
     
    2525elements=md.elements;
    2626
    27 %Assign elementoniceshelf, elementonicesheet, nodeonicesheet and nodeoniceshelf. Only change at your own peril! This is synchronized heavily with the GroundingLineMigration module. {{{1
    28 elementoniceshelf=FlagElements(md,iceshelfname);
    29 elementonicesheet=FlagElements(md,icesheetname);
     27%Assign elementonfloatingice, elementongroundedice, vertexongroundedice and vertexonfloatingice. Only change at your own peril! This is synchronized heavily with the GroundingLineMigration module. {{{1
     28elementonfloatingice=FlagElements(md,floatingicename);
     29elementongroundedice=FlagElements(md,groundedicename);
    3030
    31 %Because icesheet nodes and elements can be included into an iceshelf, we need to update. Remember, all the previous
     31%Because groundedice nodes and elements can be included into an floatingice, we need to update. Remember, all the previous
    3232%arrays come from domain outlines that can intersect one another:
    33 elementoniceshelf=double((elementoniceshelf & ~elementonicesheet));
    34 elementonicesheet=double(~elementoniceshelf);
     33elementonfloatingice=double((elementonfloatingice & ~elementongroundedice));
     34elementongroundedice=double(~elementonfloatingice);
    3535
    36 %the order here is important. we choose nodeonicesheet as default on the grounding line.
    37 nodeoniceshelf=zeros(md.numberofnodes,1);
    38 nodeonicesheet=zeros(md.numberofnodes,1);
    39 nodeonicesheet(md.elements(find(elementonicesheet),:))=1;
    40 nodeoniceshelf(find(~nodeonicesheet))=1;
     36%the order here is important. we choose vertexongroundedice as default on the grounding line.
     37vertexonfloatingice=zeros(md.numberofnodes,1);
     38vertexongroundedice=zeros(md.numberofnodes,1);
     39vertexongroundedice(md.elements(find(elementongroundedice),:))=1;
     40vertexonfloatingice(find(~vertexongroundedice))=1;
    4141%}}}
    4242
    4343%Return:
    44 md.elementoniceshelf=elementoniceshelf;
    45 md.nodeoniceshelf=nodeoniceshelf;
    46 
    47 md.elementonicesheet=elementonicesheet;
    48 md.nodeonicesheet=nodeonicesheet;
    49 
    50 md.nodeonwater=zeros(md.numberofnodes,1);
    51 md.elementonwater=zeros(md.numberofelements,1);
     44md.mask.elementonfloatingice=elementonfloatingice;
     45md.mask.vertexonfloatingice=vertexonfloatingice;
     46md.mask.elementongroundedice=elementongroundedice;
     47md.mask.vertexongroundedice=vertexongroundedice;
     48md.mask.vertexonwater=zeros(md.numberofnodes,1);
     49md.mask.elementonwater=zeros(md.numberofelements,1);
Note: See TracChangeset for help on using the changeset viewer.