diff --git a/compass/landice/iceshelf_melt.py b/compass/landice/iceshelf_melt.py index f545917305..b2a7fc1650 100644 --- a/compass/landice/iceshelf_melt.py +++ b/compass/landice/iceshelf_melt.py @@ -1,8 +1,9 @@ import numpy as np -from netCDF4 import Dataset +from netCDF4 import Dataset, chartostring -def calc_mean_TF(geometry_file, forcing_file): +def calc_mean_TF(geometry_file, forcing_file, start_year=None, + end_year=None): """ Function to calculate mean thermal forcing across all floating ice in a domain. @@ -14,6 +15,16 @@ def calc_mean_TF(geometry_file, forcing_file): forcing_file : str name of file containing MALI ocean forcing information + + start_year : int, optional + First year (inclusive) of the period over which the 3D thermal + forcing is time-averaged before interpolation to the ice draft. + Years are read from ``xtime`` in ``forcing_file``. If neither + ``start_year`` nor ``end_year`` is given, the first time slice is + used. + + end_year : int, optional + Last year (inclusive) of the averaging period """ rhoi = 910.0 @@ -21,7 +32,10 @@ def calc_mean_TF(geometry_file, forcing_file): ff = Dataset(forcing_file, 'r') zOcean = ff.variables['ismip6shelfMelt_zOcean'][:] - TFocean = ff.variables['ismip6shelfMelt_3dThermalForcing'][0, :, :] + time_indices = _get_time_indices(ff, forcing_file, start_year, end_year) + TFocean = np.ma.mean( + ff.variables['ismip6shelfMelt_3dThermalForcing'][time_indices, :, :], + axis=0) f = Dataset(geometry_file, 'r') thickness = f.variables['thickness'][0, :] @@ -49,3 +63,32 @@ def calc_mean_TF(geometry_file, forcing_file): ff.close() return meanTF, iceshelf_area + + +def _get_time_indices(ff, forcing_file, start_year, end_year): + """ + Get the time indices in the forcing file to average over + """ + if start_year is None and end_year is None: + return [0] + if start_year is None or end_year is None: + raise ValueError('Both start_year and end_year must be given to ' + 'average thermal forcing over a period.') + if start_year > end_year: + raise ValueError(f'start_year ({start_year}) is after end_year ' + f'({end_year}).') + if 'xtime' not in ff.variables: + raise ValueError(f'{forcing_file} has no xtime variable, so a ' + f'calibration year range cannot be used.') + + xtime = ff.variables['xtime'][:] + if xtime.ndim > 1: + xtime = chartostring(xtime) + years = np.array([int(str(time).strip()[0:4]) for time in xtime]) + time_indices = np.nonzero((years >= start_year) & + (years <= end_year))[0] + if len(time_indices) == 0: + raise ValueError(f'No time slices in {forcing_file} fall between ' + f'{start_year} and {end_year}. Available years: ' + f'{years.min()}-{years.max()}.') + return time_indices diff --git a/compass/landice/tests/ensemble_generator/ensemble_templates/amery4km_probproj_2024/spinup/ensemble_generator.cfg b/compass/landice/tests/ensemble_generator/ensemble_templates/amery4km_probproj_2024/spinup/ensemble_generator.cfg index 4a6c4b8e30..076a18b459 100644 --- a/compass/landice/tests/ensemble_generator/ensemble_templates/amery4km_probproj_2024/spinup/ensemble_generator.cfg +++ b/compass/landice/tests/ensemble_generator/ensemble_templates/amery4km_probproj_2024/spinup/ensemble_generator.cfg @@ -94,6 +94,13 @@ SMB_file_path = /global/cfs/cdirs/fanssie/MALI_projects/Amery_UQ/Amery_4to20km_f # converting target melt flux to deltaT. iceshelf_area_obs = 60654.e6 +# Optional year range (inclusive) over which thermal forcing in TF_file_path +# is time-averaged when converting meltflux to deltaT. Years are read from +# xtime. Runs still use the full time-varying TF_file_path. If both are +# omitted, the first time slice of TF_file_path is used. +# calibration_start_year = 1995 +# calibration_end_year = 2014 + # Parameter definitions are listed in this section in sampling order. # Use the prefix "nl." for float parameters that map to namelist options. # Each parameter must define " = min, max". diff --git a/compass/landice/tests/ensemble_generator/ensemble_templates/thwaites_gamma0_gnn_2026/__init__.py b/compass/landice/tests/ensemble_generator/ensemble_templates/thwaites_gamma0_gnn_2026/__init__.py new file mode 100644 index 0000000000..e69de29bb2 diff --git a/compass/landice/tests/ensemble_generator/ensemble_templates/thwaites_gamma0_gnn_2026/spinup/__init__.py b/compass/landice/tests/ensemble_generator/ensemble_templates/thwaites_gamma0_gnn_2026/spinup/__init__.py new file mode 100644 index 0000000000..e69de29bb2 diff --git a/compass/landice/tests/ensemble_generator/ensemble_templates/thwaites_gamma0_gnn_2026/spinup/albany_input.yaml b/compass/landice/tests/ensemble_generator/ensemble_templates/thwaites_gamma0_gnn_2026/spinup/albany_input.yaml new file mode 100644 index 0000000000..ede587fdb8 --- /dev/null +++ b/compass/landice/tests/ensemble_generator/ensemble_templates/thwaites_gamma0_gnn_2026/spinup/albany_input.yaml @@ -0,0 +1,239 @@ +%YAML 1.1 +--- +ANONYMOUS: + Problem: + Depth Integrated Model: true + LandIce Field Norm: + sliding_velocity_basalside: + Regularization Type: Given Value + Regularization Value: 1.0e-4 + LandIce BCs: + BC 0: + Cubature Degree: 8 + Basal Friction Coefficient: + Type: Power Law + Power Exponent: 0.2 + Mu Type: Field + Effective Pressure Type: Constant + Effective Pressure: 1.0 + # Zero Effective Pressure On Floating Ice At Nodes: true + Zero Beta On Floating Ice: true + +# 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/ensemble_generator/ensemble_templates/thwaites_gamma0_gnn_2026/spinup/ensemble_generator.cfg b/compass/landice/tests/ensemble_generator/ensemble_templates/thwaites_gamma0_gnn_2026/spinup/ensemble_generator.cfg new file mode 100644 index 0000000000..0f1cbaf10a --- /dev/null +++ b/compass/landice/tests/ensemble_generator/ensemble_templates/thwaites_gamma0_gnn_2026/spinup/ensemble_generator.cfg @@ -0,0 +1,96 @@ +# selector for ensemble template resources +[ensemble_generator] + +# subdirectory within ensemble_templates/ where branch_ensemble options are located +ensemble_template = thwaites_gamma0_gnn_2026 + +# config options for setting up an ensemble + +# start and end numbers for runs to set up and run +# Run numbers should be zero-based. +# Additional runs can be added and run to an existing ensemble +# without affecting existing runs, but trying to set up a run +# that already exists will generate a warning and skip that run. +# These values do not affect viz/analysis, which will include any +# runs it finds. +start_run = 0 +end_run = 7 + +# sampling_method can be 'sobol' for a space-filling Sobol sequence, +# 'uniform' for linear sampling, or 'log-uniform' for logarithmic sampling. +# Uniform and log-uniform are most appropriate for a single-parameter +# sensitivity study because they sample each active parameter using the +# same rank ordering, thus sampling only a small fraction of parameter space +# in higher dimensions. +sampling_method = sobol + +# maximum number of samples to be considered. +# max_samples needs to be greater or equal to (end_run + 1) +# When using uniform or log-uniform sampling, max_samples should equal +# (end_run + 1). +# When using Sobol sequence, max_samples ought to be a power of 2. +# max_samples should not be changed after the first set of ensemble. +# So, when using Sobol sequence, max_samples might be set larger than +# (end_run + 1) if you plan to add more samples to the ensemble later. +max_samples = 1024 + +# basin for comparing model results with observational estimates in +# visualization script. +# Basin options are defined in compass/landice/ais_observations.py +# If desired basin does not exist, it can be added to that dataset. +# (They need not be mutually exclusive.) +# If a basin is not provided, observational comparisons will not be made. +basin = None + +# fraction of CFL-limited time step to be used by the adaptive timestepper +cfl_fraction = 0.8 + +# number of tasks that each ensemble member should be run with +ntasks = 32 + +[spinup_ensemble] + +# Path to the initial condition input file. +input_file_path = /usr/projects/iceberg/trhille/ISMIP6_inputs/thwaites_4to20km/thwaites_4to20km.nc + +# the value of the friction exponent used for the calculation of muFriction +# in the input file +orig_fric_exp = 0.2 + +# Path to thermal forcing file for the mesh to be used +TF_file_path = /usr/projects/iceberg/trhille/ISMIP6_inputs/thwaites_4to20km/forcing/tier1_experiments/expAE05/thwaites_4to20km_AIS_4to20km_r01_20220907_TF_UKESM1-0-LL_SSP585_2300.nc + +# Path to SMB forcing file for the mesh to be used +SMB_file_path = /usr/projects/iceberg/trhille/ISMIP6_inputs/thwaites_4to20km/forcing/tier1_experiments/expAE05/thwaites_4to20km_AIS_4to20km_r01_20220907_smb_UKESM1-0-LL_SSP585_2300_minus1_bare_land.nc + +# Path to ISMIP6 ice-shelf basal melt parameter input file. +basal_melt_param_file_path = /usr/projects/iceberg/trhille/ISMIP6_inputs/thwaites_4to20km/thwaites_4to20km_basin_and_coeff_gamma0_DeltaT_quadratic_non_local_after_relaxation.nc + +# For meltflux perturbations, this observed ice-shelf area is used when +# converting target melt flux to deltaT. This is taken from the first time step +# of Thwaites ISMIP6 simulations. +iceshelf_area_obs = 4668512650 + +# Optional year range (inclusive) over which thermal forcing in TF_file_path +# is time-averaged when converting meltflux to deltaT. Years are read from +# xtime. Runs still use the full time-varying TF_file_path. If both are +# omitted, the first time slice of TF_file_path is used. +calibration_start_year = 1995 +calibration_end_year = 2018 + +# Parameter definitions are listed in this section in sampling order. +# Use the prefix "nl." for float parameters that map to namelist options. +# Each parameter must define " = min, max". +# Namelist parameters must also define +# ".option_name = namelist_option". +[ensemble.parameters] +gamma0 = 6000.0, 25250.0 +# From Table S1 of Adusumilli et al. (2020) +meltflux = 81.9, 81.9 + +[parallel] +account = t26_icesheet +qos = standard + +[job] +wall_time = 1:00:00 diff --git a/compass/landice/tests/ensemble_generator/ensemble_templates/thwaites_gamma0_gnn_2026/spinup/namelist.landice b/compass/landice/tests/ensemble_generator/ensemble_templates/thwaites_gamma0_gnn_2026/spinup/namelist.landice new file mode 100644 index 0000000000..95e0872185 --- /dev/null +++ b/compass/landice/tests/ensemble_generator/ensemble_templates/thwaites_gamma0_gnn_2026/spinup/namelist.landice @@ -0,0 +1,262 @@ +&velocity_solver + config_velocity_solver = 'gnn' + config_gnn_model_path = '/usr/projects/iceberg/trhille/velocity_emulator/training_data/Thwaites_ISMIP6_ensemble/trained_models/MALIGIN/4layers_512hidden/DivergenceLoss/flux/maligin_scripted_4layer_512hidden_best.pt' + config_gnn_device_type = 'cuda' + config_gnn_solver_init = 'FO' + config_gnn_rf_check = .false. + config_gnn_rf_weights_x = 'none' + config_gnn_rf_weights_y = 'none' + config_gnn_rf_sample_fraction = 0.01 + config_gnn_rf_threshold = 425 + config_gnn_rf_seed = 42 + config_sia_tangent_slope_calculation = 'from_vertex_barycentric' + config_flowParamA_calculation = 'constant' + config_do_velocity_reconstruction_for_external_dycore = .false. + config_simple_velocity_type = 'uniform' + config_use_glp = .true. + config_beta_thawed_only = .false. + config_unrealistic_velocity = 00.00159 ! 50 km/yr + config_nonconvergence_error = .false. + config_effective_pressure_max = 1.0e36 +/ +&advection + config_thickness_advection = 'fo' + config_tracer_advection = 'fo' + config_horiz_tracer_adv_order = 3 + config_advection_coef_3rd_order = 1.0 + config_restore_thickness_after_advection = .false. + config_smb_source = 'file' + config_zero_sfcMassBalApplied_over_bare_land = .true. + config_apply_smb_sat_lapse_rate = .false. +/ +&solidearth + config_uplift_method = 'none' + config_slm_coupling_interval = 5 + config_MALI_to_SLM_weights_file = 'mapfile_mali_to_slm.nc' + config_SLM_to_MALI_weights_file = 'mapfile_slm_to_mali.nc' + config_fastisostasy_coupling_interval = 2 + config_MALI_to_FASTISOSTASY_weights_file = 'mpas_to_fastisostasy.nc' + config_FASTISOSTASY_to_MALI_weights_file = 'fastisostasy_to_mpas.nc' + config_fastisostasy_grid_resolution = 0.0 + config_fastisostasy_parameter_file = 'fastisostasy.nml' + config_fastisostasy_restart_file = 'fastisostasy_restart.nc' + config_fastisostasy_bsl_restart_file = 'fastisostasy_bsl_restart.nc' +/ +&calving + config_calving = 'none' + config_apply_calving_mask = .false. + config_require_extensional_stresses_for_mask_calving = .false. + config_calving_fracture_toughness = 2.0e5 + config_use_Albany_flowA_eqn_for_vM = .false. + config_calving_topography = -500.0 + config_calving_thickness = 0.0 + config_calving_eigencalving_parameter_source = 'scalar' + config_calving_eigencalving_parameter_scalar_value = 3.14e16 + config_calving_specified_source = 'const' + config_calving_velocity_const = 0.0 + config_data_calving = .false. + config_calving_timescale = 0.0 + config_restore_calving_front = .true. + config_restore_calving_front_prevent_retreat = .false. + config_remove_icebergs = .true. + config_remove_small_islands = .true. + config_calving_speed_limit = 0.00063492063 + config_apply_facemelt_strainrate_enhancement = .false. + config_calving_strainrate_scaling = 0.0 + config_calving_strainrate_scaling_source = 'scalar' + config_grounded_von_Mises_threshold_stress = 1.0e6 + config_floating_von_Mises_threshold_stress = 1.0e6 + config_grounded_von_Mises_threshold_stress_source = 'scalar' + config_floating_von_Mises_threshold_stress_source = 'scalar' + config_finalize_damage_after_advection = .true. + config_preserve_damage = .false. + config_calculate_damage = .true. + config_damage_preserve_threshold = 0.0 + config_damage_calving_threshold = 0.95 + config_damage_calving_threshold_source = 'scalar' + config_damage_stiffness_min = 0.1 + config_damage_rheology_coupling = .false. + config_damage_gl_setting = 'nye' + config_damage_calving_method = 'none' + config_damagecalvingParameter = 1.0e-4 + config_crevasse_water_depth_source = 'scalar' + config_crevasse_water_depth = 0.0 + config_smb_fraction_to_water_depth = 1.0 + config_ismip6_retreat_k = -170.0 + config_calving_error_threshold = 100000.0 + config_distribute_unablatedVolumeDynCell = .true. + config_update_velocity_before_calving = .false. +/ +&thermal_solver + config_thermal_solver = 'temperature' + config_thermal_calculate_bmb = .false. + config_temperature_init = 'file' + config_thermal_thickness = 0.0 + config_surface_air_temperature_source = 'file' + config_surface_air_temperature_value = 273.15 + config_basal_heat_flux_source = 'file' + config_basal_heat_flux_value = 0.0 + config_temp_diffusive_factor = 1.0e-5 + config_max_water_fraction = 1.0e-2 +/ +&iceshelf_melt + config_basal_mass_bal_float = 'ismip6' + config_ismip7_melt_sin_slope = 0.0051117 + config_ismip7_melt_salinity_source = 'constant' + config_ismip7_melt_salinity = 34.5 + config_ismip7_melt_coriolis = 1.4e-4 + config_bmlt_float_flux = 0.0 + config_bmlt_float_xlimit = 0.0 + config_basal_mass_bal_seroussi_amplitude = 0.0 + config_basal_mass_bal_seroussi_period = 1.0 + config_basal_mass_bal_seroussi_phase = 0.0 + config_temperature_profile_melt_scale_factor = 6.0 + config_temperature_profile_sill_elevation = -700.0 + config_temperature_profile_plume_thickness = 30.0 + config_temperature_profile_draft_slope = 1.0e-2 + config_temperature_profile_thermocline_upper_depth = -200.0 + config_temperature_profile_thermocline_upper_temp = -1.0 + config_temperature_profile_thermocline_lower_depth = -600.0 + config_temperature_profile_thermocline_lower_temp = 1.2 + config_temperature_profile_variability_amplitude = 0.0 + config_temperature_profile_variability_period = 1.0 + config_temperature_profile_variability_phase = 0.0 + config_temperature_profile_GL_depth_fraction = 0.25 + config_front_mass_bal_grounded = 'ismip6' + config_use_3d_thermal_forcing_for_face_melt = .true. + config_beta_ocean_thermal_forcing = 1.18 + config_add_ocean_thermal_forcing = 0.0 + config_alpha_subglacial_discharge = 0.39 + config_subglacial_discharge_coefficient = 3.0e-4 + config_subglacial_discharge_intercept = 0.15 + config_uniform_face_melt_rate = 0.0 + config_ocean_data_extrapolation = .false. + config_calculate_thermal_forcing = .false. + config_extrap_sill_blocking = .true. + config_TF_vertical_calc = 'seafloor' + config_TF_iceberg_melt = 'off' + config_TF_iceberg_depth = -175.0 + config_ocean_data_extrap_ncells_extra = 3 + config_invalid_value_TF = 1.0e36 + config_weight_value_cell = 0.9 +/ +&physical_parameters + config_ice_density = 910.0 + config_ocean_density = 1028.0 + config_sea_level = 0.0 + config_default_flowParamA = 3.1709792e-24 + config_flowLawExponent = 3.0 + config_dynamic_thickness = 10.0 +/ +&time_integration + config_dt = '0000-01-00_00:00:00' + config_time_integration = 'forward_euler' + config_rk_order = 3 + config_rk3_stages = 3 + config_adaptive_timestep = .true. + config_min_adaptive_timestep = 60 + config_max_adaptive_timestep = 3.154e7 + config_adaptive_timestep_CFL_fraction = 0.8 + config_adaptive_timestep_calvingCFL_fraction = 0.8 + config_adaptive_timestep_faceMeltingCFL_fraction = 1.0 + config_adaptive_timestep_include_DCFL = .false. + config_adaptive_timestep_include_calving = .true. + config_adaptive_timestep_include_face_melting = .true. + config_adaptive_timestep_force_interval = '0001-00-00_00:00:00' + config_timeaveraging_interval = '0000-00-00_00:00:00' + config_enable_timeAvgRestarts = .false. +/ +&time_management + config_do_restart = .false. + config_restart_timestamp_name = 'restart_timestamp' + config_start_time = '2000-01-01_00:00:00' + config_stop_time = '2150-01-01_00:00:00' + config_run_duration = 'none' + config_calendar_type = 'noleap' +/ +&io + config_stats_interval = 0 + config_write_stats_on_startup = .false. + config_stats_cell_ID = 1 + config_write_output_on_startup = .true. + config_pio_num_iotasks = 1 + config_pio_stride = 32 + config_year_digits = 4 + config_output_external_velocity_solver_data = .false. + config_write_albany_ascii_mesh = .false. + config_create_all_logs_in_e3sm = .false. + config_nISMIP6OceanLayers = 0 +/ +&decomposition + config_num_halos = 3 + config_block_decomp_file_prefix = 'graph.info.part.' + config_number_of_blocks = 0 + config_explicit_proc_decomp = .false. + config_proc_decomp_file_prefix = 'graph.info.part.' +/ +&debug + config_print_thickness_advection_info = .false. + config_print_calving_info = .false. + config_print_thermal_info = .false. + config_always_compute_fem_grid = .true. + config_print_velocity_cleanup_details = .false. + config_check_tracer_monotonicity = .false. +/ +&subglacial_hydro + config_SGH = .false. + config_ocean_connection_N = .false. + config_SGH_adaptive_timestep_fraction = 1.0 + config_SGH_max_adaptive_timestep = 3.15e9 + config_SGH_tangent_slope_calculation = 'from_normal_slope' + config_SGH_pressure_calc = 'cavity' + config_SGH_transition_flow = .false. + config_SGH_flow_transition_param = 0.0005 + config_SGH_alpha = 1.25 + config_SGH_beta = 1.5 + config_SGH_conduc_coeff = 0.001 + config_SGH_conduc_coeff_drowned = 0.0 + config_SGH_till_drainage = 0.0 + config_SGH_till_max = 0.0 + config_SGH_advection = 'fo' + config_SGH_bed_roughness = 0.5 + config_SGH_bed_roughness_max = 0.1 + config_SGH_creep_coefficient = 0.04 + config_SGH_englacial_porosity = 0.01 + config_SGH_use_iceThicknessHydro = .false. + config_SGH_flowA_source = 'flowParamA' + config_SGH_flowA_value = 3.1709792e-24 + config_SGH_chnl_active = .false. + config_SGH_chnl_include_DCFL = .false. + config_SGH_chnl_alpha = 1.25 + config_SGH_chnl_beta = 1.5 + config_SGH_chnl_conduc_coeff = 0.1 + config_SGH_chnl_creep_coefficient = 0.04 + config_SGH_incipient_channel_width = 2.0 + config_SGH_chnl_area_shutoff = 500.0 + config_SGH_include_pressure_melt = .false. + config_SGH_shmip_forcing = 'none' + config_SGH_basal_melt = 'file' + config_SGH_iter_smooth_waterPressureSlopeNormal = 1 + config_SGH_allow_terrestrial_outflow = .true. +/ +&AM_globalStats + config_AM_globalStats_enable = .true. + config_AM_globalStats_compute_interval = 'output_interval' + config_AM_globalStats_stream_name = 'globalStatsOutput' + config_AM_globalStats_compute_on_startup = .true. + config_AM_globalStats_write_on_startup = .true. +/ +&AM_regionalStats + config_AM_regionalStats_enable = .false. + config_AM_regionalStats_compute_interval = 'output_interval' + config_AM_regionalStats_stream_name = 'regionalStatsOutput' + config_AM_regionalStats_compute_on_startup = .true. + config_AM_regionalStats_write_on_startup = .true. +/ +&AM_fluxGates + config_AM_fluxGates_enable = .false. + config_AM_fluxGates_compute_interval = 'output_interval' + config_AM_fluxGates_stream_name = 'fluxGatesOutput' + config_AM_fluxGates_compute_on_startup = .true. + config_AM_fluxGates_write_on_startup = .true. +/ diff --git a/compass/landice/tests/ensemble_generator/ensemble_templates/thwaites_gamma0_gnn_2026/spinup/streams.landice b/compass/landice/tests/ensemble_generator/ensemble_templates/thwaites_gamma0_gnn_2026/spinup/streams.landice new file mode 100644 index 0000000000..6650be7a24 --- /dev/null +++ b/compass/landice/tests/ensemble_generator/ensemble_templates/thwaites_gamma0_gnn_2026/spinup/streams.landice @@ -0,0 +1,97 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/compass/landice/tests/ensemble_generator/ensemble_templates/thwaites_gamma0_molho_2026/__init__.py b/compass/landice/tests/ensemble_generator/ensemble_templates/thwaites_gamma0_molho_2026/__init__.py new file mode 100644 index 0000000000..e69de29bb2 diff --git a/compass/landice/tests/ensemble_generator/ensemble_templates/thwaites_gamma0_molho_2026/spinup/__init__.py b/compass/landice/tests/ensemble_generator/ensemble_templates/thwaites_gamma0_molho_2026/spinup/__init__.py new file mode 100644 index 0000000000..e69de29bb2 diff --git a/compass/landice/tests/ensemble_generator/ensemble_templates/thwaites_gamma0_molho_2026/spinup/albany_input.yaml b/compass/landice/tests/ensemble_generator/ensemble_templates/thwaites_gamma0_molho_2026/spinup/albany_input.yaml new file mode 100644 index 0000000000..ede587fdb8 --- /dev/null +++ b/compass/landice/tests/ensemble_generator/ensemble_templates/thwaites_gamma0_molho_2026/spinup/albany_input.yaml @@ -0,0 +1,239 @@ +%YAML 1.1 +--- +ANONYMOUS: + Problem: + Depth Integrated Model: true + LandIce Field Norm: + sliding_velocity_basalside: + Regularization Type: Given Value + Regularization Value: 1.0e-4 + LandIce BCs: + BC 0: + Cubature Degree: 8 + Basal Friction Coefficient: + Type: Power Law + Power Exponent: 0.2 + Mu Type: Field + Effective Pressure Type: Constant + Effective Pressure: 1.0 + # Zero Effective Pressure On Floating Ice At Nodes: true + Zero Beta On Floating Ice: true + +# 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/ensemble_generator/ensemble_templates/thwaites_gamma0_molho_2026/spinup/ensemble_generator.cfg b/compass/landice/tests/ensemble_generator/ensemble_templates/thwaites_gamma0_molho_2026/spinup/ensemble_generator.cfg new file mode 100644 index 0000000000..c6cf070fbb --- /dev/null +++ b/compass/landice/tests/ensemble_generator/ensemble_templates/thwaites_gamma0_molho_2026/spinup/ensemble_generator.cfg @@ -0,0 +1,96 @@ +# selector for ensemble template resources +[ensemble_generator] + +# subdirectory within ensemble_templates/ where branch_ensemble options are located +ensemble_template = thwaites_gamma0_molho_2026 + +# config options for setting up an ensemble + +# start and end numbers for runs to set up and run +# Run numbers should be zero-based. +# Additional runs can be added and run to an existing ensemble +# without affecting existing runs, but trying to set up a run +# that already exists will generate a warning and skip that run. +# These values do not affect viz/analysis, which will include any +# runs it finds. +start_run = 0 +end_run = 7 + +# sampling_method can be 'sobol' for a space-filling Sobol sequence, +# 'uniform' for linear sampling, or 'log-uniform' for logarithmic sampling. +# Uniform and log-uniform are most appropriate for a single-parameter +# sensitivity study because they sample each active parameter using the +# same rank ordering, thus sampling only a small fraction of parameter space +# in higher dimensions. +sampling_method = sobol + +# maximum number of samples to be considered. +# max_samples needs to be greater or equal to (end_run + 1) +# When using uniform or log-uniform sampling, max_samples should equal +# (end_run + 1). +# When using Sobol sequence, max_samples ought to be a power of 2. +# max_samples should not be changed after the first set of ensemble. +# So, when using Sobol sequence, max_samples might be set larger than +# (end_run + 1) if you plan to add more samples to the ensemble later. +max_samples = 1024 + +# basin for comparing model results with observational estimates in +# visualization script. +# Basin options are defined in compass/landice/ais_observations.py +# If desired basin does not exist, it can be added to that dataset. +# (They need not be mutually exclusive.) +# If a basin is not provided, observational comparisons will not be made. +basin = None + +# fraction of CFL-limited time step to be used by the adaptive timestepper +cfl_fraction = 0.8 + +# number of tasks that each ensemble member should be run with +ntasks = 32 + +[spinup_ensemble] + +# Path to the initial condition input file. +input_file_path = /usr/projects/iceberg/trhille/ISMIP6_inputs/thwaites_4to20km/thwaites_4to20km.nc + +# the value of the friction exponent used for the calculation of muFriction +# in the input file +orig_fric_exp = 0.2 + +# Path to thermal forcing file for the mesh to be used +TF_file_path = /usr/projects/iceberg/trhille/ISMIP6_inputs/thwaites_4to20km/forcing/tier1_experiments/expAE05/thwaites_4to20km_AIS_4to20km_r01_20220907_TF_UKESM1-0-LL_SSP585_2300.nc + +# Path to SMB forcing file for the mesh to be used +SMB_file_path = /usr/projects/iceberg/trhille/ISMIP6_inputs/thwaites_4to20km/forcing/tier1_experiments/expAE05/thwaites_4to20km_AIS_4to20km_r01_20220907_smb_UKESM1-0-LL_SSP585_2300_minus1_bare_land.nc + +# Path to ISMIP6 ice-shelf basal melt parameter input file. +basal_melt_param_file_path = /usr/projects/iceberg/trhille/ISMIP6_inputs/thwaites_4to20km/thwaites_4to20km_basin_and_coeff_gamma0_DeltaT_quadratic_non_local_after_relaxation.nc + +# For meltflux perturbations, this observed ice-shelf area is used when +# converting target melt flux to deltaT. This is taken from the first time step +# of Thwaites ISMIP6 simulations. +iceshelf_area_obs = 4668512650 + +# Optional year range (inclusive) over which thermal forcing in TF_file_path +# is time-averaged when converting meltflux to deltaT. Years are read from +# xtime. Runs still use the full time-varying TF_file_path. If both are +# omitted, the first time slice of TF_file_path is used. +calibration_start_year = 1995 +calibration_end_year = 2018 + +# Parameter definitions are listed in this section in sampling order. +# Use the prefix "nl." for float parameters that map to namelist options. +# Each parameter must define " = min, max". +# Namelist parameters must also define +# ".option_name = namelist_option". +[ensemble.parameters] +gamma0 = 6000.0, 25250.0 +# From Table S1 of Adusumilli et al. (2020) +meltflux = 81.9, 81.9 + +[parallel] +account = t26_icesheet +qos = standard + +[job] +wall_time = 1:00:00 diff --git a/compass/landice/tests/ensemble_generator/ensemble_templates/thwaites_gamma0_molho_2026/spinup/namelist.landice b/compass/landice/tests/ensemble_generator/ensemble_templates/thwaites_gamma0_molho_2026/spinup/namelist.landice new file mode 100644 index 0000000000..f356d7384e --- /dev/null +++ b/compass/landice/tests/ensemble_generator/ensemble_templates/thwaites_gamma0_molho_2026/spinup/namelist.landice @@ -0,0 +1,253 @@ +&velocity_solver + config_velocity_solver = 'FO' + config_sia_tangent_slope_calculation = 'from_vertex_barycentric' + config_flowParamA_calculation = 'constant' + config_do_velocity_reconstruction_for_external_dycore = .false. + config_simple_velocity_type = 'uniform' + config_use_glp = .true. + config_beta_thawed_only = .false. + config_unrealistic_velocity = 00.00159 ! 50 km/yr + config_nonconvergence_error = .false. + config_effective_pressure_max = 1.0e36 +/ +&advection + config_thickness_advection = 'fo' + config_tracer_advection = 'fo' + config_horiz_tracer_adv_order = 3 + config_advection_coef_3rd_order = 1.0 + config_restore_thickness_after_advection = .false. + config_smb_source = 'file' + config_zero_sfcMassBalApplied_over_bare_land = .true. + config_apply_smb_sat_lapse_rate = .false. +/ +&solidearth + config_uplift_method = 'none' + config_slm_coupling_interval = 5 + config_MALI_to_SLM_weights_file = 'mapfile_mali_to_slm.nc' + config_SLM_to_MALI_weights_file = 'mapfile_slm_to_mali.nc' + config_fastisostasy_coupling_interval = 2 + config_MALI_to_FASTISOSTASY_weights_file = 'mpas_to_fastisostasy.nc' + config_FASTISOSTASY_to_MALI_weights_file = 'fastisostasy_to_mpas.nc' + config_fastisostasy_grid_resolution = 0.0 + config_fastisostasy_parameter_file = 'fastisostasy.nml' + config_fastisostasy_restart_file = 'fastisostasy_restart.nc' + config_fastisostasy_bsl_restart_file = 'fastisostasy_bsl_restart.nc' +/ +&calving + config_calving = 'none' + config_apply_calving_mask = .false. + config_require_extensional_stresses_for_mask_calving = .false. + config_calving_fracture_toughness = 2.0e5 + config_use_Albany_flowA_eqn_for_vM = .false. + config_calving_topography = -500.0 + config_calving_thickness = 0.0 + config_calving_eigencalving_parameter_source = 'scalar' + config_calving_eigencalving_parameter_scalar_value = 3.14e16 + config_calving_specified_source = 'const' + config_calving_velocity_const = 0.0 + config_data_calving = .false. + config_calving_timescale = 0.0 + config_restore_calving_front = .true. + config_restore_calving_front_prevent_retreat = .false. + config_remove_icebergs = .true. + config_remove_small_islands = .true. + config_calving_speed_limit = 0.00063492063 + config_apply_facemelt_strainrate_enhancement = .false. + config_calving_strainrate_scaling = 0.0 + config_calving_strainrate_scaling_source = 'scalar' + config_grounded_von_Mises_threshold_stress = 1.0e6 + config_floating_von_Mises_threshold_stress = 1.0e6 + config_grounded_von_Mises_threshold_stress_source = 'scalar' + config_floating_von_Mises_threshold_stress_source = 'scalar' + config_finalize_damage_after_advection = .true. + config_preserve_damage = .false. + config_calculate_damage = .true. + config_damage_preserve_threshold = 0.0 + config_damage_calving_threshold = 0.95 + config_damage_calving_threshold_source = 'scalar' + config_damage_stiffness_min = 0.1 + config_damage_rheology_coupling = .false. + config_damage_gl_setting = 'nye' + config_damage_calving_method = 'none' + config_damagecalvingParameter = 1.0e-4 + config_crevasse_water_depth_source = 'scalar' + config_crevasse_water_depth = 0.0 + config_smb_fraction_to_water_depth = 1.0 + config_ismip6_retreat_k = -170.0 + config_calving_error_threshold = 100000.0 + config_distribute_unablatedVolumeDynCell = .true. + config_update_velocity_before_calving = .false. +/ +&thermal_solver + config_thermal_solver = 'temperature' + config_thermal_calculate_bmb = .false. + config_temperature_init = 'file' + config_thermal_thickness = 0.0 + config_surface_air_temperature_source = 'file' + config_surface_air_temperature_value = 273.15 + config_basal_heat_flux_source = 'file' + config_basal_heat_flux_value = 0.0 + config_temp_diffusive_factor = 1.0e-5 + config_max_water_fraction = 1.0e-2 +/ +&iceshelf_melt + config_basal_mass_bal_float = 'ismip6' + config_ismip7_melt_sin_slope = 0.0051117 + config_ismip7_melt_salinity_source = 'constant' + config_ismip7_melt_salinity = 34.5 + config_ismip7_melt_coriolis = 1.4e-4 + config_bmlt_float_flux = 0.0 + config_bmlt_float_xlimit = 0.0 + config_basal_mass_bal_seroussi_amplitude = 0.0 + config_basal_mass_bal_seroussi_period = 1.0 + config_basal_mass_bal_seroussi_phase = 0.0 + config_temperature_profile_melt_scale_factor = 6.0 + config_temperature_profile_sill_elevation = -700.0 + config_temperature_profile_plume_thickness = 30.0 + config_temperature_profile_draft_slope = 1.0e-2 + config_temperature_profile_thermocline_upper_depth = -200.0 + config_temperature_profile_thermocline_upper_temp = -1.0 + config_temperature_profile_thermocline_lower_depth = -600.0 + config_temperature_profile_thermocline_lower_temp = 1.2 + config_temperature_profile_variability_amplitude = 0.0 + config_temperature_profile_variability_period = 1.0 + config_temperature_profile_variability_phase = 0.0 + config_temperature_profile_GL_depth_fraction = 0.25 + config_front_mass_bal_grounded = 'ismip6' + config_use_3d_thermal_forcing_for_face_melt = .true. + config_beta_ocean_thermal_forcing = 1.18 + config_add_ocean_thermal_forcing = 0.0 + config_alpha_subglacial_discharge = 0.39 + config_subglacial_discharge_coefficient = 3.0e-4 + config_subglacial_discharge_intercept = 0.15 + config_uniform_face_melt_rate = 0.0 + config_ocean_data_extrapolation = .false. + config_calculate_thermal_forcing = .false. + config_extrap_sill_blocking = .true. + config_TF_vertical_calc = 'seafloor' + config_TF_iceberg_melt = 'off' + config_TF_iceberg_depth = -175.0 + config_ocean_data_extrap_ncells_extra = 3 + config_invalid_value_TF = 1.0e36 + config_weight_value_cell = 0.9 +/ +&physical_parameters + config_ice_density = 910.0 + config_ocean_density = 1028.0 + config_sea_level = 0.0 + config_default_flowParamA = 3.1709792e-24 + config_flowLawExponent = 3.0 + config_dynamic_thickness = 10.0 +/ +&time_integration + config_dt = '0000-01-00_00:00:00' + config_time_integration = 'forward_euler' + config_rk_order = 3 + config_rk3_stages = 3 + config_adaptive_timestep = .true. + config_min_adaptive_timestep = 60 + config_max_adaptive_timestep = 3.154e7 + config_adaptive_timestep_CFL_fraction = 0.8 + config_adaptive_timestep_calvingCFL_fraction = 0.8 + config_adaptive_timestep_faceMeltingCFL_fraction = 1.0 + config_adaptive_timestep_include_DCFL = .false. + config_adaptive_timestep_include_calving = .true. + config_adaptive_timestep_include_face_melting = .true. + config_adaptive_timestep_force_interval = '0001-00-00_00:00:00' + config_timeaveraging_interval = '0000-00-00_00:00:00' + config_enable_timeAvgRestarts = .false. +/ +&time_management + config_do_restart = .false. + config_restart_timestamp_name = 'restart_timestamp' + config_start_time = '2000-01-01_00:00:00' + config_stop_time = '2150-01-01_00:00:00' + config_run_duration = 'none' + config_calendar_type = 'noleap' +/ +&io + config_stats_interval = 0 + config_write_stats_on_startup = .false. + config_stats_cell_ID = 1 + config_write_output_on_startup = .true. + config_pio_num_iotasks = 1 + config_pio_stride = 32 + config_year_digits = 4 + config_output_external_velocity_solver_data = .false. + config_write_albany_ascii_mesh = .false. + config_create_all_logs_in_e3sm = .false. + config_nISMIP6OceanLayers = 0 +/ +&decomposition + config_num_halos = 3 + config_block_decomp_file_prefix = 'graph.info.part.' + config_number_of_blocks = 0 + config_explicit_proc_decomp = .false. + config_proc_decomp_file_prefix = 'graph.info.part.' +/ +&debug + config_print_thickness_advection_info = .false. + config_print_calving_info = .false. + config_print_thermal_info = .false. + config_always_compute_fem_grid = .true. + config_print_velocity_cleanup_details = .false. + config_check_tracer_monotonicity = .false. +/ +&subglacial_hydro + config_SGH = .false. + config_ocean_connection_N = .false. + config_SGH_adaptive_timestep_fraction = 1.0 + config_SGH_max_adaptive_timestep = 3.15e9 + config_SGH_tangent_slope_calculation = 'from_normal_slope' + config_SGH_pressure_calc = 'cavity' + config_SGH_transition_flow = .false. + config_SGH_flow_transition_param = 0.0005 + config_SGH_alpha = 1.25 + config_SGH_beta = 1.5 + config_SGH_conduc_coeff = 0.001 + config_SGH_conduc_coeff_drowned = 0.0 + config_SGH_till_drainage = 0.0 + config_SGH_till_max = 0.0 + config_SGH_advection = 'fo' + config_SGH_bed_roughness = 0.5 + config_SGH_bed_roughness_max = 0.1 + config_SGH_creep_coefficient = 0.04 + config_SGH_englacial_porosity = 0.01 + config_SGH_use_iceThicknessHydro = .false. + config_SGH_flowA_source = 'flowParamA' + config_SGH_flowA_value = 3.1709792e-24 + config_SGH_chnl_active = .false. + config_SGH_chnl_include_DCFL = .false. + config_SGH_chnl_alpha = 1.25 + config_SGH_chnl_beta = 1.5 + config_SGH_chnl_conduc_coeff = 0.1 + config_SGH_chnl_creep_coefficient = 0.04 + config_SGH_incipient_channel_width = 2.0 + config_SGH_chnl_area_shutoff = 500.0 + config_SGH_include_pressure_melt = .false. + config_SGH_shmip_forcing = 'none' + config_SGH_basal_melt = 'file' + config_SGH_iter_smooth_waterPressureSlopeNormal = 1 + config_SGH_allow_terrestrial_outflow = .true. +/ +&AM_globalStats + config_AM_globalStats_enable = .true. + config_AM_globalStats_compute_interval = 'output_interval' + config_AM_globalStats_stream_name = 'globalStatsOutput' + config_AM_globalStats_compute_on_startup = .true. + config_AM_globalStats_write_on_startup = .true. +/ +&AM_regionalStats + config_AM_regionalStats_enable = .false. + config_AM_regionalStats_compute_interval = 'output_interval' + config_AM_regionalStats_stream_name = 'regionalStatsOutput' + config_AM_regionalStats_compute_on_startup = .true. + config_AM_regionalStats_write_on_startup = .true. +/ +&AM_fluxGates + config_AM_fluxGates_enable = .false. + config_AM_fluxGates_compute_interval = 'output_interval' + config_AM_fluxGates_stream_name = 'fluxGatesOutput' + config_AM_fluxGates_compute_on_startup = .true. + config_AM_fluxGates_write_on_startup = .true. +/ diff --git a/compass/landice/tests/ensemble_generator/ensemble_templates/thwaites_gamma0_molho_2026/spinup/streams.landice b/compass/landice/tests/ensemble_generator/ensemble_templates/thwaites_gamma0_molho_2026/spinup/streams.landice new file mode 100644 index 0000000000..6650be7a24 --- /dev/null +++ b/compass/landice/tests/ensemble_generator/ensemble_templates/thwaites_gamma0_molho_2026/spinup/streams.landice @@ -0,0 +1,97 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/compass/landice/tests/ensemble_generator/spinup_ensemble/__init__.py b/compass/landice/tests/ensemble_generator/spinup_ensemble/__init__.py index 9121aaf7f9..423d199b11 100644 --- a/compass/landice/tests/ensemble_generator/spinup_ensemble/__init__.py +++ b/compass/landice/tests/ensemble_generator/spinup_ensemble/__init__.py @@ -256,7 +256,19 @@ def _compute_delta_t_vec(config, spinup_section, spec_by_name, max_samples, iceshelf_area_obs = spinup_section.getfloat('iceshelf_area_obs') input_file_path = spinup_section.get('input_file_path') TF_file_path = spinup_section.get('TF_file_path') - mean_TF, iceshelf_area = calc_mean_TF(input_file_path, TF_file_path) + calibration_start_year = spinup_section.getint( + 'calibration_start_year', fallback=None) + calibration_end_year = spinup_section.getint( + 'calibration_end_year', fallback=None) + if calibration_start_year is None and calibration_end_year is None: + print('Calibrating deltaT with thermal forcing from the first time ' + 'slice of TF_file_path.') + else: + print('Calibrating deltaT with thermal forcing averaged over ' + f'{calibration_start_year}-{calibration_end_year}.') + mean_TF, iceshelf_area = calc_mean_TF( + input_file_path, TF_file_path, start_year=calibration_start_year, + end_year=calibration_end_year) print(f'IS area: model={iceshelf_area}, Obs={iceshelf_area_obs}') area_correction = iceshelf_area / iceshelf_area_obs diff --git a/docs/developers_guide/landice/framework.rst b/docs/developers_guide/landice/framework.rst index 7fe14e3e08..0aba27929c 100644 --- a/docs/developers_guide/landice/framework.rst +++ b/docs/developers_guide/landice/framework.rst @@ -60,7 +60,10 @@ The landice framework module ``compass/landice/iceshelf_melt.py`` provides functionality related to ice-shelf basal melting. Currently, there is a single function ``calc_mean_TF`` that calculated the mean thermal forcing along the ice-shelf draft in a domain for a given geometry file and thermal -forcing file. +forcing file. By default, the first time slice of the thermal forcing is +used. If ``start_year`` and ``end_year`` are given, the 3D thermal forcing +is averaged over all time slices whose ``xtime`` year falls in that +inclusive range before it is interpolated to the ice draft. mesh ~~~~ diff --git a/docs/users_guide/landice/test_groups/ensemble_generator.rst b/docs/users_guide/landice/test_groups/ensemble_generator.rst index d7f7693acc..c9a4de13bd 100644 --- a/docs/users_guide/landice/test_groups/ensemble_generator.rst +++ b/docs/users_guide/landice/test_groups/ensemble_generator.rst @@ -252,6 +252,14 @@ The template-specific spinup config options (from # converting target melt flux to deltaT. iceshelf_area_obs = 60654.e6 + # Optional year range (inclusive) over which thermal forcing in + # TF_file_path is time-averaged when converting meltflux to deltaT. + # Years are read from xtime. Runs still use the full time-varying + # TF_file_path. If both are omitted, the first time slice of + # TF_file_path is used. + # calibration_start_year = 1995 + # calibration_end_year = 2014 + The parameter sampling definitions live in a separate section, ``[ensemble.parameters]``. The order listed sets the sampling dimension ordering, special parameters are unprefixed, and namelist