source: issm/trunk/test/Par/ISMIPE.py@ 22758

Last change on this file since 22758 was 22758, checked in by Mathieu Morlighem, 7 years ago

merged trunk-jpl and trunk for revision 22757

  • Property svn:executable set to *
File size: 1.3 KB
Line 
1import numpy
2from arch import *
3from SetIceSheetBC import SetIceSheetBC
4
5#Ok, start defining model parameters here
6
7print " creating thickness"
8data = numpy.array(archread('../Data/ISMIPE.arch','data'));
9md.geometry.surface=numpy.zeros((md.mesh.numberofvertices))
10md.geometry.base=numpy.zeros((md.mesh.numberofvertices))
11for i in xrange(0,md.mesh.numberofvertices):
12 y=md.mesh.y[i]
13 point1=numpy.floor(y/100.)
14 point2=numpy.minimum(point1+1,50)
15 coeff=(y-(point1)*100.)/100.
16 md.geometry.base[i]=(1.-coeff)*data[point1,1]+coeff*data[point2,1]
17 md.geometry.surface[i]=(1.-coeff)*data[point1,2]+coeff*data[point2,2]
18
19md.geometry.thickness=md.geometry.surface-md.geometry.base
20md.geometry.thickness[numpy.nonzero(numpy.logical_not(md.geometry.thickness))]=0.01
21md.geometry.base=md.geometry.surface-md.geometry.thickness
22
23print " creating drag"
24md.friction.coefficient=numpy.zeros((md.mesh.numberofvertices))
25md.friction.p=numpy.ones((md.mesh.numberofelements))
26md.friction.q=numpy.ones((md.mesh.numberofelements))
27
28print " creating flow law parameter"
29md.materials.rheology_B=6.8067*10**7*numpy.ones((md.mesh.numberofvertices))
30md.materials.rheology_n=3.*numpy.ones((md.mesh.numberofelements))
31
32print " boundary conditions for stressbalance model:"
33#Create node on boundary first (because we can not use mesh)
34md=SetIceSheetBC(md)
Note: See TracBrowser for help on using the repository browser.