source: issm/trunk/test/Par/SquareThermal.py@ 25836

Last change on this file since 25836 was 25836, checked in by Mathieu Morlighem, 4 years ago

merged trunk-jpl and trunk for revision 25834

  • Property svn:executable set to *
File size: 2.3 KB
Line 
1import numpy as np
2from paterson import paterson
3from SetMarineIceSheetBC import SetMarineIceSheetBC
4
5#Ok, start defining model parameters here
6
7md.timestepping.time_step = 0
8md.groundingline.migration = 'None'
9
10print(" creating thickness")
11h = 1000.
12md.geometry.thickness = h * np.ones((md.mesh.numberofvertices))
13md.geometry.base = -1000. * np.ones((md.mesh.numberofvertices))
14md.geometry.surface = md.geometry.base + md.geometry.thickness
15
16print(" creating velocities")
17md.initialization.vx = np.zeros((md.mesh.numberofvertices))
18md.initialization.vy = np.zeros((md.mesh.numberofvertices))
19md.initialization.vz = np.zeros((md.mesh.numberofvertices))
20
21print(" creating drag")
22md.friction.coefficient = 200. * np.ones((md.mesh.numberofvertices))
23md.friction.coefficient[np.nonzero(md.mask.ocean_levelset < 0.)[0]] = 0.
24md.friction.p = np.ones((md.mesh.numberofelements))
25md.friction.q = np.ones((md.mesh.numberofelements))
26
27print(" creating temperatures")
28md.initialization.temperature = (273. - 20.) * np.ones((md.mesh.numberofvertices))
29md.initialization.pressure = np.zeros((md.mesh.numberofvertices, ))
30md.initialization.waterfraction = np.zeros((md.mesh.numberofvertices, ))
31md.initialization.watercolumn = np.zeros((md.mesh.numberofvertices, ))
32
33print(" creating flow law parameter")
34md.materials.rheology_B = paterson(md.initialization.temperature)
35md.materials.rheology_n = 3. * np.ones((md.mesh.numberofelements))
36
37print(" creating surface mass balance")
38md.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
40md.basalforcings.groundedice_melting_rate = 0. * np.ones((md.mesh.numberofvertices)) / md.constants.yts #1m / a
41md.basalforcings.floatingice_melting_rate = 0. * np.ones((md.mesh.numberofvertices)) / md.constants.yts #1m / a
42
43#Deal with boundary conditions:
44
45print(" boundary conditions for stressbalance model")
46md = SetMarineIceSheetBC(md, '../Exp/SquareFront.exp')
47
48print(" boundary conditions for thermal model")
49md.thermal.spctemperature[:] = md.initialization.temperature
50md.basalforcings.geothermalflux = np.zeros((md.mesh.numberofvertices))
51md.basalforcings.geothermalflux[np.nonzero(md.mask.ocean_levelset > 0.)[0]] = 1. * 10**-3 #1 mW / m^2
Note: See TracBrowser for help on using the repository browser.