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

Last change on this file since 20500 was 20500, checked in by Mathieu Morlighem, 9 years ago

merged trunk-jpl and trunk for revision 20497

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