[22267] | 1 | #Test Name: SquareSheetShelfGroundingLine2dAggressive. From test424, with sea level increasing.
|
---|
| 2 | import numpy as np
|
---|
| 3 | from model import *
|
---|
| 4 | from socket import gethostname
|
---|
| 5 | from triangle import *
|
---|
| 6 | from setmask import *
|
---|
| 7 | from parameterize import *
|
---|
| 8 | from setflowequation import *
|
---|
| 9 | from solve import *
|
---|
| 10 | from newforcing import *
|
---|
| 11 |
|
---|
[23793] | 12 | md = triangle(model(), '../Exp/Square.exp', 150000.)
|
---|
| 13 | md = setmask(md, '../Exp/SquareShelf.exp', '')
|
---|
| 14 | md = parameterize(md, '../Par/SquareSheetShelf.py')
|
---|
| 15 | md = setflowequation(md, 'SSA', 'all')
|
---|
[22267] | 16 | md.initialization.vx[:] = 0.
|
---|
| 17 | md.initialization.vy[:] = 0.
|
---|
| 18 | md.smb.mass_balance[:] = 0.
|
---|
| 19 |
|
---|
[24261] | 20 | md.geometry.base = -700. - np.abs(md.mesh.y - 500000.) / 1000.
|
---|
| 21 | md.geometry.bed = -700. - np.abs(md.mesh.y - 500000.) / 1000.
|
---|
[22267] | 22 | md.geometry.thickness[:] = 1000.
|
---|
| 23 | md.geometry.surface = md.geometry.base + md.geometry.thickness
|
---|
| 24 |
|
---|
| 25 | md.transient.isstressbalance = 0
|
---|
| 26 | md.transient.isgroundingline = 1
|
---|
| 27 | md.transient.isthermal = 0
|
---|
| 28 | md.groundingline.migration = 'AggressiveMigration'
|
---|
[23793] | 29 | md.transient.requested_outputs = ['IceVolume', 'IceVolumeAboveFloatation', 'Sealevel']
|
---|
[22267] | 30 |
|
---|
| 31 | md.timestepping.time_step = .1
|
---|
| 32 | md.slr.sealevel = newforcing(md.timestepping.start_time, md.timestepping.final_time,
|
---|
[24256] | 33 | md.timestepping.time_step, -200., 200., md.mesh.numberofvertices)
|
---|
[22267] | 34 |
|
---|
[23793] | 35 | md.cluster = generic('name', gethostname(), 'np', 3)
|
---|
| 36 | md = solve(md, 'Transient')
|
---|
[22267] | 37 |
|
---|
[23793] | 38 | #we are checking that the grounding line position is near the theorical one, which is the 0 contour level
|
---|
[24214] | 39 | #of surface-sealevel - (1 - di) * thickness
|
---|
[22267] | 40 |
|
---|
| 41 | nsteps = len(md.results.TransientSolution)
|
---|
| 42 | field_names = []
|
---|
| 43 | field_tolerances = []
|
---|
| 44 | field_values = []
|
---|
| 45 | #time is off by the year constant
|
---|
| 46 | for i in range(nsteps):
|
---|
[24384] | 47 | field_names.append('Time-' + str(md.results.TransientSolution[i].time) + '-yr-ice_levelset-S-sl-(1-di) * H')
|
---|
[23793] | 48 | field_tolerances.append(1e-12)
|
---|
[24862] | 49 | field_values.append(md.results.TransientSolution[i].MaskOceanLevelset.reshape(-1, ) - (md.geometry.surface - md.results.TransientSolution[i].Sealevel.reshape(-1, ) - (1 - md.materials.rho_ice / md.materials.rho_water) * md.geometry.thickness))
|
---|