1 | import numpy as np
|
---|
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 | md.groundingline.migration = 'None'
|
---|
9 |
|
---|
10 | print(" creating thickness")
|
---|
11 | h = 1000.
|
---|
12 | md.geometry.thickness = h * np.ones((md.mesh.numberofvertices))
|
---|
13 | md.geometry.base = -1000. * np.ones((md.mesh.numberofvertices))
|
---|
14 | md.geometry.surface = md.geometry.base + md.geometry.thickness
|
---|
15 |
|
---|
16 | print(" creating velocities")
|
---|
17 | md.initialization.vx = np.zeros((md.mesh.numberofvertices))
|
---|
18 | md.initialization.vy = np.zeros((md.mesh.numberofvertices))
|
---|
19 | md.initialization.vz = np.zeros((md.mesh.numberofvertices))
|
---|
20 |
|
---|
21 | print(" creating drag")
|
---|
22 | md.friction.coefficient = 200. * np.ones((md.mesh.numberofvertices))
|
---|
23 | md.friction.coefficient[np.nonzero(md.mask.ocean_levelset < 0.)[0]] = 0.
|
---|
24 | md.friction.p = np.ones((md.mesh.numberofelements))
|
---|
25 | md.friction.q = np.ones((md.mesh.numberofelements))
|
---|
26 |
|
---|
27 | print(" creating temperatures")
|
---|
28 | md.initialization.temperature = (273. - 20.) * np.ones((md.mesh.numberofvertices))
|
---|
29 | md.initialization.pressure = np.zeros((md.mesh.numberofvertices, ))
|
---|
30 | md.initialization.waterfraction = np.zeros((md.mesh.numberofvertices, ))
|
---|
31 | md.initialization.watercolumn = np.zeros((md.mesh.numberofvertices, ))
|
---|
32 |
|
---|
33 | print(" creating flow law parameter")
|
---|
34 | md.materials.rheology_B = paterson(md.initialization.temperature)
|
---|
35 | md.materials.rheology_n = 3. * np.ones((md.mesh.numberofelements))
|
---|
36 |
|
---|
37 | print(" creating surface mass balance")
|
---|
38 | md.smb.mass_balance = np.ones((md.mesh.numberofvertices)) / md.constants.yts #1m / a
|
---|
39 | #md.basalforcings.melting_rate = 0. * np.ones((md.mesh.numberofvertices)) / md.constants.yts #1m / a
|
---|
40 | md.basalforcings.groundedice_melting_rate = 0. * np.ones((md.mesh.numberofvertices)) / md.constants.yts #1m / a
|
---|
41 | md.basalforcings.floatingice_melting_rate = 0. * np.ones((md.mesh.numberofvertices)) / md.constants.yts #1m / a
|
---|
42 |
|
---|
43 | #Deal with boundary conditions:
|
---|
44 |
|
---|
45 | print(" boundary conditions for stressbalance model")
|
---|
46 | md = SetMarineIceSheetBC(md, '../Exp/SquareFront.exp')
|
---|
47 |
|
---|
48 | print(" boundary conditions for thermal model")
|
---|
49 | md.thermal.spctemperature[:] = md.initialization.temperature
|
---|
50 | md.basalforcings.geothermalflux = np.zeros((md.mesh.numberofvertices))
|
---|
51 | md.basalforcings.geothermalflux[np.nonzero(md.mask.ocean_levelset > 0.)[0]] = 1. * 10**-3 #1 mW / m^2
|
---|