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