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