Skip to content

Commit

Permalink
Merge pull request #634 from mperego/depth_integrated_model
Browse files Browse the repository at this point in the history
LandIce: Added tests using the FO depth integrated model

In this PR we add tests using the FO depth integrated model introduced in Albany PR sandialabs/Albany#956.
In particular we added decomposition and restart tests for Thwaites and Humboldt glaciers.
We also updated tests' input files to comply with Albany PR sandialabs/Albany#953, where options for integration rules changed.  Also, removed the unused and outdated input file albany_schoof_input.yaml
  • Loading branch information
matthewhoffman authored Aug 17, 2023
2 parents a4e8a38 + 0f6f234 commit 8caa397
Show file tree
Hide file tree
Showing 22 changed files with 412 additions and 162 deletions.
7 changes: 5 additions & 2 deletions compass/landice/suites/fo_integration.txt
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,9 @@ landice/dome/variable_resolution/fo_restart_test
landice/circular_shelf/decomposition_test
landice/greenland/fo_decomposition_test
landice/greenland/fo_restart_test
landice/thwaites/decomposition_test
landice/thwaites/restart_test
landice/thwaites/fo_decomposition_test
landice/thwaites/fo_restart_test
landice/thwaites/fo-depthInt_decomposition_test
landice/thwaites/fo-depthInt_restart_test
landice/humboldt/mesh-3km_restart_test/velo-fo_calving-von_mises_stress_damage-threshold_faceMelting
landice/humboldt/mesh-3km_restart_test/velo-fo-depthInt_calving-von_mises_stress_damage-threshold_faceMelting
7 changes: 5 additions & 2 deletions compass/landice/suites/full_integration.txt
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,9 @@ landice/dome/variable_resolution/fo_restart_test
landice/circular_shelf/decomposition_test
landice/greenland/fo_decomposition_test
landice/greenland/fo_restart_test
landice/thwaites/decomposition_test
landice/thwaites/restart_test
landice/thwaites/fo_decomposition_test
landice/thwaites/fo_restart_test
landice/thwaites/fo-depthInt_decomposition_test
landice/thwaites/fo-depthInt_restart_test
landice/humboldt/mesh-3km_restart_test/velo-fo_calving-von_mises_stress_damage-threshold_faceMelting
landice/humboldt/mesh-3km_restart_test/velo-fo-depthInt_calving-von_mises_stress_damage-threshold_faceMelting
12 changes: 3 additions & 9 deletions compass/landice/tests/circular_shelf/albany_input.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@ ANONYMOUS:
Type: 'Glen''s Law'
Flow Rate Type: Uniform

Cubature Degree: 4

# Discretization Description
Discretization:
#Exodus Output File Name: albany_output.exo
Expand Down Expand Up @@ -56,22 +58,14 @@ ANONYMOUS:
Rescue Bad Newton Solve: true
Linear Solver:
Write Linear System: false
Tolerance: 1.0e-8
Tolerance: 1.0e-9

Stratimikos Linear Solver:
Stratimikos:

# Linear Solver Information
Linear Solver Type: Belos
Linear Solver Types:
AztecOO:
Forward Solve:
AztecOO Settings:
Aztec Solver: GMRES
Convergence Test: r0
Size of Krylov Subspace: 200
Output Frequency: 20
Max Iterations: 200
Belos:
Solver Type: Block GMRES
Solver Types:
Expand Down
10 changes: 2 additions & 8 deletions compass/landice/tests/dome/albany_input.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@ ANONYMOUS:
Flow Rate Type: Uniform
'Glen''s Law Homotopy Parameter': 1.0

Cubature Degree: 4

# Discretization Description
Discretization:
Exodus Output File Name: albany_output.exo
Expand Down Expand Up @@ -64,14 +66,6 @@ ANONYMOUS:
# Linear Solver Information
Linear Solver Type: Belos
Linear Solver Types:
AztecOO:
Forward Solve:
AztecOO Settings:
Aztec Solver: GMRES
Convergence Test: r0
Size of Krylov Subspace: 200
Output Frequency: 20
Max Iterations: 200
Belos:
Solver Type: Block GMRES
Solver Types:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ ANONYMOUS:
Regularization Value: 1.0e-4
LandIce BCs:
BC 0:
Cubature Degree: 8
Basal Friction Coefficient:
Type: Power Law
Power Exponent: 0.2
Expand All @@ -20,6 +19,9 @@ ANONYMOUS:
#Zero Effective Pressure On Floating Ice At Nodes: true
Zero Beta On Floating Ice: true

