From 56a6510e46df95d641c71669bcb6d5916669437f Mon Sep 17 00:00:00 2001 From: Matthew Hoffman Date: Fri, 27 Feb 2026 20:49:42 -0700 Subject: [PATCH 1/9] Add landice/mismipplus/smoke_test/2000m to full_integration --- compass/landice/suites/full_integration.txt | 1 + 1 file changed, 1 insertion(+) diff --git a/compass/landice/suites/full_integration.txt b/compass/landice/suites/full_integration.txt index 8ac3657fcf..7d9b104b38 100644 --- a/compass/landice/suites/full_integration.txt +++ b/compass/landice/suites/full_integration.txt @@ -18,6 +18,7 @@ landice/dome/2000m/fo_restart_test landice/dome/variable_resolution/fo_decomposition_test landice/dome/variable_resolution/fo_restart_test landice/circular_shelf/decomposition_test +landice/mismipplus/smoke_test/2000m landice/greenland/fo_decomposition_test landice/greenland/fo_restart_test landice/thwaites/fo_decomposition_test From 68223f26f0757e9263bc2e0b92c8760d341d8271 Mon Sep 17 00:00:00 2001 From: Matthew Hoffman Date: Fri, 27 Feb 2026 21:15:54 -0700 Subject: [PATCH 2/9] Add debris friction variant of mismip+ Also add it to the full integration suite --- compass/landice/suites/full_integration.txt | 1 + compass/landice/tests/mismipplus/__init__.py | 3 + .../albany_input_debrisfriction.yaml | 241 ++++++++++++++++++ compass/landice/tests/mismipplus/run_model.py | 32 ++- .../tests/mismipplus/smoke_test/__init__.py | 23 +- 5 files changed, 293 insertions(+), 7 deletions(-) create mode 100644 compass/landice/tests/mismipplus/albany_input_debrisfriction.yaml diff --git a/compass/landice/suites/full_integration.txt b/compass/landice/suites/full_integration.txt index 7d9b104b38..86d2d0bafc 100644 --- a/compass/landice/suites/full_integration.txt +++ b/compass/landice/suites/full_integration.txt @@ -19,6 +19,7 @@ landice/dome/variable_resolution/fo_decomposition_test landice/dome/variable_resolution/fo_restart_test landice/circular_shelf/decomposition_test landice/mismipplus/smoke_test/2000m +landice/mismipplus/smoke_test/debris_friction/2000m landice/greenland/fo_decomposition_test landice/greenland/fo_restart_test landice/thwaites/fo_decomposition_test diff --git a/compass/landice/tests/mismipplus/__init__.py b/compass/landice/tests/mismipplus/__init__.py index 72642d54a1..fd18948370 100644 --- a/compass/landice/tests/mismipplus/__init__.py +++ b/compass/landice/tests/mismipplus/__init__.py @@ -19,3 +19,6 @@ def __init__(self, mpas_core): for resolution in [2000]: self.add_test_case(SmokeTest(test_group=self, resolution=resolution)) + self.add_test_case(SmokeTest(test_group=self, + resolution=resolution, + debris_friction=True)) diff --git a/compass/landice/tests/mismipplus/albany_input_debrisfriction.yaml b/compass/landice/tests/mismipplus/albany_input_debrisfriction.yaml new file mode 100644 index 0000000000..03ff82e5b3 --- /dev/null +++ b/compass/landice/tests/mismipplus/albany_input_debrisfriction.yaml @@ -0,0 +1,241 @@ +%YAML 1.1 +--- +ANONYMOUS: + Problem: + LandIce Field Norm: + sliding_velocity_basalside: + Regularization Type: Given Value + Regularization Value: 1.0e-4 + LandIce BCs: + BC 0: + Cubature Degree: 4 + Basal Friction Coefficient: + Type: Debris Friction + Power Exponent: 0.3333333333 + Effective Pressure Type: Hydrostatic Computed at Nodes + Effective Pressure Regularization: 1.0e3 + Sliding Velocity Regularization: 5.0e2 + Flow Rate Type: Constant + Flow Rate: 4.537e-24 # Pa^-n s^-1 + # # Discretization Description + # Discretization: + # Exodus Output File Name: albany_output.exo + # Side Set Discretizations: + # basalside: + # Exodus Output File Name: albany_output_basal.exo + + Piro: +# Nonlinear Solver Information + NOX: + Nonlinear Solver: Line Search Based + Line Search: + Full Step: + Full Step: 1.0e+00 + Method: Backtrack + Solver Options: + Status Test Check Type: Minimal + Status Tests: + Test Type: Combo + Combo Type: OR + Number of Tests: 2 + Test 0: + Test Type: NormF + Norm Type: Two Norm + Scale Type: Scaled + Tolerance: 1.0e-05 + Test 1: + Test Type: MaxIters + Maximum Iterations: 50 + Printing: + Output Precision: 3 + Output Processor: 0 + Output Information: + Error: true + Warning: true + Outer Iteration: true + Parameters: false + Details: false + Linear Solver Details: false + Stepper Iteration: true + Stepper Details: true + Stepper Parameters: true + + Direction: + Method: Newton + Newton: + Forcing Term Method: Type 2 + Rescue Bad Newton Solve: true + Linear Solver: + Write Linear System: false + Tolerance: 1.0e-8 + + Stratimikos Linear Solver: + Stratimikos: + +# Linear Solver Information + Linear Solver Type: Belos + Linear Solver Types: + Belos: + Solver Type: Block GMRES + Solver Types: + Block GMRES: + Output Frequency: 20 + Output Style: 1 + Verbosity: 33 + Maximum Iterations: 200 + Block Size: 1 + Num Blocks: 200 + Flexible Gmres: false + VerboseObject: + Output File: none + Verbosity Level: low + +# Preconditioner Information + Preconditioner Type: MueLu + Preconditioner Types: + + Ifpack2: + Overlap: 1 + Prec Type: ILUT + + MueLu: + Matrix: + PDE equations: 2 + Factories: + myLineDetectionFact: + factory: LineDetectionFactory + 'linedetection: orientation': coordinates + mySemiCoarsenPFact1: + factory: SemiCoarsenPFactory + 'semicoarsen: coarsen rate': 14 + UncoupledAggregationFact2: + factory: UncoupledAggregationFactory + 'aggregation: ordering': graph + 'aggregation: max selected neighbors': 0 + 'aggregation: min agg size': 3 + 'aggregation: phase3 avoid singletons': true + MyCoarseMap2: + factory: CoarseMapFactory + Aggregates: UncoupledAggregationFact2 + myTentativePFact2: + 'tentative: calculate qr': true + factory: TentativePFactory + Aggregates: UncoupledAggregationFact2 + CoarseMap: MyCoarseMap2 + mySaPFact2: + 'sa: eigenvalue estimate num iterations': 10 + 'sa: damping factor': 1.33333e+00 + factory: SaPFactory + P: myTentativePFact2 + myTransferCoordinatesFact: + factory: CoordinatesTransferFactory + CoarseMap: MyCoarseMap2 + Aggregates: UncoupledAggregationFact2 + myTogglePFact: + factory: TogglePFactory + 'semicoarsen: number of levels': 2 + TransferFactories: + P1: mySemiCoarsenPFact1 + P2: mySaPFact2 + Ptent1: mySemiCoarsenPFact1 + Ptent2: myTentativePFact2 + Nullspace1: mySemiCoarsenPFact1 + Nullspace2: myTentativePFact2 + myRestrictorFact: + factory: TransPFactory + P: myTogglePFact + myToggleTransferCoordinatesFact: + factory: ToggleCoordinatesTransferFactory + Chosen P: myTogglePFact + TransferFactories: + Coordinates1: mySemiCoarsenPFact1 + Coordinates2: myTransferCoordinatesFact + myRAPFact: + factory: RAPFactory + P: myTogglePFact + R: myRestrictorFact + TransferFactories: + For Coordinates: myToggleTransferCoordinatesFact + myRepartitionHeuristicFact: + factory: RepartitionHeuristicFactory + A: myRAPFact + 'repartition: min rows per proc': 3000 + 'repartition: max imbalance': 1.327e+00 + 'repartition: start level': 1 + myZoltanInterface: + factory: ZoltanInterface + A: myRAPFact + Coordinates: myToggleTransferCoordinatesFact + number of partitions: myRepartitionHeuristicFact + myRepartitionFact: + factory: RepartitionFactory + A: myRAPFact + Partition: myZoltanInterface + 'repartition: remap parts': true + number of partitions: myRepartitionHeuristicFact + myRebalanceProlongatorFact: + factory: RebalanceTransferFactory + type: Interpolation + P: myTogglePFact + Coordinates: myToggleTransferCoordinatesFact + Nullspace: myTogglePFact + myRebalanceRestrictionFact: + factory: RebalanceTransferFactory + type: Restriction + R: myRestrictorFact + myRebalanceAFact: + factory: RebalanceAcFactory + A: myRAPFact + TransferFactories: { } + mySmoother1: + factory: TrilinosSmoother + type: LINESMOOTHING_BANDEDRELAXATION + 'smoother: pre or post': both + ParameterList: + 'relaxation: type': Gauss-Seidel + 'relaxation: sweeps': 1 + 'relaxation: damping factor': 1.0 + mySmoother3: + factory: TrilinosSmoother + type: RELAXATION + 'smoother: pre or post': both + ParameterList: + 'relaxation: type': Gauss-Seidel + 'relaxation: sweeps': 1 + 'relaxation: damping factor': 1.0 + mySmoother4: + factory: TrilinosSmoother + type: RELAXATION + 'smoother: pre or post': pre + ParameterList: + 'relaxation: type': Gauss-Seidel + 'relaxation: sweeps': 4 + 'relaxation: damping factor': 1.0 + Hierarchy: + max levels: 7 + 'coarse: max size': 2000 + verbosity: None + Finest: + Smoother: mySmoother1 + CoarseSolver: mySmoother4 + P: myRebalanceProlongatorFact + Nullspace: myRebalanceProlongatorFact + CoarseNumZLayers: myLineDetectionFact + LineDetection_Layers: myLineDetectionFact + LineDetection_VertLineIds: myLineDetectionFact + A: myRebalanceAFact + Coordinates: myRebalanceProlongatorFact + Importer: myRepartitionFact + All: + startLevel: 1 + Smoother: mySmoother4 + CoarseSolver: mySmoother4 + P: myRebalanceProlongatorFact + Nullspace: myRebalanceProlongatorFact + CoarseNumZLayers: myLineDetectionFact + LineDetection_Layers: myLineDetectionFact + LineDetection_VertLineIds: myLineDetectionFact + A: myRebalanceAFact + Coordinates: myRebalanceProlongatorFact + Importer: myRepartitionFact + diff --git a/compass/landice/tests/mismipplus/run_model.py b/compass/landice/tests/mismipplus/run_model.py index 8013bfcaaf..925a3ec608 100644 --- a/compass/landice/tests/mismipplus/run_model.py +++ b/compass/landice/tests/mismipplus/run_model.py @@ -1,5 +1,7 @@ import os +import xarray as xr + from compass.landice.tests.mismipplus.tasks import ( approx_cell_count, exact_cell_count, @@ -27,7 +29,9 @@ class RunModel(Step): The nominal distance [m] between horizontal grid points (dcEdge). """ def __init__(self, test_case, name, subdir=None, resolution=None, - ntasks=1, min_tasks=None, openmp_threads=1, suffixes=None): + ntasks=1, min_tasks=None, openmp_threads=1, suffixes=None, + albany_input_yaml='albany_input.yaml', + debris_friction=False): """ Create a new test case @@ -67,11 +71,20 @@ def __init__(self, test_case, name, subdir=None, resolution=None, the ``restart_run`` step of the ``restart_test`` runs the model twice, the second time with ``namelist.landice.rst`` and ``streams.landice.rst`` + + albany_input_yaml : str, optional + The name of the Albany input yaml file in the package to use for + this run. + + debris_friction : bool, optional + Whether to apply mesh field updates for the debris-friction + variant. """ if suffixes is None: suffixes = ['landice'] self.suffixes = suffixes + self.debris_friction = debris_friction # The condition below will only be true for the `SpinUp` testcase # where resolution is not know at the time of object construction @@ -105,8 +118,9 @@ def __init__(self, test_case, name, subdir=None, resolution=None, out_name='streams.{}'.format(suffix)) self.add_input_file(filename='albany_input.yaml', - package='compass.landice.tests.mismipplus', - copy=True) + target=albany_input_yaml, + package='compass.landice.tests.mismipplus', + copy=True) self.add_model_as_input() @@ -178,9 +192,21 @@ def run(self): self.update_namelist_at_runtime( {'config_ice_density': f'{ice_density}'}) + if self.debris_friction: + self._update_mesh_for_debris_friction() + make_graph_file(mesh_filename=self.mesh_file, graph_filename='graph.info') for suffix in self.suffixes: run_model(step=self, namelist='namelist.{}'.format(suffix), streams='streams.{}'.format(suffix)) + + def _update_mesh_for_debris_friction(self): + with xr.open_dataset(self.mesh_file) as ds_mesh: + ds_mesh['muFriction'].loc[:] = 0.4 + ds_mesh['bedRoughnessBC'] = xr.full_like(ds_mesh['muFriction'], + 6000.0) + ds_mesh['basalDebrisFactor'] = xr.where( + ds_mesh['xCell'] < 200000.0, 3.2e-2, 0.0) + ds_mesh.to_netcdf(self.mesh_file, mode='a') diff --git a/compass/landice/tests/mismipplus/smoke_test/__init__.py b/compass/landice/tests/mismipplus/smoke_test/__init__.py index 79293aff36..cb2bebcba3 100644 --- a/compass/landice/tests/mismipplus/smoke_test/__init__.py +++ b/compass/landice/tests/mismipplus/smoke_test/__init__.py @@ -13,7 +13,7 @@ class SmokeTest(TestCase): spin-up that has previously been run to steady state """ - def __init__(self, test_group, resolution): + def __init__(self, test_group, resolution, debris_friction=False): """ Create the test case @@ -25,14 +25,28 @@ def __init__(self, test_group, resolution): resolution : float The resolution of the test case. Valid options are defined in the test group constructor. + + debris_friction : bool, optional + Whether to configure a variant that uses debris-friction fields + and Albany input options. """ name = 'smoke_test' - subdir = f"{name}/{resolution:4.0f}m" + if debris_friction: + subdir = f"{name}/debris_friction/{resolution:4.0f}m" + else: + subdir = f"{name}/{resolution:4.0f}m" super().__init__(test_group=test_group, name=name, subdir=subdir) step_name = 'run_model' - step = RunModel(test_case=self, name=step_name, resolution=resolution) + if debris_friction: + albany_input_yaml = 'albany_input_debrisfriction.yaml' + else: + albany_input_yaml = 'albany_input.yaml' + + step = RunModel(test_case=self, name=step_name, resolution=resolution, + albany_input_yaml=albany_input_yaml, + debris_friction=debris_friction) # download and link the mesh, eventually this will need to be # resolution aware. ``configure`` method is probably a better place @@ -40,7 +54,8 @@ def __init__(self, test_group, resolution): step.mesh_file = 'landice_grid.nc' step.add_input_file(filename=step.mesh_file, target='MISMIP_2km_20220502.nc', - database='') + database='', + copy=debris_friction) self.add_step(step) From 261abd9dfb328542b83d4a2e650f2fd8db0be9ae Mon Sep 17 00:00:00 2001 From: Matthew Hoffman Date: Fri, 27 Feb 2026 22:07:34 -0700 Subject: [PATCH 3/9] mismip+ updates * shorten smoke test length * add fallback for core_per_node --- compass/landice/tests/mismipplus/namelist.landice | 2 +- compass/landice/tests/mismipplus/tasks.py | 7 ++++++- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/compass/landice/tests/mismipplus/namelist.landice b/compass/landice/tests/mismipplus/namelist.landice index e0cde9724e..5baa460fdd 100644 --- a/compass/landice/tests/mismipplus/namelist.landice +++ b/compass/landice/tests/mismipplus/namelist.landice @@ -1,5 +1,5 @@ config_start_time = '0001-01-01_00:00:00' -config_stop_time = '0006-01-01_00:00:00' +config_stop_time = '0003-01-01_00:00:00' config_adaptive_timestep = .true. config_adaptive_timestep_include_calving = .false. config_block_decomp_file_prefix = 'graph.info.part.' diff --git a/compass/landice/tests/mismipplus/tasks.py b/compass/landice/tests/mismipplus/tasks.py index 6039cc7e95..b97fd61041 100644 --- a/compass/landice/tests/mismipplus/tasks.py +++ b/compass/landice/tests/mismipplus/tasks.py @@ -1,3 +1,5 @@ +import multiprocessing + import xarray as xr # Following from: @@ -32,7 +34,10 @@ def get_ntasks_from_cell_count(config, cell_count): """ # read MPI related parameters from configuration file - cores_per_node = config.getint('parallel', 'cores_per_node') + if config.has_option('parallel', 'cores_per_node'): + cores_per_node = config.getint('parallel', 'cores_per_node') + else: + cores_per_node = multiprocessing.cpu_count() max_cells_per_core = config.getint('mismipplus', 'max_cells_per_core') goal_cells_per_core = config.getint('mismipplus', 'goal_cells_per_core') From a789e19c750409004ec6a0d8df1ba2355c6eeccf Mon Sep 17 00:00:00 2001 From: Matthew Hoffman Date: Mon, 2 Mar 2026 19:47:15 -0700 Subject: [PATCH 4/9] Support 3 friction laws for MISMIP+ Refactor smoke_test and run_model for MISMIP+ case to support 3 variants: weertman, regularized coulomb, debris friction Each has a different yaml file, which is selected based on the variant. --- compass/landice/tests/mismipplus/__init__.py | 11 +- .../albany_input_debrisfriction.yaml | 8 +- .../albany_input_regularized_coulomb.yaml | 239 ++++++++++++++++++ ..._input.yaml => albany_input_weertman.yaml} | 0 compass/landice/tests/mismipplus/run_model.py | 42 ++- .../tests/mismipplus/smoke_test/__init__.py | 42 +-- 6 files changed, 304 insertions(+), 38 deletions(-) create mode 100644 compass/landice/tests/mismipplus/albany_input_regularized_coulomb.yaml rename compass/landice/tests/mismipplus/{albany_input.yaml => albany_input_weertman.yaml} (100%) diff --git a/compass/landice/tests/mismipplus/__init__.py b/compass/landice/tests/mismipplus/__init__.py index fd18948370..f661fc6a3e 100644 --- a/compass/landice/tests/mismipplus/__init__.py +++ b/compass/landice/tests/mismipplus/__init__.py @@ -17,8 +17,9 @@ def __init__(self, mpas_core): self.add_test_case(SpinUp(test_group=self)) for resolution in [2000]: - self.add_test_case(SmokeTest(test_group=self, - resolution=resolution)) - self.add_test_case(SmokeTest(test_group=self, - resolution=resolution, - debris_friction=True)) + for basal_friction in ['weertman', + 'regularized_coulomb', + 'debris_friction']: + self.add_test_case(SmokeTest(test_group=self, + resolution=resolution, + basal_friction=basal_friction)) diff --git a/compass/landice/tests/mismipplus/albany_input_debrisfriction.yaml b/compass/landice/tests/mismipplus/albany_input_debrisfriction.yaml index 03ff82e5b3..7df80430d3 100644 --- a/compass/landice/tests/mismipplus/albany_input_debrisfriction.yaml +++ b/compass/landice/tests/mismipplus/albany_input_debrisfriction.yaml @@ -2,10 +2,8 @@ --- ANONYMOUS: Problem: - LandIce Field Norm: - sliding_velocity_basalside: - Regularization Type: Given Value - Regularization Value: 1.0e-4 + Dirichlet BCs: + SDBC on NS dirichlet for DOF U1 prescribe Field: dirichlet_field LandIce BCs: BC 0: Cubature Degree: 4 @@ -16,7 +14,7 @@ ANONYMOUS: Effective Pressure Regularization: 1.0e3 Sliding Velocity Regularization: 5.0e2 Flow Rate Type: Constant - Flow Rate: 4.537e-24 # Pa^-n s^-1 + Flow Rate: 6.338e-25 # Pa^-n s^-1 # # Discretization Description # Discretization: # Exodus Output File Name: albany_output.exo diff --git a/compass/landice/tests/mismipplus/albany_input_regularized_coulomb.yaml b/compass/landice/tests/mismipplus/albany_input_regularized_coulomb.yaml new file mode 100644 index 0000000000..22c60f310b --- /dev/null +++ b/compass/landice/tests/mismipplus/albany_input_regularized_coulomb.yaml @@ -0,0 +1,239 @@ +%YAML 1.1 +--- +ANONYMOUS: + Problem: + Dirichlet BCs: + SDBC on NS dirichlet for DOF U1 prescribe Field: dirichlet_field + LandIce BCs: + BC 0: + Side Set Name: basalside + Type: Basal Friction + Basal Friction Coefficient: + Type: Regularized Coulomb + Mu Type: Field + Power Exponent: 0.3333333333 + Effective Pressure Type: Hydrostatic Computed at Nodes + Zero Beta On Floating Ice: true + LandIce Viscosity: + Type: 'Glen''s Law' + Flow Rate Type: Uniform + Glen's Law A: 6.338e-25 + +# Discretization Description +# Discretization: +# Exodus Output File Name: albany_output.exo + + Piro: +# Nonlinear Solver Information + NOX: + Nonlinear Solver: Line Search Based + Line Search: + Full Step: + Full Step: 1.0e+00 + Method: Backtrack + Solver Options: + Status Test Check Type: Minimal + Status Tests: + Test Type: Combo + Combo Type: OR + Number of Tests: 2 + Test 0: + Test Type: NormF + Norm Type: Two Norm + Scale Type: Scaled + Tolerance: 1.0e-05 + Test 1: + Test Type: MaxIters + Maximum Iterations: 50 + Printing: + Output Precision: 3 + Output Processor: 0 + Output Information: + Error: true + Warning: true + Outer Iteration: true + Parameters: false + Details: false + Linear Solver Details: false + Stepper Iteration: true + Stepper Details: true + Stepper Parameters: true + + Direction: + Method: Newton + Newton: + Forcing Term Method: Constant + Rescue Bad Newton Solve: true + Linear Solver: + Write Linear System: false + Tolerance: 1.0e-8 + + Stratimikos Linear Solver: + Stratimikos: + +# Linear Solver Information + Linear Solver Type: Belos + Linear Solver Types: + Belos: + Solver Type: Block GMRES + Solver Types: + Block GMRES: + Output Frequency: 20 + Output Style: 1 + Verbosity: 33 + Maximum Iterations: 200 + Block Size: 1 + Num Blocks: 200 + Flexible Gmres: false + VerboseObject: + Output File: none + Verbosity Level: low + +# Preconditioner Information + Preconditioner Type: MueLu + Preconditioner Types: + + Ifpack2: + Overlap: 1 + Prec Type: ILUT + + MueLu: + Matrix: + PDE equations: 2 + Factories: + myLineDetectionFact: + factory: LineDetectionFactory + 'linedetection: orientation': coordinates + mySemiCoarsenPFact1: + factory: SemiCoarsenPFactory + 'semicoarsen: coarsen rate': 14 + UncoupledAggregationFact2: + factory: UncoupledAggregationFactory + 'aggregation: ordering': graph + 'aggregation: max selected neighbors': 0 + 'aggregation: min agg size': 3 + 'aggregation: phase3 avoid singletons': true + MyCoarseMap2: + factory: CoarseMapFactory + Aggregates: UncoupledAggregationFact2 + myTentativePFact2: + 'tentative: calculate qr': true + factory: TentativePFactory + Aggregates: UncoupledAggregationFact2 + CoarseMap: MyCoarseMap2 + mySaPFact2: + 'sa: eigenvalue estimate num iterations': 10 + 'sa: damping factor': 1.33333e+00 + factory: SaPFactory + P: myTentativePFact2 + myTransferCoordinatesFact: + factory: CoordinatesTransferFactory + CoarseMap: MyCoarseMap2 + Aggregates: UncoupledAggregationFact2 + myTogglePFact: + factory: TogglePFactory + 'semicoarsen: number of levels': 2 + TransferFactories: + P1: mySemiCoarsenPFact1 + P2: mySaPFact2 + Ptent1: mySemiCoarsenPFact1 + Ptent2: myTentativePFact2 + Nullspace1: mySemiCoarsenPFact1 + Nullspace2: myTentativePFact2 + myRestrictorFact: + factory: TransPFactory + P: myTogglePFact + myToggleTransferCoordinatesFact: + factory: ToggleCoordinatesTransferFactory + Chosen P: myTogglePFact + TransferFactories: + Coordinates1: mySemiCoarsenPFact1 + Coordinates2: myTransferCoordinatesFact + myRAPFact: + factory: RAPFactory + P: myTogglePFact + R: myRestrictorFact + TransferFactories: + For Coordinates: myToggleTransferCoordinatesFact + myRepartitionHeuristicFact: + factory: RepartitionHeuristicFactory + A: myRAPFact + 'repartition: min rows per proc': 3000 + 'repartition: max imbalance': 1.327e+00 + 'repartition: start level': 1 + myZoltanInterface: + factory: ZoltanInterface + A: myRAPFact + Coordinates: myToggleTransferCoordinatesFact + number of partitions: myRepartitionHeuristicFact + myRepartitionFact: + factory: RepartitionFactory + A: myRAPFact + Partition: myZoltanInterface + 'repartition: remap parts': true + number of partitions: myRepartitionHeuristicFact + myRebalanceProlongatorFact: + factory: RebalanceTransferFactory + type: Interpolation + P: myTogglePFact + Coordinates: myToggleTransferCoordinatesFact + Nullspace: myTogglePFact + myRebalanceRestrictionFact: + factory: RebalanceTransferFactory + type: Restriction + R: myRestrictorFact + myRebalanceAFact: + factory: RebalanceAcFactory + A: myRAPFact + TransferFactories: { } + mySmoother1: + factory: TrilinosSmoother + type: LINESMOOTHING_BANDEDRELAXATION + 'smoother: pre or post': both + ParameterList: + 'relaxation: type': Gauss-Seidel + 'relaxation: sweeps': 1 + 'relaxation: damping factor': 1.0 + mySmoother3: + factory: TrilinosSmoother + type: RELAXATION + 'smoother: pre or post': both + ParameterList: + 'relaxation: type': Gauss-Seidel + 'relaxation: sweeps': 1 + 'relaxation: damping factor': 1.0 + mySmoother4: + factory: TrilinosSmoother + type: RELAXATION + 'smoother: pre or post': pre + ParameterList: + 'relaxation: type': Gauss-Seidel + 'relaxation: sweeps': 4 + 'relaxation: damping factor': 1.0 + Hierarchy: + max levels: 7 + 'coarse: max size': 2000 + verbosity: None + Finest: + Smoother: mySmoother1 + CoarseSolver: mySmoother4 + P: myRebalanceProlongatorFact + Nullspace: myRebalanceProlongatorFact + CoarseNumZLayers: myLineDetectionFact + LineDetection_Layers: myLineDetectionFact + LineDetection_VertLineIds: myLineDetectionFact + A: myRebalanceAFact + Coordinates: myRebalanceProlongatorFact + Importer: myRepartitionFact + All: + startLevel: 1 + Smoother: mySmoother4 + CoarseSolver: mySmoother4 + P: myRebalanceProlongatorFact + Nullspace: myRebalanceProlongatorFact + CoarseNumZLayers: myLineDetectionFact + LineDetection_Layers: myLineDetectionFact + LineDetection_VertLineIds: myLineDetectionFact + A: myRebalanceAFact + Coordinates: myRebalanceProlongatorFact + Importer: myRepartitionFact diff --git a/compass/landice/tests/mismipplus/albany_input.yaml b/compass/landice/tests/mismipplus/albany_input_weertman.yaml similarity index 100% rename from compass/landice/tests/mismipplus/albany_input.yaml rename to compass/landice/tests/mismipplus/albany_input_weertman.yaml diff --git a/compass/landice/tests/mismipplus/run_model.py b/compass/landice/tests/mismipplus/run_model.py index 925a3ec608..3bc751b927 100644 --- a/compass/landice/tests/mismipplus/run_model.py +++ b/compass/landice/tests/mismipplus/run_model.py @@ -27,11 +27,13 @@ class RunModel(Step): resolution : float The nominal distance [m] between horizontal grid points (dcEdge). + + basal_friction : {'weertman', 'regularized_coulomb', 'debris_friction'} + The basal-friction variant for this run. """ def __init__(self, test_case, name, subdir=None, resolution=None, ntasks=1, min_tasks=None, openmp_threads=1, suffixes=None, - albany_input_yaml='albany_input.yaml', - debris_friction=False): + basal_friction='weertman'): """ Create a new test case @@ -72,19 +74,29 @@ def __init__(self, test_case, name, subdir=None, resolution=None, twice, the second time with ``namelist.landice.rst`` and ``streams.landice.rst`` - albany_input_yaml : str, optional - The name of the Albany input yaml file in the package to use for - this run. - - debris_friction : bool, optional - Whether to apply mesh field updates for the debris-friction - variant. + basal_friction : {'weertman', 'regularized_coulomb', + 'debris_friction'}, optional + The basal-friction variant for this run. """ if suffixes is None: suffixes = ['landice'] self.suffixes = suffixes - self.debris_friction = debris_friction + valid_basal_friction = { + 'weertman', + 'regularized_coulomb', + 'debris_friction' + } + if basal_friction not in valid_basal_friction: + raise ValueError( + f'Unsupported basal_friction "{basal_friction}". ' + f'Valid options are: {sorted(valid_basal_friction)}') + self.basal_friction = basal_friction + albany_input_yaml = { + 'weertman': 'albany_input_weertman.yaml', + 'regularized_coulomb': 'albany_input_regularized_coulomb.yaml', + 'debris_friction': 'albany_input_debrisfriction.yaml' + }[self.basal_friction] # The condition below will only be true for the `SpinUp` testcase # where resolution is not know at the time of object construction @@ -192,7 +204,9 @@ def run(self): self.update_namelist_at_runtime( {'config_ice_density': f'{ice_density}'}) - if self.debris_friction: + if self.basal_friction == 'regularized_coulomb': + self._update_mesh_for_regularized_coulomb() + elif self.basal_friction == 'debris_friction': self._update_mesh_for_debris_friction() make_graph_file(mesh_filename=self.mesh_file, @@ -210,3 +224,9 @@ def _update_mesh_for_debris_friction(self): ds_mesh['basalDebrisFactor'] = xr.where( ds_mesh['xCell'] < 200000.0, 3.2e-2, 0.0) ds_mesh.to_netcdf(self.mesh_file, mode='a') + + def _update_mesh_for_regularized_coulomb(self): + with xr.open_dataset(self.mesh_file) as ds_mesh: + ds_mesh['muFriction'].loc[:] = 0.4 + ds_mesh['bedRoughnessBC'].loc[:] = 1.25e-4 + ds_mesh.to_netcdf(self.mesh_file, mode='a') diff --git a/compass/landice/tests/mismipplus/smoke_test/__init__.py b/compass/landice/tests/mismipplus/smoke_test/__init__.py index cb2bebcba3..3df0c2f872 100644 --- a/compass/landice/tests/mismipplus/smoke_test/__init__.py +++ b/compass/landice/tests/mismipplus/smoke_test/__init__.py @@ -13,7 +13,7 @@ class SmokeTest(TestCase): spin-up that has previously been run to steady state """ - def __init__(self, test_group, resolution, debris_friction=False): + def __init__(self, test_group, resolution, basal_friction='weertman'): """ Create the test case @@ -26,27 +26,35 @@ def __init__(self, test_group, resolution, debris_friction=False): The resolution of the test case. Valid options are defined in the test group constructor. - debris_friction : bool, optional - Whether to configure a variant that uses debris-friction fields - and Albany input options. + basal_friction : {'weertman', 'regularized_coulomb', + 'debris_friction'}, optional + The basal-friction variant to configure. """ - name = 'smoke_test' - if debris_friction: - subdir = f"{name}/debris_friction/{resolution:4.0f}m" - else: - subdir = f"{name}/{resolution:4.0f}m" + base_name = 'smoke_test' + valid_basal_friction = { + 'weertman', + 'regularized_coulomb', + 'debris_friction' + } + if basal_friction not in valid_basal_friction: + raise ValueError( + f'Unsupported basal_friction "{basal_friction}". ' + f'Valid options are: {sorted(valid_basal_friction)}') + + if resolution != 2000: + raise ValueError( + f'Unsupported resolution "{resolution}". ' + 'The only valid resolution is 2000m.') + + resolution_name = f'{resolution:0.0f}m' + name = f'{base_name}_{resolution_name}_{basal_friction}' + subdir = f"{base_name}/{resolution_name}/{basal_friction}" super().__init__(test_group=test_group, name=name, subdir=subdir) step_name = 'run_model' - if debris_friction: - albany_input_yaml = 'albany_input_debrisfriction.yaml' - else: - albany_input_yaml = 'albany_input.yaml' - step = RunModel(test_case=self, name=step_name, resolution=resolution, - albany_input_yaml=albany_input_yaml, - debris_friction=debris_friction) + basal_friction=basal_friction) # download and link the mesh, eventually this will need to be # resolution aware. ``configure`` method is probably a better place @@ -55,7 +63,7 @@ def __init__(self, test_group, resolution, debris_friction=False): step.add_input_file(filename=step.mesh_file, target='MISMIP_2km_20220502.nc', database='', - copy=debris_friction) + copy=True) self.add_step(step) From b4e462750d99230ba9e4b11b09899392e5dbdff6 Mon Sep 17 00:00:00 2001 From: Matthew Hoffman Date: Mon, 2 Mar 2026 19:54:04 -0700 Subject: [PATCH 5/9] Update docs and full_integration suite --- compass/landice/suites/full_integration.txt | 4 +-- .../landice/test_groups/mismipplus.rst | 33 +++++++++++++++---- docs/users_guide/landice/suites.rst | 2 ++ .../landice/test_groups/mismipplus.rst | 10 +++++- 4 files changed, 40 insertions(+), 9 deletions(-) diff --git a/compass/landice/suites/full_integration.txt b/compass/landice/suites/full_integration.txt index 86d2d0bafc..8300c81cee 100644 --- a/compass/landice/suites/full_integration.txt +++ b/compass/landice/suites/full_integration.txt @@ -18,8 +18,8 @@ landice/dome/2000m/fo_restart_test landice/dome/variable_resolution/fo_decomposition_test landice/dome/variable_resolution/fo_restart_test landice/circular_shelf/decomposition_test -landice/mismipplus/smoke_test/2000m -landice/mismipplus/smoke_test/debris_friction/2000m +landice/mismipplus/smoke_test/2000m/regularized_coulomb +landice/mismipplus/smoke_test/2000m/debris_friction landice/greenland/fo_decomposition_test landice/greenland/fo_restart_test landice/thwaites/fo_decomposition_test diff --git a/docs/developers_guide/landice/test_groups/mismipplus.rst b/docs/developers_guide/landice/test_groups/mismipplus.rst index c525155b84..9bd3d9e0d9 100644 --- a/docs/developers_guide/landice/test_groups/mismipplus.rst +++ b/docs/developers_guide/landice/test_groups/mismipplus.rst @@ -23,8 +23,11 @@ requires building MALI with the Albany library. The test group has a shared ``namelist.landice`` file with a few common namelist options related to model numerics, and a shared ``streams.landice`` file that defines ``input``, ``restart``, and -``output``, and ``globalStatsOutPut`` streams. There also is an -``albany_input.yaml`` file that is needed for running the FO solver. +``output``, and ``globalStatsOutPut`` streams. There are three Albany input +templates used by the ``smoke_test`` basal-friction variants: +``albany_input_weertman.yaml``, +``albany_input_regularized_coulomb.yaml`` and +``albany_input_debrisfriction.yaml``. setup_mesh @@ -45,7 +48,11 @@ run_model The class :py:class:`compass.landice.tests.mismipplus.run_model.RunModel` defines a step for setting up the input files (i.e. streams, namelist, -``albany_input.yaml``) needed to run MALI. The initial condition can either +``albany_input.yaml``) needed to run MALI. To support basal-friction variants, +``RunModel`` selects one of the three packaged Albany YAML templates based on +``basal_friction`` and stages it as a local ``albany_input.yaml`` file in the +step work directory. +The initial condition can either be downloaded from the shared data server (for the :ref:`landice_mismipplus_smoke_test` testcase) or generated by the :py:class:`compass.landice.tests.mismipplus.setup_mesh.SetupMesh` step @@ -99,6 +106,20 @@ smoke_test ~~~~~~~~~~ The :py:class:`compass.landice.tests.mismipplus.smoke_test.SmokeTest` -performs a 5 year version of the `Ice0` experiment. There is a validation step -that compares the output file against itself. This is to allow the test to be -compared against a baseline if desired. +performs a 5 year version of the `Ice0` experiment. + +The smoke test currently supports only ``resolution=2000`` and includes three +basal-friction variants: + +* ``landice/mismipplus/smoke_test/2000m/weertman`` +* ``landice/mismipplus/smoke_test/2000m/regularized_coulomb`` +* ``landice/mismipplus/smoke_test/2000m/debris_friction`` + +These appear in ``compass list`` as unique test names: + +* ``smoke_test_2000m_weertman`` +* ``smoke_test_2000m_regularized_coulomb`` +* ``smoke_test_2000m_debris_friction`` + +There is a validation step that compares the output file against itself. This +is to allow the test to be compared against a baseline if desired. diff --git a/docs/users_guide/landice/suites.rst b/docs/users_guide/landice/suites.rst index f9353d3a59..0890f449f4 100644 --- a/docs/users_guide/landice/suites.rst +++ b/docs/users_guide/landice/suites.rst @@ -45,6 +45,8 @@ it is run on different numbers of cores (``decomposition_test``). landice/humboldt/mesh-3km_decomposition_test/velo-none_calving-none_subglacialhydro landice/humboldt/mesh-3km_restart_test/velo-none_calving-none_subglacialhydro landice/circular_shelf/decomposition_test + landice/mismipplus/smoke_test/2000m/regularized_coulomb + landice/mismipplus/smoke_test/2000m/debris_friction landice/dome/2000m/fo_decomposition_test landice/dome/2000m/fo_restart_test landice/dome/variable_resolution/fo_restart_test diff --git a/docs/users_guide/landice/test_groups/mismipplus.rst b/docs/users_guide/landice/test_groups/mismipplus.rst index b05dd36fa7..9ce97030f5 100644 --- a/docs/users_guide/landice/test_groups/mismipplus.rst +++ b/docs/users_guide/landice/test_groups/mismipplus.rst @@ -42,7 +42,15 @@ five years using a spun-up `2km mesh `_. The simulation is run with the adaptive timestepper on. There are no configuration options for this test case. -Currently 2000m is the only resolution supported. In the future, the +Currently 2000m is the only resolution supported. + +The smoke test is available in three basal-friction variants: + +* ``landice/mismipplus/smoke_test/2000m/weertman`` +* ``landice/mismipplus/smoke_test/2000m/regularized_coulomb`` +* ``landice/mismipplus/smoke_test/2000m/debris_friction`` + +In the future, the ``spin_up`` test case will be used to generate new versions of the mesh at 8000m, 4000m, 2000m, and 1000m resolutions. From 515d4f949feb2016139a08361cac31caa6e7e70a Mon Sep 17 00:00:00 2001 From: Matthew Hoffman Date: Mon, 2 Mar 2026 20:30:09 -0700 Subject: [PATCH 6/9] Only update frictions field for smoketest --- compass/landice/tests/mismipplus/run_model.py | 35 +++++++++++++++---- .../tests/mismipplus/smoke_test/__init__.py | 6 ++-- 2 files changed, 33 insertions(+), 8 deletions(-) diff --git a/compass/landice/tests/mismipplus/run_model.py b/compass/landice/tests/mismipplus/run_model.py index 3bc751b927..d848f907ae 100644 --- a/compass/landice/tests/mismipplus/run_model.py +++ b/compass/landice/tests/mismipplus/run_model.py @@ -33,7 +33,8 @@ class RunModel(Step): """ def __init__(self, test_case, name, subdir=None, resolution=None, ntasks=1, min_tasks=None, openmp_threads=1, suffixes=None, - basal_friction='weertman'): + basal_friction='weertman', + update_mesh_for_basal_friction=False): """ Create a new test case @@ -77,6 +78,10 @@ def __init__(self, test_case, name, subdir=None, resolution=None, basal_friction : {'weertman', 'regularized_coulomb', 'debris_friction'}, optional The basal-friction variant for this run. + + update_mesh_for_basal_friction : bool, optional + Whether to apply basal-friction-specific updates to mesh fields + before the run. """ if suffixes is None: @@ -92,6 +97,7 @@ def __init__(self, test_case, name, subdir=None, resolution=None, f'Unsupported basal_friction "{basal_friction}". ' f'Valid options are: {sorted(valid_basal_friction)}') self.basal_friction = basal_friction + self.update_mesh_for_basal_friction = update_mesh_for_basal_friction albany_input_yaml = { 'weertman': 'albany_input_weertman.yaml', 'regularized_coulomb': 'albany_input_regularized_coulomb.yaml', @@ -190,6 +196,28 @@ def constrain_resources(self, available_resources): super().constrain_resources(available_resources) + def process_inputs_and_outputs(self): + """ + Process inputs/outputs and apply optional mesh updates during setup. + + Notes + ----- + Overriding ``process_inputs_and_outputs()`` is uncommon in COMPASS + steps, where most customization happens in ``setup()`` or + ``runtime_setup()``. We override it here so friction-specific mesh + updates are applied only after all input files have been staged, + ensuring ``landice_grid.nc`` exists and that users can inspect the + updated mesh directly after ``compass setup`` and prior to + ``compass run``. + """ + super().process_inputs_and_outputs() + + if self.update_mesh_for_basal_friction: + if self.basal_friction == 'regularized_coulomb': + self._update_mesh_for_regularized_coulomb() + elif self.basal_friction == 'debris_friction': + self._update_mesh_for_debris_friction() + def run(self): """ Run this step of the test case @@ -204,11 +232,6 @@ def run(self): self.update_namelist_at_runtime( {'config_ice_density': f'{ice_density}'}) - if self.basal_friction == 'regularized_coulomb': - self._update_mesh_for_regularized_coulomb() - elif self.basal_friction == 'debris_friction': - self._update_mesh_for_debris_friction() - make_graph_file(mesh_filename=self.mesh_file, graph_filename='graph.info') diff --git a/compass/landice/tests/mismipplus/smoke_test/__init__.py b/compass/landice/tests/mismipplus/smoke_test/__init__.py index 3df0c2f872..f9f04ffee4 100644 --- a/compass/landice/tests/mismipplus/smoke_test/__init__.py +++ b/compass/landice/tests/mismipplus/smoke_test/__init__.py @@ -53,8 +53,10 @@ def __init__(self, test_group, resolution, basal_friction='weertman'): super().__init__(test_group=test_group, name=name, subdir=subdir) step_name = 'run_model' - step = RunModel(test_case=self, name=step_name, resolution=resolution, - basal_friction=basal_friction) + step = RunModel(test_case=self, name=step_name, + resolution=resolution, + basal_friction=basal_friction, + update_mesh_for_basal_friction=True) # download and link the mesh, eventually this will need to be # resolution aware. ``configure`` method is probably a better place From dd14cd32033fdcc1e22524d389a4a4ddb59d7814 Mon Sep 17 00:00:00 2001 From: Matthew Hoffman Date: Mon, 2 Mar 2026 20:41:16 -0700 Subject: [PATCH 7/9] update api docs --- docs/developers_guide/landice/api.rst | 1 + 1 file changed, 1 insertion(+) diff --git a/docs/developers_guide/landice/api.rst b/docs/developers_guide/landice/api.rst index ae9736f688..ee66fc76f1 100644 --- a/docs/developers_guide/landice/api.rst +++ b/docs/developers_guide/landice/api.rst @@ -443,6 +443,7 @@ mismipplus run_model.RunModel run_model.RunModel.setup run_model.RunModel.constrain_resources + run_model.RunModel.process_inputs_and_outputs run_model.RunModel.run tasks.get_ntasks_from_cell_count From 2d041e899d5debe5283dc30811397d85217c772d Mon Sep 17 00:00:00 2001 From: Matthew Hoffman Date: Mon, 2 Mar 2026 21:14:21 -0700 Subject: [PATCH 8/9] Cleanup --- .../mismipplus/albany_input_debrisfriction.yaml | 1 - compass/landice/tests/mismipplus/run_model.py | 15 ++++++++++----- .../tests/mismipplus/smoke_test/__init__.py | 4 ++-- 3 files changed, 12 insertions(+), 8 deletions(-) diff --git a/compass/landice/tests/mismipplus/albany_input_debrisfriction.yaml b/compass/landice/tests/mismipplus/albany_input_debrisfriction.yaml index 7df80430d3..e934a60079 100644 --- a/compass/landice/tests/mismipplus/albany_input_debrisfriction.yaml +++ b/compass/landice/tests/mismipplus/albany_input_debrisfriction.yaml @@ -6,7 +6,6 @@ ANONYMOUS: SDBC on NS dirichlet for DOF U1 prescribe Field: dirichlet_field LandIce BCs: BC 0: - Cubature Degree: 4 Basal Friction Coefficient: Type: Debris Friction Power Exponent: 0.3333333333 diff --git a/compass/landice/tests/mismipplus/run_model.py b/compass/landice/tests/mismipplus/run_model.py index d848f907ae..a6a8325649 100644 --- a/compass/landice/tests/mismipplus/run_model.py +++ b/compass/landice/tests/mismipplus/run_model.py @@ -240,16 +240,21 @@ def run(self): streams='streams.{}'.format(suffix)) def _update_mesh_for_debris_friction(self): - with xr.open_dataset(self.mesh_file) as ds_mesh: + mesh_filename = os.path.join(self.work_dir, self.mesh_file) + + with xr.open_dataset(mesh_filename) as ds_mesh: ds_mesh['muFriction'].loc[:] = 0.4 ds_mesh['bedRoughnessBC'] = xr.full_like(ds_mesh['muFriction'], 6000.0) ds_mesh['basalDebrisFactor'] = xr.where( ds_mesh['xCell'] < 200000.0, 3.2e-2, 0.0) - ds_mesh.to_netcdf(self.mesh_file, mode='a') + ds_mesh.to_netcdf(mesh_filename, mode='a') def _update_mesh_for_regularized_coulomb(self): - with xr.open_dataset(self.mesh_file) as ds_mesh: + mesh_filename = os.path.join(self.work_dir, self.mesh_file) + + with xr.open_dataset(mesh_filename) as ds_mesh: ds_mesh['muFriction'].loc[:] = 0.4 - ds_mesh['bedRoughnessBC'].loc[:] = 1.25e-4 - ds_mesh.to_netcdf(self.mesh_file, mode='a') + ds_mesh['bedRoughnessBC'] = xr.full_like(ds_mesh['muFriction'], + 1.25e-4) + ds_mesh.to_netcdf(mesh_filename, mode='a') \ No newline at end of file diff --git a/compass/landice/tests/mismipplus/smoke_test/__init__.py b/compass/landice/tests/mismipplus/smoke_test/__init__.py index f9f04ffee4..dda842e0ac 100644 --- a/compass/landice/tests/mismipplus/smoke_test/__init__.py +++ b/compass/landice/tests/mismipplus/smoke_test/__init__.py @@ -55,8 +55,8 @@ def __init__(self, test_group, resolution, basal_friction='weertman'): step_name = 'run_model' step = RunModel(test_case=self, name=step_name, resolution=resolution, - basal_friction=basal_friction, - update_mesh_for_basal_friction=True) + basal_friction=basal_friction, + update_mesh_for_basal_friction=True) # download and link the mesh, eventually this will need to be # resolution aware. ``configure`` method is probably a better place From 3f4b38bac48ab8cec81623b5c6fbd418f74df5e3 Mon Sep 17 00:00:00 2001 From: Matthew Hoffman Date: Tue, 3 Mar 2026 20:14:03 -0700 Subject: [PATCH 9/9] Updates from code review --- .../tests/mismipplus/albany_input_debrisfriction.yaml | 6 ++++-- .../mismipplus/albany_input_regularized_coulomb.yaml | 1 - .../landice/tests/mismipplus/albany_input_weertman.yaml | 1 - compass/landice/tests/mismipplus/run_model.py | 8 +++++--- 4 files changed, 9 insertions(+), 7 deletions(-) diff --git a/compass/landice/tests/mismipplus/albany_input_debrisfriction.yaml b/compass/landice/tests/mismipplus/albany_input_debrisfriction.yaml index e934a60079..d905783998 100644 --- a/compass/landice/tests/mismipplus/albany_input_debrisfriction.yaml +++ b/compass/landice/tests/mismipplus/albany_input_debrisfriction.yaml @@ -12,8 +12,10 @@ ANONYMOUS: Effective Pressure Type: Hydrostatic Computed at Nodes Effective Pressure Regularization: 1.0e3 Sliding Velocity Regularization: 5.0e2 - Flow Rate Type: Constant - Flow Rate: 6.338e-25 # Pa^-n s^-1 + LandIce Viscosity: + Type: 'Glen''s Law' + Flow Rate Type: Uniform + Glen's Law A: 6.338e-25 # # Discretization Description # Discretization: # Exodus Output File Name: albany_output.exo diff --git a/compass/landice/tests/mismipplus/albany_input_regularized_coulomb.yaml b/compass/landice/tests/mismipplus/albany_input_regularized_coulomb.yaml index 22c60f310b..c23313c1fe 100644 --- a/compass/landice/tests/mismipplus/albany_input_regularized_coulomb.yaml +++ b/compass/landice/tests/mismipplus/albany_input_regularized_coulomb.yaml @@ -13,7 +13,6 @@ ANONYMOUS: Mu Type: Field Power Exponent: 0.3333333333 Effective Pressure Type: Hydrostatic Computed at Nodes - Zero Beta On Floating Ice: true LandIce Viscosity: Type: 'Glen''s Law' Flow Rate Type: Uniform diff --git a/compass/landice/tests/mismipplus/albany_input_weertman.yaml b/compass/landice/tests/mismipplus/albany_input_weertman.yaml index 6930883712..0851d44407 100644 --- a/compass/landice/tests/mismipplus/albany_input_weertman.yaml +++ b/compass/landice/tests/mismipplus/albany_input_weertman.yaml @@ -13,7 +13,6 @@ ANONYMOUS: Mu Type: Field Power Exponent: 0.3333333333 Effective Pressure Type: Field - Zero Beta On Floating Ice: true LandIce Viscosity: Type: 'Glen''s Law' Flow Rate Type: Uniform diff --git a/compass/landice/tests/mismipplus/run_model.py b/compass/landice/tests/mismipplus/run_model.py index a6a8325649..0651e9ae94 100644 --- a/compass/landice/tests/mismipplus/run_model.py +++ b/compass/landice/tests/mismipplus/run_model.py @@ -244,10 +244,12 @@ def _update_mesh_for_debris_friction(self): with xr.open_dataset(mesh_filename) as ds_mesh: ds_mesh['muFriction'].loc[:] = 0.4 - ds_mesh['bedRoughnessBC'] = xr.full_like(ds_mesh['muFriction'], + ds_mesh['bedRoughnessRC'] = xr.full_like(ds_mesh['muFriction'], 6000.0) ds_mesh['basalDebrisFactor'] = xr.where( ds_mesh['xCell'] < 200000.0, 3.2e-2, 0.0) + ds_mesh['bulkFriction'] = xr.where( + ds_mesh['xCell'] < 400000.0, 0.005, 0.0) ds_mesh.to_netcdf(mesh_filename, mode='a') def _update_mesh_for_regularized_coulomb(self): @@ -255,6 +257,6 @@ def _update_mesh_for_regularized_coulomb(self): with xr.open_dataset(mesh_filename) as ds_mesh: ds_mesh['muFriction'].loc[:] = 0.4 - ds_mesh['bedRoughnessBC'] = xr.full_like(ds_mesh['muFriction'], - 1.25e-4) + ds_mesh['bedRoughnessRC'] = xr.full_like(ds_mesh['muFriction'], + 6250.0) ds_mesh.to_netcdf(mesh_filename, mode='a') \ No newline at end of file