Changeset 27090
- Timestamp:
- 06/22/22 15:44:24 (3 years ago)
- Location:
- issm/branches/trunk-larour-SLPS2022/src/m/classes
- Files:
-
- 1 added
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
issm/branches/trunk-larour-SLPS2022/src/m/classes/dslmme.m
r26358 r27090 49 49 end 50 50 51 %check time stamps: they should all be in seconds 52 %global_average_thermosteric_sea_level {{{ 53 for i=1:nt, 54 h=self.global_average_thermosteric_sea_level{i}; 55 times=h(end,:); 56 avgtime=mean(times) 57 if(avgtime<10000) 58 error('dslmme checkconsistency error messages: time tags for global_average_thermosteric_sea_level should be in seconds!'); 59 end 60 end %}}} 61 %sea_surface_height_above_geoid {{{ 62 for i=1:nt, 63 h=self.sea_surface_height_above_geoid{i}; 64 times=h(end,:); 65 avgtime=mean(times) 66 if(avgtime<10000) 67 error('dslmme checkconsistency error messages: time tags for sea_surface_height_above_geoid should be in seconds!'); 68 end 69 end %}}} 70 %sea_water_pressure_at_sea_floor {{{ 71 for i=1:nt, 72 h=self.sea_water_pressure_at_sea_floor{i}; 73 times=h(end,:); 74 avgtime=mean(times) 75 if(avgtime<10000) 76 error('dslmme checkconsistency error messages: time tags for sea_water_pressure_at_sea_floor should be in seconds!'); 77 end 78 end %}}} 79 51 80 end % }}} 52 81 function disp(self) % {{{ … … 63 92 WriteData(fid,prefix,'object',self,'fieldname','modelid','format','Double'); 64 93 WriteData(fid,prefix,'name','md.dsl.nummodels','data',length(self.global_average_thermosteric_sea_level),'format','Integer'); 65 WriteData(fid,prefix,'object',self,'fieldname','global_average_thermosteric_sea_level','format','MatArray','timeseries',1,'timeserieslength',2 );66 WriteData(fid,prefix,'object',self,'fieldname','sea_water_pressure_at_sea_floor','format','MatArray','timeseries length',md.mesh.numberofvertices+1);67 WriteData(fid,prefix,'object',self,'fieldname','sea_surface_height_above_geoid','format','MatArray','timeseries length',md.mesh.numberofvertices+1);94 WriteData(fid,prefix,'object',self,'fieldname','global_average_thermosteric_sea_level','format','MatArray','timeseries',1,'timeserieslength',2,'yts',md.constants.yts); 95 WriteData(fid,prefix,'object',self,'fieldname','sea_water_pressure_at_sea_floor','format','MatArray','timeseries',1,'timeserieslength',md.mesh.numberofvertices+1,'yts',md.constants.yts); 96 WriteData(fid,prefix,'object',self,'fieldname','sea_surface_height_above_geoid','format','MatArray','timeseries',1,'timeserieslength',md.mesh.numberofvertices+1,'yts',md.constants.yts); 68 97 69 98 end % }}} -
issm/branches/trunk-larour-SLPS2022/src/m/classes/mmeofflinesolidearthsolution.m
r27068 r27090 50 50 end 51 51 52 %check time stamps: they should all be in seconds 53 %displacementup {{{ 54 for i=1:nt, 55 h=self.displacementup{i}; 56 times=h(end,:); 57 avgtime=mean(times) 58 if(avgtime<10000) 59 error('dslmme checkconsistency error messages: time tags for displacementup should be in seconds!'); 60 end 61 end %}}} 62 %geoid {{{ 63 for i=1:nt, 64 h=self.geoid{i}; 65 times=h(end,:); 66 avgtime=mean(times) 67 if(avgtime<10000) 68 error('dslmme checkconsistency error messages: time tags for geoid should be in seconds!'); 69 end 70 end %}}} 71 %displacementeast {{{ 72 for i=1:nt, 73 h=self.displacementeast{i}; 74 times=h(end,:); 75 avgtime=mean(times) 76 if(avgtime<10000) 77 error('dslmme checkconsistency error messages: time tags for displacementeast should be in seconds!'); 78 end 79 end %}}} 80 %displacementnorth {{{ 81 for i=1:nt, 82 h=self.displacementnorth{i}; 83 times=h(end,:); 84 avgtime=mean(times) 85 if(avgtime<10000) 86 error('dslmme checkconsistency error messages: time tags for displacementnorth should be in seconds!'); 87 end 88 end %}}} 52 89 53 90 end % }}} -
issm/branches/trunk-larour-SLPS2022/src/m/classes/model.m
r26831 r27090 36 36 hydrology = 0; 37 37 masstransport = 0; 38 mmemasstransport = 0; 38 39 thermal = 0; 39 40 steadystate = 0; … … 194 195 %VV 195 196 if ~isa(md.stochasticforcing,'stochasticforcing'); md.stochasticforcing=stochasticforcing(); end 197 %Mmetransport: Jun 2022: 198 if ~isa(md.mmemasstransport,'mmemasstransport'); md.mmemasstransport=mmemasstransport(); end; 199 196 200 end% }}} 197 201 end … … 236 240 disp(sprintf('%19s: %-22s -- %s','hydrology' ,['[1x1 ' class(self.hydrology) ']'],'parameters for hydrology solution')); 237 241 disp(sprintf('%19s: %-22s -- %s','masstransport' ,['[1x1 ' class(self.masstransport) ']'],'parameters for masstransport solution')); 242 disp(sprintf('%19s: %-22s -- %s','mmemasstransport',['[1x1 ' class(self.mmemasstransport) ']'],'parameters for mmemasstransport solution')); 238 243 disp(sprintf('%19s: %-22s -- %s','thermal' ,['[1x1 ' class(self.thermal) ']'],'parameters for thermal solution')); 239 244 disp(sprintf('%19s: %-22s -- %s','steadystate' ,['[1x1 ' class(self.steadystate) ']'],'parameters for steadystate solution')); … … 283 288 md.hydrology = hydrologyshreve(); 284 289 md.masstransport = masstransport(); 290 md.mmemasstransport = mmemasstransport(); 285 291 md.thermal = thermal(); 286 292 md.steadystate = steadystate(); … … 445 451 md.masstransport.spcthickness=project2d(md,md.masstransport.spcthickness,md.mesh.numberoflayers); 446 452 end 453 if numel(md.mmemasstransport.spcthickness)>1, 454 md.mmemasstransport.deltathickness=project2d(md,md.mmemasstransport.deltathickness,md.mesh.numberoflayers); 455 end 456 447 457 if numel(md.damage.spcdamage)>1, 448 458 md.damage.spcdamage=project2d(md,md.damage.spcdamage,md.mesh.numberoflayers); … … 1181 1191 md.thermal=md.thermal.extrude(md); 1182 1192 md.masstransport=md.masstransport.extrude(md); 1193 md.mmemasstransport=md.mmemasstransport.extrude(md); 1183 1194 md.levelset=extrude(md.levelset,md); 1184 1195 md.calving=extrude(md.calving,md); … … 1281 1292 if isfield(structmd,'penalties'), md.masstransport.vertex_pairing=structmd.penalties; end 1282 1293 if isfield(structmd,'penalty_offset'), md.masstransport.penalty_factor=structmd.penalty_offset; end 1294 if isfield(structmd,'deltathickness'), md.mmemasstransport.deltathickness=structmd.deltathickness; end 1295 if isfield(structmd,'partition'), md.mmemasstransport.partition=structmd.partition; end 1296 if isfield(structmd,'ids'), md.mmemasstransport.ids=structmd.ids; end 1283 1297 if isfield(structmd,'B'), md.materials.rheology_B=structmd.B; end 1284 1298 if isfield(structmd,'n'), md.materials.rheology_n=structmd.n; end -
issm/branches/trunk-larour-SLPS2022/src/m/classes/offlinesolidearthsolution.m
r27068 r27090 29 29 end % }}} 30 30 function marshall(self,prefix,md,fid) % {{{ 31 disp(sprintf(' external (offlinesolidearthsolution) solution:'));31 %disp(sprintf(' external (offlinesolidearthsolution) solution:')); 32 32 WriteData(fid,prefix,'data',2,'name','md.solidearth.external.nature','format','Integer'); %code 2 for offlinesolidearthsolution class 33 33 self.marshall@solidearthsolution(prefix,md,fid); -
issm/branches/trunk-larour-SLPS2022/src/m/classes/solidearthsolution.m
r27067 r27090 38 38 function md = checkconsistency(self,md,solution,analyses) % {{{ 39 39 40 md = checkfield(md,'fieldname','solidearth.external.displacementeast','Inf',1,'timeseries',1); 41 md = checkfield(md,'fieldname','solidearth.external.displacementnorth','Inf',1,'timeseries',1); 40 if md.solidearth.settings.horiz, 41 md = checkfield(md,'fieldname','solidearth.external.displacementeast','Inf',1,'timeseries',1); 42 md = checkfield(md,'fieldname','solidearth.external.displacementnorth','Inf',1,'timeseries',1); 43 end 42 44 md = checkfield(md,'fieldname','solidearth.external.displacementup','Inf',1,'timeseries',1); 43 45 md = checkfield(md,'fieldname','solidearth.external.geoid','Inf',1,'timeseries',1); -
issm/branches/trunk-larour-SLPS2022/src/m/classes/transient.m
r26358 r27090 8 8 issmb = 0; 9 9 ismasstransport = 0; 10 ismmemasstransport = 0; 10 11 isoceantransport = 0; 11 12 isstressbalance = 0; … … 36 37 self.issmb = 0; 37 38 self.ismasstransport = 0; 39 self.ismmemasstransport= 0; 38 40 self.isoceantransport = 0; 39 41 self.isstressbalance = 0; … … 57 59 self.issmb = 1; 58 60 self.ismasstransport = 1; 61 self.ismmemasstransport= 0; 59 62 self.isoceantransport = 0; 60 63 self.isstressbalance = 1; … … 87 90 md = checkfield(md,'fieldname','transient.issmb','numel',[1],'values',[0 1]); 88 91 md = checkfield(md,'fieldname','transient.ismasstransport','numel',[1],'values',[0 1]); 92 md = checkfield(md,'fieldname','transient.ismmemasstransport','numel',[1],'values',[0 1]); 89 93 md = checkfield(md,'fieldname','transient.isoceantransport','numel',[1],'values',[0 1]); 90 94 md = checkfield(md,'fieldname','transient.isstressbalance','numel',[1],'values',[0 1]); … … 113 117 fielddisplay(self,'issmb','indicates whether a surface mass balance solution is used in the transient'); 114 118 fielddisplay(self,'ismasstransport','indicates whether a masstransport solution is used in the transient'); 119 fielddisplay(self,'ismmemasstransport','indicates whether an MME masstransport solution is used in the transient'); 115 120 fielddisplay(self,'isoceantransport','indicates whether an ocean masstransport solution is used in the transient'); 116 121 fielddisplay(self,'isstressbalance','indicates whether a stressbalance solution is used in the transient'); … … 131 136 WriteData(fid,prefix,'object',self,'fieldname','issmb','format','Boolean'); 132 137 WriteData(fid,prefix,'object',self,'fieldname','ismasstransport','format','Boolean'); 138 WriteData(fid,prefix,'object',self,'fieldname','ismmemasstransport','format','Boolean'); 133 139 WriteData(fid,prefix,'object',self,'fieldname','isoceantransport','format','Boolean'); 134 140 WriteData(fid,prefix,'object',self,'fieldname','isstressbalance','format','Boolean'); … … 157 163 writejsdouble(fid,[modelname '.trans.issmb'],self.issmb); 158 164 writejsdouble(fid,[modelname '.trans.ismasstransport'],self.ismasstransport); 165 writejsdouble(fid,[modelname '.trans.ismmemasstransport'],self.ismmemasstransport); 159 166 writejsdouble(fid,[modelname '.trans.isoceantransport'],self.isoceantransport); 160 167 writejsdouble(fid,[modelname '.trans.isstressbalance'],self.isstressbalance);
Note:
See TracChangeset
for help on using the changeset viewer.