Cubature Degree: 4
Basal Cubature Degree: 8

# Discretization Description
#Discretization:
#Exodus Output File Name: albany_output.exo
Expand Down Expand Up @@ -75,14 +77,6 @@ ANONYMOUS:
# Linear Solver Information
Linear Solver Type: Belos
Linear Solver Types:
AztecOO:
Forward Solve:
AztecOO Settings:
Aztec Solver: GMRES
Convergence Test: r0
Size of Krylov Subspace: 200
Output Frequency: 20
Max Iterations: 200
Belos:
Solver Type: Block GMRES
Solver Types:
Expand Down
11 changes: 3 additions & 8 deletions compass/landice/tests/greenland/albany_input.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,9 @@ ANONYMOUS:
Discretization:
Exodus Output File Name: albany_output.exo

Problem:
Cubature Degree: 4

Piro:
# Nonlinear Solver Information
NOX:
Expand Down Expand Up @@ -58,14 +61,6 @@ ANONYMOUS:
# Linear Solver Information
Linear Solver Type: Belos
Linear Solver Types:
AztecOO:
Forward Solve:
AztecOO Settings:
Aztec Solver: GMRES
Convergence Test: r0
Size of Krylov Subspace: 200
Output Frequency: 20
Max Iterations: 200
Belos:
Solver Type: Block GMRES
Solver Types:
Expand Down
3 changes: 0 additions & 3 deletions compass/landice/tests/greenland/run_model.py
Original file line number Diff line number Diff line change
Expand Up @@ -89,9 +89,6 @@ def __init__(self, test_case, velo_solver, name='run_model', subdir=None,
self.add_input_file(filename='albany_input.yaml',
package='compass.landice.tests.greenland',
copy=True)
self.add_input_file(filename='albany_schoof_input.yaml',
package='compass.landice.tests.greenland',
copy=True)

self.add_model_as_input()

Expand Down
64 changes: 41 additions & 23 deletions compass/landice/tests/humboldt/__init__.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
from compass.testgroup import TestGroup
from compass.landice.tests.humboldt.decomposition_test import DecompositionTest
from compass.landice.tests.humboldt.mesh_gen import MeshGen
from compass.landice.tests.humboldt.decomposition_test \
import DecompositionTest
from compass.landice.tests.humboldt.restart_test import RestartTest
from compass.testgroup import TestGroup


class Humboldt(TestGroup):
Expand All @@ -23,34 +22,53 @@ def __init__(self, mpas_core):
mesh_type = '1km'
for velo_solver in ['FO']:
self.add_test_case(
DecompositionTest(test_group=self,
velo_solver=velo_solver,
calving_law='none',
mesh_type=mesh_type))
DecompositionTest(test_group=self,
velo_solver=velo_solver,
calving_law='none',
mesh_type=mesh_type))
self.add_test_case(
RestartTest(test_group=self,
velo_solver=velo_solver,
calving_law='none',
mesh_type=mesh_type))
RestartTest(test_group=self,
velo_solver=velo_solver,
calving_law='none',
mesh_type=mesh_type))

# Set up 'full physics' tests using the 3km mesh
mesh_type = '3km'
for velo_solver in ['FO', 'none']:
self.add_test_case(
DecompositionTest(test_group=self,
velo_solver=velo_solver,
calving_law='von_Mises_stress',
mesh_type=mesh_type,
damage='threshold',
face_melt=True))
DecompositionTest(test_group=self,
velo_solver=velo_solver,
calving_law='von_Mises_stress',
mesh_type=mesh_type,
damage='threshold',
face_melt=True))

self.add_test_case(
RestartTest(test_group=self,
velo_solver=velo_solver,
calving_law='von_Mises_stress',
mesh_type=mesh_type,
damage='threshold',
face_melt=True))
RestartTest(test_group=self,
velo_solver=velo_solver,
calving_law='von_Mises_stress',
mesh_type=mesh_type,
damage='threshold',
face_melt=True))

for velo_solver in ['FO']:
self.add_test_case(
DecompositionTest(test_group=self,
velo_solver=velo_solver,
calving_law='von_Mises_stress',
mesh_type=mesh_type,
damage='threshold',
face_melt=True,
depth_integrated=True))

self.add_test_case(
RestartTest(test_group=self,
velo_solver=velo_solver,
calving_law='von_Mises_stress',
mesh_type=mesh_type,
damage='threshold',
face_melt=True,
depth_integrated=True))

