[19049] | 1 | #Test Name: EISMINTStress1
|
---|
[21408] | 2 | import numpy as np
|
---|
[14107] | 3 | from model import *
|
---|
[21408] | 4 | from socket import gethostname
|
---|
[14107] | 5 | from triangle import *
|
---|
| 6 | from setmask import *
|
---|
| 7 | from parameterize import *
|
---|
| 8 | from setflowequation import *
|
---|
| 9 | from solve import *
|
---|
| 10 |
|
---|
[21408] | 11 |
|
---|
[14107] | 12 | """
|
---|
[15771] | 13 | Test on the stressbalance model and the masstransport in 2d
|
---|
[14107] | 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')
|
---|
[15566] | 23 | md=setflowequation(md,'SSA','all') #SSA's model and 2d
|
---|
[14107] | 24 |
|
---|
[15566] | 25 | #Compute solution for SSA's model
|
---|
[21408] | 26 | md.cluster=generic('name',gethostname(),'np',8)
|
---|
[21056] | 27 | md=solve(md,'Stressbalance')
|
---|
[14107] | 28 |
|
---|
| 29 | #plot results
|
---|
[15771] | 30 | vx=md.results.StressbalanceSolution.Vx
|
---|
| 31 | vy=md.results.StressbalanceSolution.Vy
|
---|
[14107] | 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')
|
---|
[21408] | 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 '])
|
---|
[14107] | 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')
|
---|
[21408] | 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 '])
|
---|
[14107] | 48 |
|
---|
| 49 | #Fields and tolerances to track changes
|
---|
| 50 | field_names =['Vx','Vy']
|
---|
| 51 | field_tolerances=[1e-13,1e-13]
|
---|
[21408] | 52 | field_values=[vx,vy]
|
---|