Changeset 20131


Ignore:
Timestamp:
02/11/16 19:35:45 (9 years ago)
Author:
Eric.Larour
Message:

CHG: no patch globe in the constructor (should be done downstream). Also added consistency checks.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • issm/trunk-jpl/src/m/classes/sealevelmodel.m

    r20110 r20131  
    3636                                %recover the earth model:
    3737                                slm.earth = getfieldvalue(options,'earth');
    38 
    39                                 %start plugging the ice caps into the earth model:
    40                                 earth=slm.earth;
    41                                 for i=1:length(slm.icecaps),
    42                                         icecap=slm.icecaps{i};
    43                                         icecap.mesh.segments=alignsegments(icecap.mesh.segments);
    44 
    45                                         %call patch routine:
    46                                         if icecap.mesh.epsg==3413, hem=1; else hem=-1; end
    47                                         earth.mesh=patchglobe(earth.mesh,icecap.mesh,'hem',hem,'bandwidth',bandwidths{i},'plot',1);
    48                                 end
    49 
    50                                
    51                                 %build transition matrices:
    52                                 %disp('sealevelmodel: building  icecap transition tables');
    53                                 %[C,ia,ib]=intersect([slm.earth.mesh.lat slm.earth.mesh.long],[slm.icecaps{i}.mesh.lat slm.icecaps{i}.mesh.long],'rows');
    54 
    55                                
    5638                        end
    5739                end
     
    6850                        if slm.earth.transient.iscoupler==0,
    6951                                error('sealevelmodel checkconsistenty error:  earth model should have the transient coupler option turned on!');
     52                        end
     53
     54                        %check that the transition vectors have the right size:
     55                        for i=1:length(slm.icecaps),
     56                                if slm.icecaps{i}.mesh.numberofvertices ~= length(slm.earth.slr.transitions{i}),
     57                                        error('sealevelmodel checkconsistenty issue with size of transition vectors!');
     58                                end
    7059                        end
    7160
Note: See TracChangeset for help on using the changeset viewer.