# Create decomp and restart tests for all calving laws.
# Note that FO velo solver is NOT BFB across decompositions
Expand Down
11 changes: 3 additions & 8 deletions compass/landice/tests/humboldt/albany_input.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,9 @@ ANONYMOUS:
Power Exponent: 3.33333333333E-1
Effective Pressure Type: Hydrostatic
Use Pressurized Bed Above Sea Level: False

Cubature Degree: 4

# Discretization Description
Discretization:
# Exodus Output File Name: albany_output.exo
Expand Down Expand Up @@ -70,14 +73,6 @@ ANONYMOUS:
# Linear Solver Information
Linear Solver Type: Belos
Linear Solver Types:
AztecOO:
Forward Solve:
AztecOO Settings:
Aztec Solver: GMRES
Convergence Test: r0
Size of Krylov Subspace: 200
Output Frequency: 20
Max Iterations: 200
Belos:
Solver Type: Block GMRES
Solver Types:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,33 +4,21 @@ ANONYMOUS:
Build Type: Tpetra

Problem:
LandIce Viscosity:
Type: 'Glen''s Law'
Flow Rate Type: Uniform
'Glen''s Law Homotopy Parameter': 1.0
'Glen''s Law A': 1.0e-04
'Glen''s Law n': 3.0e+00
LandIce Field Norm:
sliding_velocity_basalside:
Regularization Type: Given Value
Regularization Value: 1.0e-4
LandIce BCs:
Number: 2
BC 0:
Cubature Degree: 3
Side Set Name: basalside
Type: Basal Friction
Basal Friction Coefficient:
Type: Regularized Coulomb
Given Field Variable Name: basal_friction
Zero Beta On Floating Ice: true
Coulomb Friction Coefficient: 1.0e+05
Power Exponent: 1.0
Bed Roughness: 1.0e+04
BC 1:
Cubature Degree: 3
Side Set Name: ice_margin_side
Type: Lateral

Type: Power Law
Power Exponent: 3.33333333333E-1
Effective Pressure Type: Hydrostatic
Use Pressurized Bed Above Sea Level: False
Depth Integrated Model: true
# Discretization Description
Discretization:
Exodus Output File Name: albany_output.exo
# Exodus Output File Name: albany_output.exo

Piro:
# Nonlinear Solver Information
Expand Down Expand Up @@ -83,14 +71,6 @@ ANONYMOUS:
# Linear Solver Information
Linear Solver Type: Belos
Linear Solver Types:
AztecOO:
Forward Solve:
AztecOO Settings:
Aztec Solver: GMRES
Convergence Test: r0
Size of Krylov Subspace: 200
Output Frequency: 20
Max Iterations: 200
Belos:
Solver Type: Block GMRES
Solver Types:
Expand Down
16 changes: 13 additions & 3 deletions compass/landice/tests/humboldt/decomposition_test/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,13 +28,16 @@ class DecompositionTest(TestCase):
face_melt : bool
Whether to include face melting
depth_integrated : bool
Whether the (FO) velocity model is depth integrated
proc_list : list
The pair of processor count values to test over.
Function of velocity solver.
"""

def __init__(self, test_group, velo_solver, calving_law, mesh_type,
damage=None, face_melt=False):
damage=None, face_melt=False, depth_integrated=False):
"""
Create the test case
Expand All @@ -57,6 +60,9 @@ def __init__(self, test_group, velo_solver, calving_law, mesh_type,
face_melt : bool
Whether to include face melting
depth_integrated : bool
Whether the (FO) velocity model is depth integrated
"""
name = 'decomposition_test'
self.mesh_type = mesh_type
Expand All @@ -68,8 +74,11 @@ def __init__(self, test_group, velo_solver, calving_law, mesh_type,
self.face_melt = face_melt

# build dir name. always include velo solver and calving law
subdir = 'mesh-{}_decomposition_test/velo-{}_calving-{}'.format(
mesh_type, velo_solver.lower(), calving_law.lower())
subdir = 'mesh-{}_decomposition_test/velo-{}'.format(
mesh_type, velo_solver.lower())
if velo_solver == 'FO' and depth_integrated is True:
subdir += '-depthInt'
subdir += '_calving-{}'.format(calving_law.lower())
# append damage and facemelt if provided
if damage is not None:
subdir += '_damage-{}'.format(damage)
Expand All @@ -90,6 +99,7 @@ def __init__(self, test_group, velo_solver, calving_law, mesh_type,
calving_law=self.calving_law,
damage=self.damage,
face_melt=self.face_melt,
depth_integrated=depth_integrated,
mesh_type=mesh_type))

# no configure() method is needed
Expand Down
Loading

0 comments on commit 8caa397

Please sign in to comment.