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

Last change on this file since 23189 was 23189, checked in by Mathieu Morlighem, 7 years ago

merged trunk-jpl and trunk for revision 23187

  • Property svn:executable set to *
File size: 2.3 KB
Line 
1import numpy
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*numpy.ones((md.mesh.numberofvertices))
13md.geometry.base=-1000.*numpy.ones((md.mesh.numberofvertices))
14md.geometry.surface=md.geometry.base+md.geometry.thickness;
15
16print " creating velocities"
17md.initialization.vx=numpy.zeros((md.mesh.numberofvertices))
18md.initialization.vy=numpy.zeros((md.mesh.numberofvertices))
19md.initialization.vz=numpy.zeros((md.mesh.numberofvertices))
20
21print " creating drag"
22md.friction.coefficient=200.*numpy.ones((md.mesh.numberofvertices))
23md.friction.coefficient[numpy.nonzero(md.mask.groundedice_levelset<0.)[0]]=0.
24md.friction.p=numpy.ones((md.mesh.numberofelements))
25md.friction.q=numpy.ones((md.mesh.numberofelements))
26
27print " creating temperatures"
28md.initialization.temperature=(273.-20.)*numpy.ones((md.mesh.numberofvertices))
29md.initialization.pressure=numpy.zeros((md.mesh.numberofvertices,))
30md.initialization.waterfraction=numpy.zeros((md.mesh.numberofvertices,))
31md.initialization.watercolumn=numpy.zeros((md.mesh.numberofvertices,))
32
33print " creating flow law parameter"
34md.materials.rheology_B=paterson(md.initialization.temperature)
35md.materials.rheology_n=3.*numpy.ones((md.mesh.numberofelements))
36
37print " creating surface mass balance"
38md.smb.mass_balance=numpy.ones((md.mesh.numberofvertices))/md.constants.yts #1m/a
39#md.basalforcings.melting_rate=0.*numpy.ones((md.mesh.numberofvertices))/md.constants.yts #1m/a
40md.basalforcings.groundedice_melting_rate=0.*numpy.ones((md.mesh.numberofvertices))/md.constants.yts #1m/a
41md.basalforcings.floatingice_melting_rate=0.*numpy.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=numpy.zeros((md.mesh.numberofvertices))
51md.basalforcings.geothermalflux[numpy.nonzero(md.mask.groundedice_levelset>0.)[0]]=1.*10**-3 #1 mW/m^2
Note: See TracBrowser for help on using the repository browser.