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