Changeset 14813


Ignore:
Timestamp:
04/30/13 12:24:41 (12 years ago)
Author:
Eric.Larour
Message:

CHG: check consistency of thickness transient forcing

File:
1 edited

Legend:

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

    r14807 r14813  
    3030                        md = checkfield(md,'gia.cross_section_shape','numel',[1],'values',[1,2]);
    3131
     32                        %be sure that if we are running a prognostic ice flow model coupled with gia, that thickness forcings
     33                        %are not provided into the future.
     34                        if md.transient.isprognostic,
     35                                thickness=md.geometry.thickness;
     36                                %figure out if thickness is a transient forcing:
     37                                s=size(thickness);
     38                                if s(1)>=md.mesh.numberofvertices,
     39                                        %recover the furthest time "in time":
     40                                        time=thickness(end,end);
     41                                        if(time~=md.timestepping.start_time),
     42                                                error('if isprognostic is on, transient thickness forcing for the gia model should not be provided in the future. Synchronize your start_time to correspond to the most recent transient thickness forcing timestep');
     43                                        end
     44                                end
     45                        end
     46
    3247                end % }}}
    3348                function disp(obj) % {{{
Note: See TracChangeset for help on using the changeset viewer.