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

Last change on this file since 21341 was 21341, checked in by Mathieu Morlighem, 8 years ago

merged trunk-jpl and trunk for revision 21337

  • 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,1))
10md.geometry.base=numpy.zeros((md.mesh.numberofvertices,1))
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-1.)*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]
18md.geometry.thickness=md.geometry.surface-md.geometry.base
19md.geometry.thickness[numpy.nonzero(numpy.logical_not(md.geometry.thickness))]=0.01
20md.geometry.base=md.geometry.surface-md.geometry.thickness
21
22print " creating drag"
23md.friction.coefficient=numpy.zeros((md.mesh.numberofvertices,1))
24md.friction.p=numpy.ones((md.mesh.numberofelements,1))
25md.friction.q=numpy.ones((md.mesh.numberofelements,1))
26
27print " creating flow law parameter"
28md.materials.rheology_B=6.8067*10**7*numpy.ones((md.mesh.numberofvertices,1))
29md.materials.rheology_n=3.*numpy.ones((md.mesh.numberofelements,1))
30
31print " boundary conditions for stressbalance model:"
32#Create node on boundary first (because we can not use mesh)
33md=SetIceSheetBC(md)
Note: See TracBrowser for help on using the repository browser.