source: issm/branches/trunk-larour-NatGeoScience2016/test/NightlyRun/test513.py@ 21243

Last change on this file since 21243 was 21060, checked in by Mathieu Morlighem, 9 years ago

CHG: no more enums in python

File size: 1.9 KB
Line 
1#Test Name: PigCMDragSteaSSA3d
2from model import *
3from triangle import *
4from setmask import *
5from parameterize import *
6from setflowequation import *
7from solve import *
8from MatlabFuncs import *
9
10md=triangle(model(),'../Exp/Pig.exp',30000.)
11md=setmask(md,'../Exp/PigShelves.exp','../Exp/PigIslands.exp')
12md=parameterize(md,'../Par/Pig.py')
13md.extrude(3,1.)
14md=setflowequation(md,'SSA','all')
15
16# control parameters
17md.inversion.iscontrol=1
18md.inversion.control_parameters=['FrictionCoefficient']
19md.inversion.min_parameters=1.*numpy.ones((md.mesh.numberofvertices,1))
20md.inversion.max_parameters=200.*numpy.ones((md.mesh.numberofvertices,1))
21md.inversion.nsteps=2
22md.inversion.cost_functions=[103,501]
23md.inversion.cost_functions_coefficients=numpy.ones((md.mesh.numberofvertices,2))
24md.inversion.cost_functions_coefficients[:,1]=2.*10**-7
25md.inversion.gradient_scaling=3.*numpy.ones((md.inversion.nsteps,1))
26md.inversion.maxiter_per_step=2.*numpy.ones((md.inversion.nsteps,1))
27md.inversion.step_threshold=0.99*numpy.ones((md.inversion.nsteps,1))
28md.inversion.vx_obs=md.initialization.vx
29md.inversion.vy_obs=md.initialization.vy
30md.timestepping.time_step=0.
31
32md.thermal.penalty_lock=5
33md.cluster=generic('name',oshostname(),'np',3)
34md=solve(md,'Steadystate')
35
36# Fields and tolerances to track changes
37field_names =['Gradient','Misfits','FrictionCoefficient','Pressure','Vel','Vx','Vy','Vz','Temperature','BasalforcingsGroundediceMeltingRate']
38field_tolerances=[5e-08,4e-10,1e-10,1e-10,3e-6,4e-6,3.4e-6,3e-6,2e-6,2e-06]
39field_values=[\
40 md.results.SteadystateSolution.Gradient1,\
41 md.results.SteadystateSolution.J,\
42 md.results.SteadystateSolution.FrictionCoefficient,\
43 md.results.SteadystateSolution.Pressure,\
44 md.results.SteadystateSolution.Vel,\
45 md.results.SteadystateSolution.Vx,\
46 md.results.SteadystateSolution.Vy,\
47 md.results.SteadystateSolution.Vz,\
48 md.results.SteadystateSolution.Temperature,\
49 md.results.SteadystateSolution.BasalforcingsGroundediceMeltingRate
50]
Note: See TracBrowser for help on using the repository browser.