Changeset 22505
- Timestamp:
- 03/07/18 10:18:54 (7 years ago)
- Location:
- issm/trunk-jpl/src/m/classes
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
issm/trunk-jpl/src/m/classes/linearbasalforcings.m
r22136 r22505 79 79 yts=md.constants.yts; 80 80 81 floatingice_melting_rate=zeros(md.mesh.numberofvertices,1);82 floatingice_melting_rate(find(md.geometry.base<=md.basalforcings.deepwater_elevation(1,1)))=md.basalforcings.deepwater_melting_rate(1,1);83 pos=find(md.geometry.base>md.basalforcings.deepwater_elevation(1,1) & md.geometry.base<md.basalforcings.upperwater_elevation(1,1));84 floatingice_melting_rate(pos)=md.basalforcings.deepwater_melting_rate(1,1)*(md.geometry.base(pos)-md.basalforcings.upperwater_elevation(1,1))/(md.basalforcings.deepwater_elevation(1,1)-md.basalforcings.upperwater_elevation(1,1));85 81 WriteData(fid,prefix,'name','md.basalforcings.model','data',2,'format','Integer'); 86 WriteData(fid,prefix,'data',floatingice_melting_rate,'format','DoubleMat','name','md.basalforcings.floatingice_melting_rate','mattype',1,'scale',1./yts,'timeserieslength',md.mesh.numberofvertices+1,'yts',md.constants.yts)87 82 WriteData(fid,prefix,'object',self,'fieldname','groundedice_melting_rate','format','DoubleMat','name','md.basalforcings.groundedice_melting_rate','mattype',1,'scale',1./yts,'timeserieslength',md.mesh.numberofvertices+1,'yts',md.constants.yts) 88 83 WriteData(fid,prefix,'object',self,'fieldname','geothermalflux','name','md.basalforcings.geothermalflux','format','DoubleMat','mattype',1,'timeserieslength',md.mesh.numberofvertices+1,'yts',md.constants.yts); -
issm/trunk-jpl/src/m/classes/linearbasalforcings.py
r22150 r22505 92 92 yts=md.constants.yts 93 93 94 floatingice_melting_rate = np.zeros((md.mesh.numberofvertices))95 96 pos = np.nonzero(md.geometry.base <= md.basalforcings.deepwater_elevation)97 floatingice_melting_rate[pos] = md.basalforcings.deepwater_melting_rate[0][0]98 99 pos = np.nonzero(np.logical_and(md.geometry.base > md.basalforcings.deepwater_elevation, md.geometry.base < md.basalforcings.upperwater_elevation))100 101 floatingice_melting_rate[pos] = md.basalforcings.deepwater_melting_rate[0][0] * (md.geometry.base[pos] - md.basalforcings.upperwater_elevation) / (md.basalforcings.deepwater_elevation - md.basalforcings.upperwater_elevation)102 103 94 WriteData(fid,prefix,'name','md.basalforcings.model','data',2,'format','Integer') 104 WriteData(fid,prefix,'data',floatingice_melting_rate,'name','md.basalforcings.floatingice_melting_rate','format','DoubleMat','mattype',1,'scale',1./yts,'timeserieslength',md.mesh.numberofvertices+1,'yts',md.constants.yts)105 95 WriteData(fid,prefix,'object',self,'fieldname','groundedice_melting_rate','name','md.basalforcings.groundedice_melting_rate','format','DoubleMat','mattype',1,'scale',1./yts,'timeserieslength',md.mesh.numberofvertices+1,'yts',md.constants.yts) 106 96 WriteData(fid,prefix,'object',self,'fieldname','geothermalflux','name','md.basalforcings.geothermalflux','format','DoubleMat','mattype',1,'timeserieslength',md.mesh.numberofvertices+1,'yts',md.constants.yts) -
issm/trunk-jpl/src/m/classes/mismipbasalforcings.m
r21049 r22505 85 85 end 86 86 87 floatingice_melting_rate=zeros(md.mesh.numberofvertices,1);88 floatingice_melting_rate=md.basalforcings.meltrate_factor*tanh((md.geometry.base-md.geometry.bed)./md.basalforcings.threshold_thickness).*max(md.basalforcings.upperdepth_melt-md.geometry.base,0);89 90 87 WriteData(fid,prefix,'name','md.basalforcings.model','data',3,'format','Integer'); 91 WriteData(fid,prefix,'data',floatingice_melting_rate,'format','DoubleMat','name','md.basalforcings.floatingice_melting_rate','mattype',1,'scale',1./yts,'timeserieslength',md.mesh.numberofvertices+1,'yts',md.constants.yts)92 88 WriteData(fid,prefix,'object',self,'fieldname','groundedice_melting_rate','format','DoubleMat','name','md.basalforcings.groundedice_melting_rate','mattype',1,'scale',1./yts,'timeserieslength',md.mesh.numberofvertices+1,'yts',md.constants.yts) 93 89 WriteData(fid,prefix,'object',self,'fieldname','geothermalflux','name','md.basalforcings.geothermalflux','format','DoubleMat','mattype',1,'timeserieslength',md.mesh.numberofvertices+1,'yts',md.constants.yts); -
issm/trunk-jpl/src/m/classes/mismipbasalforcings.py
r22267 r22505 86 86 print 'WARNING: value of yts for MISMIP+ runs different from ISSM default!' 87 87 88 floatingice_melting_rate = np.zeros((md.mesh.numberofvertices))89 floatingice_melting_rate = md.basalforcings.meltrate_factor*np.tanh((md.geometry.base-md.geometry.bed)/md.basalforcings.threshold_thickness)*(md.basalforcings.upperdepth_melt-md.geometry.base)90 91 88 WriteData(fid,prefix,'name','md.basalforcings.model','data',3,'format','Integer') 92 WriteData(fid,prefix,'data',floatingice_melting_rate,'format','DoubleMat','name','md.basalforcings.floatingice_melting_rate','mattype',1,'scale',1./yts,'timeserieslength',md.mesh.numberofvertices+1,'yts',md.constants.yts)93 89 WriteData(fid,prefix,'object',self,'fieldname','groundedice_melting_rate','format','DoubleMat','name','md.basalforcings.groundedice_melting_rate','mattype',1,'scale',1./yts,'timeserieslength',md.mesh.numberofvertices+1,'yts',md.constants.yts) 94 90 WriteData(fid,prefix,'object',self,'fieldname','geothermalflux','name','md.basalforcings.geothermalflux','format','DoubleMat','mattype',1,'timeserieslength',md.mesh.numberofvertices+1,'yts',md.constants.yts)
Note:
See TracChangeset
for help on using the changeset viewer.