source: issm/trunk-jpl/src/m/materials/DepthAvgTempCond.m@ 17961

Last change on this file since 17961 was 17961, checked in by Eric.Larour, 11 years ago

CHG: conductive profile on an ice sheet, thermal computation.

File size: 772 bytes
Line 
1function Tbar=DepthAvgTempCond(md)
2%DEPTHAVGTEMPCOND- compute conduction dependent temperature profile for an ice sheet.
3%
4% Usage:
5% Tbar=DepthAvgTempCond(md)
6
7Tpmp=TMeltingPoint(md.materials.meltingpoint,0); %pressure melting point at 0 pressure.
8k=md.materials.thermalconductivity;
9G=md.basalforcings.geothermalflux;
10H=md.geometry.thickness;
11Ts=md.initialization.temperature;
12alpha=G.*H/k;
13
14Tbar=zeros(md.mesh.numberofvertices,1);
15
16%find temperature average when we are below melting point:
17pos=find( (Ts+alpha) <Tpmp);
18Tbar(pos)=Ts(pos)+alpha(pos)/2;
19
20pos=find( (Ts+alpha) >=Tpmp);
21Tbar(pos)=Tpmp+(Tpmp^2-Ts(pos).^2)/2./alpha(pos)+ Tpmp*(Ts(pos)-Tpmp)./alpha(pos);
22
23%on ice shelf, easier:
24pos=find(md.mask.groundedice_levelset<=0);
25Tbar(pos)=(Ts(pos)+Tpmp)/2;
Note: See TracBrowser for help on using the repository browser.