Changeset 8676


Ignore:
Timestamp:
06/20/11 13:43:02 (14 years ago)
Author:
schlegel
Message:

Add check for duplicate timesteps

File:
1 edited

Legend:

Unmodified
Added
Removed
  • TabularUnified issm/trunk/src/m/model/ismodelselfconsistent.m ΒΆ

    r8652 r8676  
    303303        %Check that forcing columns are properly ordered
    304304        for i=1:length(forcingnames),
    305                 if md.forcings.(forcingnames{i})(end,:)~=sort(md.forcings.(forcingnames{i})(end,:)),
     305                if any(md.forcings.(forcingnames{i})(end,:)~=sort(md.forcings.(forcingnames{i})(end,:))),
    306306                        message(['model not consistent: model ' md.name ' forcings.' forcingnames{i} ' columns should be chronological']);
    307307                end
    308         end
    309 
     308                if any(md.forcings.(forcingnames{i})(end,1:end-1)==md.forcings.(forcingnames{i})(end,2:end)),
     309                        message(['model not consistent: model ' md.name ' forcings.' forcingnames{i} ' columns must not contain duplicate timesteps']);
     310                end
     311        end
    310312end
    311313%}}}
Note: See TracChangeset for help on using the changeset viewer.