1 | import numpy
|
---|
2 | from paterson import paterson
|
---|
3 | from SetMarineIceSheetBC import SetMarineIceSheetBC
|
---|
4 |
|
---|
5 | #Ok, start defining model parameters here
|
---|
6 |
|
---|
7 | md.timestepping.time_step=0
|
---|
8 |
|
---|
9 | print " creating thickness"
|
---|
10 | h=1000.
|
---|
11 | md.geometry.thickness=h*numpy.ones((md.mesh.numberofvertices))
|
---|
12 | md.geometry.base=-1000.*numpy.ones((md.mesh.numberofvertices))
|
---|
13 | md.geometry.surface=md.geometry.base+md.geometry.thickness;
|
---|
14 |
|
---|
15 | print " creating velocities"
|
---|
16 | md.initialization.vx=numpy.zeros((md.mesh.numberofvertices))
|
---|
17 | md.initialization.vy=numpy.zeros((md.mesh.numberofvertices))
|
---|
18 | md.initialization.vz=numpy.zeros((md.mesh.numberofvertices))
|
---|
19 |
|
---|
20 | print " creating drag"
|
---|
21 | md.friction.coefficient=200.*numpy.ones((md.mesh.numberofvertices))
|
---|
22 | md.friction.coefficient[numpy.nonzero(md.mask.groundedice_levelset<0.)[0]]=0.
|
---|
23 | md.friction.p=numpy.ones((md.mesh.numberofelements))
|
---|
24 | md.friction.q=numpy.ones((md.mesh.numberofelements))
|
---|
25 |
|
---|
26 | print " creating temperatures"
|
---|
27 | md.initialization.temperature=(273.-20.)*numpy.ones((md.mesh.numberofvertices))
|
---|
28 |
|
---|
29 | print " creating flow law parameter"
|
---|
30 | md.materials.rheology_B=paterson(md.initialization.temperature)
|
---|
31 | md.materials.rheology_n=3.*numpy.ones((md.mesh.numberofelements))
|
---|
32 |
|
---|
33 | print " creating surface mass balance"
|
---|
34 | md.smb.mass_balance=numpy.ones((md.mesh.numberofvertices))/md.constants.yts #1m/a
|
---|
35 | md.basalforcings.melting_rate=0.*numpy.ones((md.mesh.numberofvertices))/md.constants.yts #1m/a
|
---|
36 |
|
---|
37 | #Deal with boundary conditions:
|
---|
38 |
|
---|
39 | print " boundary conditions for stressbalance model"
|
---|
40 | md=SetMarineIceSheetBC(md,'../Exp/SquareFront.exp')
|
---|
41 |
|
---|
42 | print " boundary conditions for thermal model"
|
---|
43 | md.thermal.spctemperature=md.initialization.temperature
|
---|
44 | md.basalforcings.geothermalflux=numpy.zeros((md.mesh.numberofvertices))
|
---|
45 | md.basalforcings.geothermalflux[numpy.nonzero(md.mask.groundedice_levelset>0.)[0]]=1.*10**-3 #1 mW/m^2
|
---|