Changeset 27058
- Timestamp:
- 06/10/22 16:58:32 (3 years ago)
- Location:
- issm/branches/trunk-larour-SLPS2022/src/m/classes
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
issm/branches/trunk-larour-SLPS2022/src/m/classes/sealevelmodel.m
r26358 r27058 237 237 mdi=self.icecaps{i}; 238 238 mdi=TwoDToThreeD(mdi,self.planet); 239 239 240 240 241 %for elements: 241 242 xei=mdi.mesh.x(mdi.mesh.elements)*[1;1;1]/3; … … 246 247 247 248 self.transitions{end+1}=meshintersect3d(self.earth.mesh.x,self.earth.mesh.y,self.earth.mesh.z,mdi.mesh.x,mdi.mesh.y,mdi.mesh.z,'force',force); 248 249 249 self.eltransitions{end+1}=meshintersect3d(xe,ye,ze,xei,yei,zei,'force',force); 250 250 end … … 410 410 %Create mesh radius: 411 411 self.earth.mesh.r=planetradius('earth')*ones(md.mesh.numberofvertices,1); 412 self.earth.mesh.lat = asind(self.earth.mesh.z./self.earth.mesh.r); 413 self.earth.mesh.long = atan2d(self.earth.mesh.y,self.earth.mesh.x); 414 412 415 413 416 end % }}} -
issm/branches/trunk-larour-SLPS2022/src/m/classes/solidearthsolution.m
r26358 r27058 48 48 49 49 %transform our time series into time series rates 50 if size(self.displacementeast,2)==1 51 disp('External solidearthsolution warning: only one time step provided, assuming the values are rates per year'); 52 displacementeast_rate=[self.displacementeast;0]; 53 displacementnorth_rate=[self.displacementnorth;0]; 54 displacementup_rate=[self.displacementup;0]; 55 geoid_rate=[self.geoid;0]; 56 else 57 time=self.displacementeast(end,:); 58 dt=diff(time,1,2); 59 displacementeast_rate=diff(self.displacementeast(1:end-1,:),1,2)./dt; 60 displacementeast_rate(end+1,:)=time(1:end-1); 61 displacementnorth_rate=diff(self.displacementnorth(1:end-1,:),1,2)./dt; 62 displacementnorth_rate(end+1,:)=time(1:end-1); 63 displacementup_rate=diff(self.displacementup(1:end-1,:),1,2)./dt; 64 displacementup_rate(end+1,:)=time(1:end-1); 65 geoid_rate=diff(self.geoid(1:end-1,:),1,2)./dt; 66 geoid_rate(end+1,:)=time(1:end-1); 50 if ~isempty(self.displacementup), 51 if size(self.displacementup,2)==1 52 disp('External solidearthsolution warning: only one time step provided, assuming the values are rates per year'); 53 displacementup_rate=[self.displacementup;0]; 54 geoid_rate=[self.geoid;0]; 55 else 56 time=self.displacementup(end,:); 57 dt=diff(time,1,2); 58 displacementup_rate=diff(self.displacementup(1:end-1,:),1,2)./dt; 59 displacementup_rate(end+1,:)=time(1:end-1); 60 geoid_rate=diff(self.geoid(1:end-1,:),1,2)./dt; 61 geoid_rate(end+1,:)=time(1:end-1); 62 end 63 end; 64 if md.solidearth.settings.horiz, 65 if ~isempty(self.displacementeast), 66 if size(self.displacementeast,2)==1 67 disp('External solidearthsolution warning: only one time step provided, assuming the values are rates per year'); 68 displacementeast_rate=[self.displacementeast;0]; 69 displacementnorth_rate=[self.displacementnorth;0]; 70 else 71 time=self.displacementeast(end,:); 72 dt=diff(time,1,2); 73 displacementeast_rate=diff(self.displacementeast(1:end-1,:),1,2)./dt; 74 displacementeast_rate(end+1,:)=time(1:end-1); 75 displacementnorth_rate=diff(self.displacementnorth(1:end-1,:),1,2)./dt; 76 displacementnorth_rate(end+1,:)=time(1:end-1); 77 end 78 end 67 79 end 68 80 81 69 82 WriteData(fid, prefix, 'name', 'md.solidearth.external.nature', 'data', 0, 'format', 'Integer'); 70 WriteData(fid,prefix,'object',self,'fieldname','displacementeast','data',displacementeast_rate,'format','DoubleMat','name', 'md.solidearth.external.displacementeast','mattype',1,'scale',1./yts,'timeserieslength',md.mesh.numberofvertices+1,'yts',yts);71 83 WriteData(fid,prefix,'object',self,'fieldname','displacementup','data',displacementup_rate,'format','DoubleMat','name', 'md.solidearth.external.displacementup','mattype',1,'scale',1./yts,'timeserieslength',md.mesh.numberofvertices+1,'yts',yts); 72 WriteData(fid,prefix,'object',self,'fieldname','displacementnorth','data',displacementnorth_rate,'format','DoubleMat','name', 'md.solidearth.external.displacementnorth','mattype',1,'scale',1./yts,'timeserieslength',md.mesh.numberofvertices+1,'yts',yts);73 84 WriteData(fid,prefix,'object',self,'fieldname','geoid','data',geoid_rate,'format','DoubleMat','name', 'md.solidearth.external.geoid','mattype',1,'scale',1./yts,'timeserieslength',md.mesh.numberofvertices+1,'yts',yts); 85 86 if md.solidearth.settings.horiz, 87 WriteData(fid,prefix,'object',self,'fieldname','displacementeast','data',displacementeast_rate,'format','DoubleMat','name', 'md.solidearth.external.displacementeast','mattype',1,'scale',1./yts,'timeserieslength',md.mesh.numberofvertices+1,'yts',yts); 88 89 WriteData(fid,prefix,'object',self,'fieldname','displacementnorth','data',displacementnorth_rate,'format','DoubleMat','name', 'md.solidearth.external.displacementnorth','mattype',1,'scale',1./yts,'timeserieslength',md.mesh.numberofvertices+1,'yts',yts); 90 end 74 91 75 92 end % }}}
Note:
See TracChangeset
for help on using the changeset viewer.