@@ -62,50 +62,54 @@ function checkconsistency(slm,solutiontype) % {{{
6262 error(' earth.solidearth.transfercount should be of size earth.mesh.numberofvertices' )
6363 end
6464
65- % check that the transition vectors have the right size:
65+ % check that slc is on
66+ if slm .earth .transient .isslc == 0
67+ error(' earth.transient.isslc should be turned on' )
68+ end
69+
6670 for i= 1 : length(slm .icecaps ),
67- if slm.icecaps{i }.mesh.numberofvertices ~= length(slm.earth.solidearth.transitions{i }),
68- error([' issue with size of transition vector for ice cap: ' num2str(i ) ' name: ' slm.icecaps{i }.miscellaneous.name]);
71+
72+ md= slm.icecaps{i };
73+
74+ % check that the transition vectors have the right size:
75+ if md .mesh .numberofvertices ~= length(slm.earth.solidearth.transitions{i }),
76+ error([' issue with size of transition vector for ice cap: ' num2str(i ) ' name: ' md .miscellaneous .name ]);
6977 end
70- end
71-
72- % check that runfrequency is the same everywhere:
73- for i= 1 : length(slm .icecaps )
74- if slm.icecaps{i }.solidearth.settings.runfrequency~= slm .earth .solidearth .settings .runfrequency
75- error([' icecap model ' slm.icecaps{i }.miscellaneous.name ' should have the same run frequency as earth!' ]);
78+
79+ % check that runfrequency is the same everywhere:
80+ if md .solidearth .settings .runfrequency ~= slm .earth .solidearth .settings .runfrequency
81+ error([' icecap model ' md .miscellaneous .name ' should have the same run frequency as earth!' ]);
7682 end
77- end
7883
79- % make sure steric_rate is the same everywhere:
80- for i= 1 : length(slm .icecaps )
81- md= slm.icecaps{i };
84+ % make sure steric_rate is the same everywhere:
8285 if ~isempty(find(md .dsl .sea_surface_height_above_geoid - slm .earth .dsl .sea_surface_height_above_geoid(slm.transitions{i })))
8386 error([' steric rate on ice cap ' md .miscellaneous .name ' is not the same as for the earth' ]);
8487 end
85- end
8688
87- % make sure grd is the same everywhere:
88- for i= 1 : length(slm .icecaps )
89- md= slm.icecaps{i };
89+ % make sure grd is the same everywhere:
9090 if md .solidearth .settings .isgrd ~= slm .earth .solidearth .settings .isgrd
9191 error([' isgrd on ice cap ' md .miscellaneous .name ' is not the same as for the earth' ]);
9292 end
93- end
9493
95- % make sure that there is no solid earth external forcing on the basins:
96- for i= 1 : length(slm .icecaps )
97- md= slm.icecaps{i };
94+ % make sure that there is no solid earth external forcing on the basins:
9895 if ~isempty(md .solidearth .external )
9996 error(' cannot run external forcings on an ice sheet when running a coupling earth/ice sheet model' );
10097 end
101- end
10298
103- % make sure that we have the right grd model for computing out sealevel patterns:
104- for i= 1 : length(slm .icecaps )
105- md= slm.icecaps{i };
99+ % make sure that there is no solid earth external forcing on the basins:
100+ if ~isempty(md .solidearth .external )
101+ error(' cannot run external forcings on an ice sheet when running a coupling earth/ice sheet model' );
102+ end
103+
104+ % make sure that we have the right grd model for computing out sealevel patterns:
106105 if md .solidearth .settings .grdmodel ~= 0
107106 error([' ice sheets do not run GRD module, specify solidearth.settings.grdmodel=0 on ice cap ' ,num2str(i )]);
108107 end
108+
109+ % make sure sea level change solver is on
110+ if md .transient .isslc == 0
111+ error([' isslc on ice cap ' md .miscellaneous .name ' is not turned off' ]);
112+ end
109113 end
110114
111115 end
0 commit comments