1 | #Test Name: EISMINTStress1
|
---|
2 | from model import *
|
---|
3 | from socket import gethostname
|
---|
4 | from triangle import *
|
---|
5 | from setmask import *
|
---|
6 | from parameterize import *
|
---|
7 | from setflowequation import *
|
---|
8 | from solve import *
|
---|
9 |
|
---|
10 |
|
---|
11 | """
|
---|
12 | Test on the stressbalance model and the masstransport in 2d
|
---|
13 | """
|
---|
14 |
|
---|
15 | printingflag = False
|
---|
16 |
|
---|
17 | #tests 3 and 4: using Glen's flow law
|
---|
18 | md = model()
|
---|
19 | md = triangle(md, '../Exp/SquareEISMINT.exp', 3550.)
|
---|
20 | md = setmask(md, 'all', '')
|
---|
21 | md = parameterize(md, '../Par/SquareEISMINT.py')
|
---|
22 | md = setflowequation(md, 'SSA', 'all') #SSA's model and 2d
|
---|
23 |
|
---|
24 | #Compute solution for SSA's model
|
---|
25 | md.cluster = generic('name', gethostname(), 'np', 8)
|
---|
26 | md = solve(md, 'Stressbalance')
|
---|
27 |
|
---|
28 | #plot results
|
---|
29 | vx = md.results.StressbalanceSolution.Vx
|
---|
30 | vy = md.results.StressbalanceSolution.Vy
|
---|
31 |
|
---|
32 | #plotmodel(md, 'data', vx, 'contourlevels',{0, 20, 40, 60, 60, 100, 120, 140, 160, 180,-20,-40,-60,-80,-100,-120,-140,-160,-180}, ...
|
---|
33 | # 'contourcolor', 'k')
|
---|
34 | if printingflag:
|
---|
35 | pass
|
---|
36 | # set(gcf, 'Color', 'w')
|
---|
37 | # printmodel('eismintdiag1vx', 'png', 'margin', 'on', 'marginsize', 25, 'frame', 'off', 'resolution', 2, 'hardcopy', 'off')
|
---|
38 | # system(['mv eismintdiag1vx.png ' ISSM_DIR '/website/doc_pdf/validation/Images/EISMINT/IceShelf '])
|
---|
39 |
|
---|
40 | #plotmodel(md, 'data', vy, 'contourlevels',{-100,-200,-300,-400,-500,-600,-700,-800,-900,-1000},...
|
---|
41 | # 'contourcolor', 'k')
|
---|
42 | if printingflag:
|
---|
43 | pass
|
---|
44 | # set(gcf, 'Color', 'w')
|
---|
45 | # printmodel('eismintdiag1vy', 'png', 'margin', 'on', 'marginsize', 25, 'frame', 'off', 'resolution', 2, 'hardcopy', 'off')
|
---|
46 | # system(['mv eismintdiag1vy.png ' ISSM_DIR '/website/doc_pdf/validation/Images/EISMINT/IceShelf '])
|
---|
47 |
|
---|
48 | #Fields and tolerances to track changes
|
---|
49 | field_names = ['Vx', 'Vy']
|
---|
50 | field_tolerances = [1e-13, 1e-13]
|
---|
51 | field_values = [vx, vy]
|
---|