source: issm/oecreview/Archive/16554-17801/ISSM-17714-17715.diff@ 17802

Last change on this file since 17802 was 17802, checked in by Mathieu Morlighem, 11 years ago

Added archives

File size: 1.7 KB
RevLine 
[17802]1Index: ../trunk-jpl/src/m/mech/robintemperature.py
2===================================================================
3--- ../trunk-jpl/src/m/mech/robintemperature.py (revision 0)
4+++ ../trunk-jpl/src/m/mech/robintemperature.py (revision 17715)
5@@ -0,0 +1,41 @@
6+import numpy as npy
7+from scipy.special import erf
8+
9+def robintemperature(heatflux,accumrate,thickness,surftemp,z):
10+ '''
11+ Compute vertical temperature profile of an ice sheet (Robin, 1955)
12+
13+ This routine computes the vertical temperature profile of an ice sheet
14+ according to the solution of Robin (1955), neglecting friction and
15+ horizontal advection. The solution is thus most appropriate at an ice
16+ divide.
17+
18+ The coordinate system for the solution runs from z=0 at the base
19+ to z=H at the surface of the ice.
20+
21+ Parameters (SI units):
22+ -heatflux Geothermal heat flux (W m^-2)
23+ -accumrate Surface accumulation rate (m s^-1 ice equivalent)
24+ -thickness Ice thickness (m)
25+ -surftemp Surface temperature (K)
26+ -z Vertical position at which to calculate temperature
27+ (z can be a scalar or a vector)
28+
29+ Returns a vector the same length as z containing the temperature in K
30+
31+ Usage:
32+ tprofile=robintemperature(heatflux,accumrate,thickness,surftemp,z)
33+ '''
34+
35+ # some constants (from Holland and Jenkins, 1999)
36+ alphaT=1.14e-6 # thermal diffusivity (m^2 s^-1)
37+ c=2009. # specific heat capacity (J kg^-1 K^-1)
38+ rho=917. # ice density (kg m^-3)
39+
40+ #create vertical coordinate variable
41+ zstar=npy.sqrt(2.*alphaT*thickness/accumrate)
42+
43+ tprofile=surftemp+npy.sqrt(2.*thickness*npy.pi/accumrate/alphaT)*(-heatflux)/2./rho/c*(erf(z/zstar)-erf(thickness/zstar))
44+
45+ # difference between surface and base temperature for check (Cuffey2010 p412):
46+ # print tprofile-surftemp
Note: See TracBrowser for help on using the repository browser.