source: issm/trunk-jpl/test/NightlyRun/test1202.py@ 14107

Last change on this file since 14107 was 14107, checked in by jschierm, 12 years ago

NEW: Working python tests 1201-1204, 1208.

File size: 1.6 KB
Line 
1import numpy
2from model import *
3from triangle import *
4from setmask import *
5from parameterize import *
6from setflowequation import *
7from EnumDefinitions import *
8from solve import *
9from MatlabFuncs import *
10
11"""
12Test on the diagnostic model and the prognostic in 2d
13"""
14
15printingflag=False
16
17#tests 3 and 4: using Glen's flow law
18md=model()
19md=triangle(md,'../Exp/SquareEISMINT.exp',3550.)
20md=setmask(md,'all','')
21md=parameterize(md,'../Par/SquareEISMINT.py')
22md=setflowequation(md,'macayeal','all') #MacAyeal's model and 2d
23
24#Compute solution for MacAyeal's model
25md.cluster=generic('name',oshostname(),'np',8)
26md=solve(md,DiagnosticSolutionEnum())
27
28#plot results
29vx=md.results.DiagnosticSolution.Vx
30vy=md.results.DiagnosticSolution.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')
34if 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')
42if 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
49field_names =['Vx','Vy']
50field_tolerances=[1e-13,1e-13]
51field_values=[\
52 vx, \
53 vy, \
54 ]
Note: See TracBrowser for help on using the repository browser.