source: issm/branches/trunk-larour-NatGeoScience2016/test/Par/RoundSheetStaticEISMINT.py@ 21759

Last change on this file since 21759 was 21759, checked in by Eric.Larour, 8 years ago

CHG: merged branch back to trunk-jpl 21754.

  • Property svn:executable set to *
File size: 2.4 KB
Line 
1import numpy
2from SetMarineIceSheetBC import SetMarineIceSheetBC
3
4print " creating thickness"
5hmin=0.01
6hmax=2756.7
7radius=numpy.sqrt((md.mesh.x)**2+(md.mesh.y)**2)
8radiusmax=numpy.max(radius)
9radius[numpy.nonzero(radius>(1.-10**-9)*radiusmax)]=radiusmax #eliminate roundoff issues in next statement
10md.geometry.thickness=hmin*numpy.ones((numpy.size(md.mesh.x)))+hmax*(4.*((1./2.)**(4./3.)*numpy.ones((numpy.size(md.mesh.x)))-((radius)/(2.*radiusmax))**(4./3.)))**(3./8.)
11md.geometry.base=0.*md.geometry.thickness
12md.geometry.surface=md.geometry.base+md.geometry.thickness
13
14print " creating drag"
15md.friction.coefficient=20.*numpy.ones((md.mesh.numberofvertices))
16md.friction.coefficient[numpy.nonzero(md.mask.groundedice_levelset<0.)[0]]=0.
17md.friction.p=numpy.ones((md.mesh.numberofelements))
18md.friction.q=numpy.ones((md.mesh.numberofelements))
19
20print " creating temperatures"
21tmin=238.15 #K
22st=1.67*10**-2/1000. #k/m
23md.initialization.temperature=tmin+st*radius
24md.basalforcings.geothermalflux=4.2*10**-2*numpy.ones((md.mesh.numberofvertices))
25
26print " creating flow law parameter"
27md.materials.rheology_B=6.81*10**7*numpy.ones((md.mesh.numberofvertices)) #to have the same B as the analytical solution
28md.materials.rheology_n=3.*numpy.ones((md.mesh.numberofelements))
29
30print " creating surface mass balance"
31smb_max=0.5 #m/yr
32sb=10**-2/1000. #m/yr/m
33rel=450.*1000. #m
34md.smb.mass_balance=numpy.minimum(smb_max*numpy.ones_like(radius),sb*(rel-radius))
35
36print " creating velocities"
37constant=0.3
38md.inversion.vx_obs=constant/2.*md.mesh.x*(md.geometry.thickness)**-1
39md.inversion.vy_obs=constant/2.*md.mesh.y*(md.geometry.thickness)**-1
40md.inversion.vel_obs=numpy.sqrt((md.inversion.vx_obs)**2+(md.inversion.vy_obs)**2)
41md.initialization.vx=numpy.zeros((md.mesh.numberofvertices))
42md.initialization.vy=numpy.zeros((md.mesh.numberofvertices))
43md.initialization.vz=numpy.zeros((md.mesh.numberofvertices))
44md.initialization.pressure=numpy.zeros((md.mesh.numberofvertices))
45
46#Deal with boundary conditions:
47print " boundary conditions for stressbalance model:"
48md=SetMarineIceSheetBC(md,'../Exp/RoundFrontEISMINT.exp')
49
50radius=numpy.sqrt((md.mesh.x)**2+(md.mesh.y)**2)
51pos=numpy.nonzero(radius==numpy.min(radius))[0]
52md.mesh.x[pos]=0.
53md.mesh.y[pos]=0. #the closest node to the center is changed to be exactly at the center
54
55md.stressbalance.spcvx[pos]=0.
56md.stressbalance.spcvy[pos]=0.
57md.stressbalance.spcvz[pos]=0.
Note: See TracBrowser for help on using the repository browser.