Changeset 9981
- Timestamp:
- 09/30/11 10:19:35 (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
issm/trunk/src/m/classes/model/model.m
r9959 r9981 232 232 if isfield(structmd,'surface'), md.geometry.surface=structmd.surface; end 233 233 if isfield(structmd,'bed'), md.geometry.bed=structmd.bed; end 234 if isfield(structmd,'thickness'), md.geometry.thickness=structmd.thickness; end 234 235 if isfield(structmd,'bathymetry'), md.geometry.bathymetry=structmd.bathymetry; end 235 236 if isfield(structmd,'thickness_coeff'), md.geometry.hydrostatic_ratio=structmd.thickness_coeff; end … … 270 271 if isfield(structmd,'z'), md.mesh.z=structmd.z; end 271 272 if isfield(structmd,'mask'), md.flaim.criterion=structmd.mask; end 273 if isfield(structmd,'pressureload'), md.diagnostic.icefront=structmd.pressureload; end 274 if isfield(structmd,'diagnostic_ref'), md.diagnostic.referential=structmd.diagnostic_ref; end 272 275 273 276 %Field changes … … 287 290 pos=find(structmd.spcvelocity(:,3)); md.diagnostic.spcvz(pos)=structmd.spcvelocity(pos,6); 288 291 end 289 if isfield(structmd,'spcv elocity'),292 if isfield(structmd,'spcvx'), 290 293 md.diagnostic.spcvx=NaN*ones(md.mesh.numberofvertices,1); 294 pos=find(~isnan(structmd.spcvx)); md.diagnostic.spcvx(pos)=structmd.spcvx(pos); 295 end 296 if isfield(structmd,'spcvy'), 291 297 md.diagnostic.spcvy=NaN*ones(md.mesh.numberofvertices,1); 298 pos=find(~isnan(structmd.spcvy)); md.diagnostic.spcvy(pos)=structmd.spcvy(pos); 299 end 300 if isfield(structmd,'spcvz'), 292 301 md.diagnostic.spcvz=NaN*ones(md.mesh.numberofvertices,1); 293 pos=find(structmd.spcvelocity(:,1)); md.diagnostic.spcvx(pos)=structmd.spcvelocity(pos,4); 294 pos=find(structmd.spcvelocity(:,2)); md.diagnostic.spcvy(pos)=structmd.spcvelocity(pos,5); 295 pos=find(structmd.spcvelocity(:,3)); md.diagnostic.spcvz(pos)=structmd.spcvelocity(pos,6); 302 pos=find(~isnan(structmd.spcvz)); md.diagnostic.spcvz(pos)=structmd.spcvz(pos); 296 303 end 297 304 if ismember(structmd.pressureload(end,end),[118 119 120]), 298 pos=find(structmd.pressureload(:,end)==120); md.diagnostic.icefront(pos,end)=0; 299 pos=find(structmd.pressureload(:,end)==118); md.diagnostic.icefront(pos,end)=1; 300 pos=find(structmd.pressureload(:,end)==119); md.diagnostic.icefront(pos,end)=2; 301 end 302 if (structmd.elements_type(end,end)>100), 303 pos=find(structmd.elements_type==59); md.mesh.elements_type(pos,end)=0; 304 pos=find(structmd.elements_type==55); md.mesh.elements_type(pos,end)=1; 305 pos=find(structmd.elements_type==56); md.mesh.elements_type(pos,end)=2; 306 pos=find(structmd.elements_type==60); md.mesh.elements_type(pos,end)=3; 307 pos=find(structmd.elements_type==62); md.mesh.elements_type(pos,end)=4; 308 pos=find(structmd.elements_type==57); md.mesh.elements_type(pos,end)=5; 309 pos=find(structmd.elements_type==58); md.mesh.elements_type(pos,end)=6; 310 pos=find(structmd.elements_type==61); md.mesh.elements_type(pos,end)=7; 305 pos=find(structmd.pressureload(:,end)==120); md.diagnostic.icefront(pos,:)=0; 306 pos=find(structmd.pressureload(:,end)==118); md.diagnostic.icefront(pos,:)=1; 307 pos=find(structmd.pressureload(:,end)==119); md.diagnostic.icefront(pos,:)=2; 308 end 309 if isfield(structmd,'elements_type') & structmd.elements_type(end,end)>50, 310 pos=find(structmd.elements_type==59); md.flowequation.element_equation(pos,end)=0; 311 pos=find(structmd.elements_type==55); md.flowequation.element_equation(pos,end)=1; 312 pos=find(structmd.elements_type==56); md.flowequation.element_equation(pos,end)=2; 313 pos=find(structmd.elements_type==60); md.flowequation.element_equation(pos,end)=3; 314 pos=find(structmd.elements_type==62); md.flowequation.element_equation(pos,end)=4; 315 pos=find(structmd.elements_type==57); md.flowequation.element_equation(pos,end)=5; 316 pos=find(structmd.elements_type==58); md.flowequation.element_equation(pos,end)=6; 317 pos=find(structmd.elements_type==61); md.flowequation.element_equation(pos,end)=7; 318 end 319 if isfield(structmd,'vertices_type') & structmd.vertices_type(end,end)>50, 320 pos=find(structmd.vertices_type==59); md.flowequation.vertex_equation(pos,end)=0; 321 pos=find(structmd.vertices_type==55); md.flowequation.vertex_equation(pos,end)=1; 322 pos=find(structmd.vertices_type==56); md.flowequation.vertex_equation(pos,end)=2; 323 pos=find(structmd.vertices_type==60); md.flowequation.vertex_equation(pos,end)=3; 324 pos=find(structmd.vertices_type==62); md.flowequation.vertex_equation(pos,end)=4; 325 pos=find(structmd.vertices_type==57); md.flowequation.vertex_equation(pos,end)=5; 326 pos=find(structmd.vertices_type==58); md.flowequation.vertex_equation(pos,end)=6; 327 pos=find(structmd.vertices_type==61); md.flowequation.vertex_equation(pos,end)=7; 311 328 end 312 329 if isfield(structmd,'rheology_law') & isnumeric(structmd.rheology_law), … … 335 352 pos=find(structmd.cm_responses==388); md.inversion.cost_functions(pos)=502; 336 353 pos=find(structmd.cm_responses==382); md.inversion.cost_functions(pos)=503; 354 end 355 if isfield(structmd,'artificial_diffusivity') & structmd.artificial_diffusivity==2, 356 md.thermal.stabilization=2; 357 md.prognostic.stabilization=1; 358 md.balancethickness.stabilization=1; 337 359 end 338 360
Note:
See TracChangeset
for help on using the changeset viewer.