1 | import os
|
---|
2 | import numpy as np
|
---|
3 | def PattynSMB(md,Tf):
|
---|
4 | """
|
---|
5 | PATTYNSMB- Compute SMB over Antarctica (from Pattyn 2006, pg. 18, "GRANTISM: An ExcelTM model for Greenland
|
---|
6 | and Antarctic ice-sheet response to climate changes")
|
---|
7 |
|
---|
8 | Usage:
|
---|
9 | md=PattynSMB(md,Tf)
|
---|
10 |
|
---|
11 | where Tf is a background forcing temperature ("an anomalous temperature relative to the present conditions)
|
---|
12 |
|
---|
13 |
|
---|
14 | See also: SETICESHELFBC, SETMARINEICESHEETBC
|
---|
15 | """
|
---|
16 |
|
---|
17 | # Tma : Mean annual surface temperature in [deg C]
|
---|
18 | # Tms : Mean summer temperature in [deg C]
|
---|
19 | # h : Surface/bedrock elevation (I assume in meters but paper does not specify)
|
---|
20 | # phi : Latitude in degrees SOUTH
|
---|
21 | # lambda : Longitude in degrees WEST
|
---|
22 | # Tf : Background forcing temperature ("an anomalous temperature relative to the present conditions)
|
---|
23 | # ACCdot : Accumulation rate in units of [m/a] ice equivalent
|
---|
24 | # ABLdot : Surface ablation rate in [m/a] ice equivalent
|
---|
25 |
|
---|
26 | #Double check lat and long exist:
|
---|
27 | if np.any(np.isnan(md.mesh.lat)):
|
---|
28 | raise IOError('PattynSMB error message: md.mesh.lat field required')
|
---|
29 |
|
---|
30 | # Calculate mean annual surface temperature, Eqn (11)
|
---|
31 | # Here, -0.012 is the atmospheric Lapse rate from sea level in deg/m.
|
---|
32 | # It is multiplied by surface elevation from sea level
|
---|
33 | Tma = -15.15 - 0.012*md.geometry.surface
|
---|
34 |
|
---|
35 |
|
---|
36 | # Calculate summer temperature, Eqn (12)
|
---|
37 | # No melting at PIG in mean conditions - need about 6 degress Tf to start having a negative yearly SMB
|
---|
38 | Tms = 16.81 - 0.00692*md.geometry.surface - 0.27937*np.abs(md.mesh.lat) + Tf
|
---|
39 | Tms= Tms[0]
|
---|
40 |
|
---|
41 | # Calculate Accumulation perturbation with Tf forcing, Eqn (9)
|
---|
42 | ACCdot = 2.5*2**((Tma+Tf)/10.) - 2.5*2**(Tma/10.)
|
---|
43 |
|
---|
44 | # Calculate Ablation, Eqn (10) (use for both Antarctica & Greenland), max melt is 10m/a
|
---|
45 | ABLdot=0.*np.ones(md.mesh.numberofvertices)
|
---|
46 | pos=np.nonzero(Tms>=0)
|
---|
47 | ABLdot[pos]=np.minimum(1.4*Tms[pos],10)
|
---|
48 |
|
---|
49 | smb=ACCdot-ABLdot
|
---|
50 | return smb[0]
|
---|