source: issm/trunk-jpl/test/NightlyRun/test1106.py

Last change on this file was 24261, checked in by bdef, 5 years ago

BUG: still some space fix

File size: 2.3 KB
RevLine 
[19049]1#Test Name: ISMIPCFS
[21408]2import numpy as np
[14134]3from model import *
[21408]4from socket import gethostname
[14134]5from triangle import *
6from setmask import *
7from parameterize import *
8from setflowequation import *
9from solve import *
10
11"""
[24214]12This test is a test from the ISMP - HOM Intercomparison project.
[14134]13Pattyn and Payne 2006
14"""
15
[24214]16L_list = [80000]
[23793]17results = []
[14134]18
19for L in L_list:
[24214]20 md = triangle(model(), "../Exp/Square_{}.exp".format(L), L / 10.) #size 3 * L
21 md = setmask(md, '', '') #ice sheet test
[23793]22 md = parameterize(md, '../Par/ISMIPC.py')
23 md.friction.coefficient = np.sqrt(md.constants.yts * (1000. + 1000. * np.sin(md.mesh.x * 2. * np.pi / L) * np.sin(md.mesh.y * 2. * np.pi / L)))
24 md.extrude(10, 1.)
[14134]25
[24214]26#Add spc on the borders
[23793]27 pos = np.where(np.logical_or.reduce((md.mesh.x == 0., md.mesh.x == np.max(md.mesh.x), md.mesh.y == 0., md.mesh.y == np.max(md.mesh.y))))
28 md.stressbalance.spcvx[pos] = 0.
29 md.stressbalance.spcvy[pos] = 0.
30 if (L == 5000.):
31 md.stressbalance.spcvx[pos] = 15.66
[24261]32 md.stressbalance.spcvy[pos] = -0.1967
[23793]33 elif (L == 10000.):
34 md.stressbalance.spcvx[pos] = 16.04
[24261]35 md.stressbalance.spcvy[pos] = -0.1977
[23793]36 elif (L == 20000.):
37 md.stressbalance.spcvx[pos] = 16.53
[24261]38 md.stressbalance.spcvy[pos] = -1.27
[23793]39 elif (L == 40000.):
40 md.stressbalance.spcvx[pos] = 17.23
[24261]41 md.stressbalance.spcvy[pos] = -3.17
[23793]42 elif (L == 80000.):
43 md.stressbalance.spcvx[pos] = 16.68
[24261]44 md.stressbalance.spcvy[pos] = -2.69
[23793]45 elif (L == 160000.):
46 md.stressbalance.spcvx[pos] = 16.03
[24261]47 md.stressbalance.spcvy[pos] = -1.27
[14134]48
[23793]49 md = setflowequation(md, 'FS', 'all')
[14134]50
[24214]51#Compute the stressbalance
[23793]52 md.cluster = generic('name', gethostname(), 'np', 8)
53 md = solve(md, 'Stressbalance')
[14134]54
[24214]55#Plot the results and save them
[23793]56 vx = md.results.StressbalanceSolution.Vx
57 vy = md.results.StressbalanceSolution.Vy
58 vz = md.results.StressbalanceSolution.Vz
59 results.append(md.results.StressbalanceSolution)
[14134]60
[24214]61# plotmodel(md, 'data', vx, 'data', vy, 'data', vz, 'layer #all', md.mesh.numberoflayers)
[14134]62
63#Fields and tolerances to track changes
[23793]64field_names = ['Vx80km', 'Vy80km', 'Vz80km']
65field_tolerances = [1e-12, 1e-12, 1e-12]
66field_values = []
[14134]67for result in results:
[23793]68 field_values = field_values + [result.Vx, result.Vy, result.Vz]
Note: See TracBrowser for help on using the repository browser.