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

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

Added archives

File size: 1.7 KB
  • ../trunk-jpl/src/m/mech/robintemperature.py

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