Loading [MathJax]/extensions/tex2jax.js
PISM, A Parallel Ice Sheet Model
2.2.1-cd005eec8 committed by Constantine Khrulev on 2025-03-07
Toggle main menu visibility
Main Page
Related Pages
Namespaces
Namespace List
Namespace Members
All
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Functions
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
r
s
t
u
v
w
z
Variables
a
b
c
d
f
g
h
i
k
l
m
n
r
s
t
u
v
w
Typedefs
Enumerations
a
b
c
d
e
f
i
k
l
m
n
p
r
t
u
v
Enumerator
_
a
b
c
d
e
f
g
h
i
l
m
n
p
q
s
t
u
w
x
y
z
Classes
Class List
Class Index
Class Hierarchy
Class Members
All
:
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
~
Functions
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
~
Variables
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Typedefs
a
c
d
f
g
h
l
m
p
s
v
w
Enumerations
Enumerator
c
d
e
f
h
i
j
m
n
o
p
r
s
t
w
y
Related Symbols
Files
File List
File Members
All
_
a
b
c
d
e
f
g
h
i
k
l
m
n
p
r
s
t
u
w
z
Functions
a
b
c
d
e
f
g
h
i
l
m
p
r
s
u
Variables
b
c
d
e
g
h
k
l
m
n
p
r
s
t
u
w
z
Typedefs
Macros
_
a
b
c
g
h
i
k
m
n
r
s
t
u
•
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Macros
Pages
Loading...
Searching...
No Matches
src
verification
tests
exactTestN.c
Go to the documentation of this file.
1
/*
2
Copyright (C) 2010, 2014, 2016, 2023, 2025 Ed Bueler
3
4
This file is part of PISM.
5
6
PISM is free software; you can redistribute it and/or modify it under the
7
terms of the GNU General Public License as published by the Free Software
8
Foundation; either version 3 of the License, or (at your option) any later
9
version.
10
11
PISM is distributed in the hope that it will be useful, but WITHOUT ANY
12
WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
13
FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
14
details.
15
16
You should have received a copy of the GNU General Public License
17
along with PISM; if not, write to the Free Software
18
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
19
*/
20
21
#include <math.h>
22
#include "pism/verification/tests/exactTestN.h"
23
24
#define secpera 31556926.0
/* seconds per year; 365.2422 days */
25
#define g 9.81
26
#define rho 910.0
/* ice density; kg m-3 */
27
#define rhow 1028.0
/* sea water density; kg m-3 */
28
#define n 3.0
/* Glen power */
29
30
struct
TestNConstants
exactNConstants
(void) {
31
double
s = 0.0;
32
struct
TestNConstants
result;
33
34
/* geometry */
35
result.
H0
= 3000.0;
36
result.
L0
= 500.0e3;
37
result.
xc
= 0.9 * (result.
L0
);
38
39
/* mass balance */
40
result.
a
= 0.003 /
secpera
;
/* s-1; mass balance gradient with elevation */
41
result.
H_ela
= (result.
H0
) / 1.5;
/* m; H0 = 1.5 H_ela exactly */
42
43
/* sliding */
44
/* s m-1; choose k so that eqn (24) gives our L0 */
45
result.
k
= 9.0 * (result.
H_ela
) / ((result.
a
) * (result.
L0
) * (result.
L0
));
46
47
/* grounded calving front boundary condition, imposed at xc = .9 L0, determines
48
constant vertically-integrated longitudinal stress T; see (2.12) in Schoof (2006);
49
treats Hc = H(xc) as exactly at flotation */
50
s = (result.
xc
) / (result.
L0
);
51
result.
H_xc
= (result.
H0
) * (1.0 - s * s);
52
result.
T_xc
= 0.5 * (1.0 -
rho
/
rhow
) *
rho
*
g
* (result.
H_xc
) * (result.
H_xc
);
53
54
return
result;
55
}
30
struct
TestNConstants
exactNConstants
(void) {
…
}
56
57
struct
TestNParameters
exactN
(
double
x) {
58
59
double
q = 0.0, hxx = 0.0, ux = 0.0;
60
const
struct
TestNConstants
c =
exactNConstants
();
61
struct
TestNParameters
result;
62
63
{
64
result.
error_code
= 0;
65
result.
H
= 0;
66
result.
h_x
= 0;
67
result.
u
= 0;
68
result.
M
= 0;
69
result.
B
= 0;
70
result.
beta
= 0;
71
}
72
73
if
(x < 0.0) {
74
result.
error_code
= 1;
75
return
result;
76
}
77
78
if
(x > c.
L0
) {
79
result.
error_code
= 2;
80
return
result;
81
}
82
83
q = (1.0 /
n
) - 1.0;
/* a useful power */
84
hxx = - 2.0 * c.
H0
/ (c.
L0
* c.
L0
);
/* constant concavity of h(x) */
85
ux = - hxx / c.
k
;
/* constant strain rate */
86
87
result.
H
= c.
H0
* (1.0 - (x / c.
L0
) * (x / c.
L0
));
/* eqn (23) in Bodvardsson */
88
89
result.
h_x
= hxx * x;
90
91
result.
u
= - (result.
h_x
) / c.
k
;
/* eqn (10) in Bodvardson, once SIA is dropped */
92
93
result.
M
= c.
a
* ((result.
H
) - c.
H_ela
);
/* page 6 in Bodvardsson, just before eqn (23) */
94
95
result.
B
= c.
T_xc
/ (2.0 * (result.
H
) * pow(fabs(ux),q) * ux);
/* Bueler interpretation */
96
97
result.
beta
= c.
k
*
rho
*
g
* (result.
H
);
98
99
return
result;
100
}
57
struct
TestNParameters
exactN
(
double
x) {
…
}
101
102
double
g
#define g
Definition
exactTestM.c:34
rhow
#define rhow
Definition
exactTestM.c:36
n
#define n
Definition
exactTestM.c:37
rho
#define rho
Definition
exactTestM.c:35
secpera
#define secpera
Definition
exactTestN.c:24
exactN
struct TestNParameters exactN(double x)
Definition
exactTestN.c:57
exactNConstants
struct TestNConstants exactNConstants(void)
Definition
exactTestN.c:30
exactNConstants
struct TestNConstants exactNConstants(void)
Definition
exactTestN.c:30
TestNConstants::k
double k
Definition
exactTestN.h:43
TestNConstants::L0
double L0
Definition
exactTestN.h:39
TestNConstants::H_xc
double H_xc
Definition
exactTestN.h:44
TestNConstants::a
double a
Definition
exactTestN.h:41
TestNConstants::H0
double H0
Definition
exactTestN.h:38
TestNConstants::xc
double xc
Definition
exactTestN.h:40
TestNConstants::H_ela
double H_ela
Definition
exactTestN.h:42
TestNConstants::T_xc
double T_xc
Definition
exactTestN.h:45
TestNConstants
Definition
exactTestN.h:37
TestNParameters::M
double M
Definition
exactTestN.h:55
TestNParameters::B
double B
Definition
exactTestN.h:56
TestNParameters::H
double H
Definition
exactTestN.h:52
TestNParameters::h_x
double h_x
Definition
exactTestN.h:53
TestNParameters::u
double u
Definition
exactTestN.h:54
TestNParameters::beta
double beta
Definition
exactTestN.h:57
TestNParameters::error_code
int error_code
Definition
exactTestN.h:51
TestNParameters
Definition
exactTestN.h:50
Generated by
1.9.8