diff --git a/oggm/core/dynamic_spinup.py b/oggm/core/dynamic_spinup.py index bbf05d308..dd9925ded 100644 --- a/oggm/core/dynamic_spinup.py +++ b/oggm/core/dynamic_spinup.py @@ -34,7 +34,7 @@ def run_dynamic_spinup(gdir, init_model_filesuffix=None, init_model_yr=None, mb_model_historical=None, mb_model_spinup=None, spinup_period=20, spinup_start_yr=None, min_spinup_period=10, spinup_start_yr_max=None, - yr_target=None, target_value=None, + target_yr=None, target_value=None, minimise_for='area', precision_percent=1, precision_absolute=1, min_ice_thickness=None, first_guess_t_bias=-2, t_bias_max_step_length=2, @@ -82,10 +82,10 @@ def run_dynamic_spinup(gdir, init_model_filesuffix=None, init_model_yr=None, period of spinup_start_yr until rgi_year (e.g. 1979 - 2000). spinup_period : int The period how long the spinup should run. Start date of historical run - is defined "yr_target - spinup_period". Minimum allowed value is 10. If + is defined "target_yr - spinup_period". Minimum allowed value is 10. If the provided climate data starts at year later than - (yr_target - spinup_period) the spinup_period is set to - (yr_target - yr_climate_start). Caution if spinup_start_yr is set the + (target_yr - spinup_period) the spinup_period is set to + (target_yr - yr_climate_start). Caution if spinup_start_yr is set the spinup_period is ignored. Default is 20 spinup_start_yr : int or None @@ -101,19 +101,19 @@ def run_dynamic_spinup(gdir, init_model_filesuffix=None, init_model_yr=None, spinup_start_yr_max : int or None Possibility to provide a maximum year where the dynamic spinup must start from at least. If set, this overrides the min_spinup_period if - yr_target - spinup_start_yr_max > min_spinup_period. + target_yr - spinup_start_yr_max > min_spinup_period. Default is None - yr_target : int or None + target_yr : int or None The year at which we want to match area or volume. If None, gdir.rgi_date + 1 is used (the default). Default is None target_value : float or None - The value we want to match at yr_target. Depending on minimise_for this + The value we want to match at target_yr. Depending on minimise_for this value is interpreted as an area in km2 or a volume in km3. If None the total area or volume from the provided initial flowlines is used. Default is None minimise_for : str - The variable we want to match at yr_target. Options are 'area' or + The variable we want to match at target_yr. Options are 'area' or 'volume'. Default is 'area' precision_percent : float @@ -177,9 +177,9 @@ def run_dynamic_spinup(gdir, init_model_filesuffix=None, init_model_yr=None, the returned value is np.nan. Default is False ye : int - end year of the model run, must be larger than yr_target. If nothing is - given it is set to yr_target. It is not recommended to use it if only - data until yr_target is needed for calibration as this increases the + end year of the model run, must be larger than target_yr. If nothing is + given it is set to target_yr. It is not recommended to use it if only + data until target_yr is needed for calibration as this increases the run time of each iteration during the iterative minimisation. Instead use run_from_climate_data afterwards and merge both outputs using merge_consecutive_run_outputs. @@ -207,17 +207,17 @@ def run_dynamic_spinup(gdir, init_model_filesuffix=None, init_model_yr=None, evolution_model = decide_evolution_model(evolution_model) - if yr_target is None: + if target_yr is None: # Even in calendar dates, we prefer to set rgi_year in the next year # as the rgi is often from snow free images the year before (e.g. Aug) - yr_target = gdir.rgi_date + 1 + target_yr = gdir.rgi_date + 1 if ye is None: - ye = yr_target + ye = target_yr - if ye < yr_target: + if ye < target_yr: raise RuntimeError(f'The provided end year (ye = {ye}) must be larger' - f'than the target year (yr_target = {yr_target}!') + f'than the target year (target_yr = {target_yr}!') yr_min = gdir.get_climate_info()['baseline_yr_0'] @@ -237,8 +237,8 @@ def run_dynamic_spinup(gdir, init_model_filesuffix=None, init_model_yr=None, f'{spinup_start_yr}) must be smaller than ' f'the maximum start year ' f'{spinup_start_yr_max}!') - if (yr_target - spinup_start_yr_max) > min_spinup_period: - min_spinup_period = (yr_target - spinup_start_yr_max) + if (target_yr - spinup_start_yr_max) > min_spinup_period: + min_spinup_period = (target_yr - spinup_start_yr_max) if init_model_filesuffix is not None: fp = gdir.get_filepath('model_geometry', @@ -255,7 +255,7 @@ def run_dynamic_spinup(gdir, init_model_filesuffix=None, init_model_yr=None, else: fls_spinup = copy.deepcopy(init_model_fls) - # MassBalance for actual run from yr_spinup to yr_target + # MassBalance for actual run from yr_spinup to target_yr if mb_model_historical is None: mb_model_historical = MultipleFlowlineMassBalance( gdir, mb_model_class=MonthlyTIModel, @@ -306,10 +306,10 @@ def run_dynamic_spinup(gdir, init_model_filesuffix=None, init_model_yr=None, # this function saves a model without conducting a dynamic spinup, but with # the provided output_filesuffix, so following tasks can find it. - # This is necessary if yr_target < yr_min + 10 or if the dynamic spinup failed. + # This is necessary if target_yr < yr_min + 10 or if the dynamic spinup failed. def save_model_without_dynamic_spinup(): gdir.add_to_diagnostics('run_dynamic_spinup_success', False) - yr_use = np.clip(yr_target, yr_min, None) + yr_use = np.clip(target_yr, yr_min, None) model_dynamic_spinup_end = evolution_model(fls_spinup, mb_model_historical, y0=yr_use, @@ -330,12 +330,12 @@ def save_model_without_dynamic_spinup(): return model_dynamic_spinup_end - if yr_target < yr_min + min_spinup_period: + if target_yr < yr_min + min_spinup_period: log.warning('The provided rgi_date is smaller than yr_climate_start + ' 'min_spinup_period, therefore no dynamic spinup is ' 'conducted and the original flowlines are saved at the ' 'provided target year or the start year of the provided ' - 'climate data (if yr_climate_start > yr_target)') + 'climate data (if yr_climate_start > target_yr)') if ignore_errors: model_dynamic_spinup_end = save_model_without_dynamic_spinup() if return_t_bias_best: @@ -436,11 +436,11 @@ def run_model_with_spinup_to_target_year(t_bias): if type(ds) == tuple: ds = ds[0] - model_area_km2 = ds.area_m2_min_h.loc[yr_target].values * 1e-6 - model_volume_km3 = ds.volume_m3.loc[yr_target].values * 1e-9 + model_area_km2 = ds.area_m2_min_h.loc[target_yr].values * 1e-6 + model_volume_km3 = ds.volume_m3.loc[target_yr].values * 1e-9 else: # only run to rgi date and extract values - model_historical.run_until(yr_target) + model_historical.run_until(target_yr) fls = model_historical.fls model_area_km2 = np.sum( [np.sum(fl.bin_area_m2[fl.thick > min_ice_thickness]) @@ -784,10 +784,10 @@ def get_mismatch(t_bias): # years and the second try is to use a period of 'min_spinup_period' years, # if it still fails the actual error is raised) if spinup_start_yr is not None: - spinup_period_initial = min(yr_target - spinup_start_yr, - yr_target - yr_min) + spinup_period_initial = min(target_yr - spinup_start_yr, + target_yr - yr_min) else: - spinup_period_initial = min(spinup_period, yr_target - yr_min) + spinup_period_initial = min(spinup_period, target_yr - yr_min) if spinup_period_initial <= min_spinup_period: spinup_periods_to_try = [min_spinup_period] else: @@ -799,7 +799,7 @@ def get_mismatch(t_bias): # after defining the initial spinup period we can define the year for the # fixed_geometry_spinup if add_fixed_geometry_spinup: - fixed_geometry_spinup_yr = yr_target - spinup_period_initial + fixed_geometry_spinup_yr = target_yr - spinup_period_initial else: fixed_geometry_spinup_yr = None @@ -810,14 +810,14 @@ def get_mismatch(t_bias): provided_mb_model_spinup = True for spinup_period in spinup_periods_to_try: - yr_spinup = yr_target - spinup_period + yr_spinup = target_yr - spinup_period if not provided_mb_model_spinup: # define spinup MassBalance - # spinup is running for 'yr_target - yr_spinup' years, using a + # spinup is running for 'target_yr - yr_spinup' years, using a # ConstantMassBalance - y0_spinup = (yr_spinup + yr_target) / 2 - halfsize_spinup = yr_target - y0_spinup + y0_spinup = (yr_spinup + target_yr) / 2 + halfsize_spinup = target_yr - y0_spinup mb_model_spinup = MultipleFlowlineMassBalance( gdir, mb_model_class=ConstantMassBalance, filename='climate_historical', @@ -865,7 +865,7 @@ def get_mismatch(t_bias): gdir.add_to_diagnostics('temp_bias_dynamic_spinup', float(final_t_bias_guess[-1])) gdir.add_to_diagnostics('dynamic_spinup_target_year', - int(yr_target)) + int(target_yr)) gdir.add_to_diagnostics('dynamic_spinup_period', int(spinup_period)) gdir.add_to_diagnostics('dynamic_spinup_forward_model_iterations', @@ -886,7 +886,7 @@ def get_mismatch(t_bias): # For operational runs we ignore the warnings warnings.filterwarnings('ignore', category=RuntimeWarning) model_dynamic_spinup_end[-1].run_until_and_store( - yr_target, + target_yr, geom_path=geom_path, diag_path=diag_path, fl_diag_path=fl_diag_path, ) @@ -929,7 +929,7 @@ def dynamic_melt_f_run_with_dynamic_spinup( output_filesuffix='', evolution_model=None, mb_model_historical=None, mb_model_spinup=None, minimise_for='area', climate_input_filesuffix='', spinup_period=20, - min_spinup_period=10, yr_target=None, precision_percent=1, + min_spinup_period=10, target_yr=None, precision_percent=1, precision_absolute=1, min_ice_thickness=None, first_guess_t_bias=-2, t_bias_max_step_length=2, maxiter=30, store_model_geometry=True, store_fl_diagnostics=None, @@ -981,7 +981,7 @@ def dynamic_melt_f_run_with_dynamic_spinup( with the provided parameter climate_input_filesuffix and during the period of spinup_start_yr until rgi_year (e.g. 1979 - 2000). minimise_for : str - The variable we want to match at yr_target. Options are 'area' or + The variable we want to match at target_yr. Options are 'area' or 'volume'. Default is 'area'. climate_input_filesuffix : str @@ -989,10 +989,10 @@ def dynamic_melt_f_run_with_dynamic_spinup( Default is '' spinup_period : int The period how long the spinup should run. Start date of historical run - is defined "yr_target - spinup_period". Minimum allowed value is + is defined "target_yr - spinup_period". Minimum allowed value is defined with 'min_spinup_period'. If the provided climate data starts - at year later than (yr_target - spinup_period) the spinup_period is set - to (yr_target - yr_climate_start). Caution if spinup_start_yr is set + at year later than (target_yr - spinup_period) the spinup_period is set + to (target_yr - yr_climate_start). Caution if spinup_start_yr is set the spinup_period is ignored. Default is 20 min_spinup_period : int @@ -1000,7 +1000,7 @@ def dynamic_melt_f_run_with_dynamic_spinup( a shorter period is tried. Here you can define the minimum period to try. Default is 10 - yr_target : int or None + target_yr : int or None The target year at which we want to match area or volume. If None, gdir.rgi_date + 1 is used (the default). Default is None @@ -1065,7 +1065,7 @@ def dynamic_melt_f_run_with_dynamic_spinup( spinup_start_yr_max : int or None Possibility to provide a maximum year where the dynamic spinup must start from at least. If set, this overrides the min_spinup_period if - yr_target - spinup_start_yr_max > min_spinup_period. If None it is set + target_yr - spinup_start_yr_max > min_spinup_period. If None it is set to yr0_ref_mb. Default is None add_fixed_geometry_spinup : bool @@ -1103,15 +1103,15 @@ def dynamic_melt_f_run_with_dynamic_spinup( # we are done with preparing the local_variables for the upcoming iterations return None - if yr_target is None: - yr_target = gdir.rgi_date + 1 # + 1 converted to hydro years - if min_spinup_period > yr_target - ys: + if target_yr is None: + target_yr = gdir.rgi_date + 1 # + 1 converted to hydro years + if min_spinup_period > target_yr - ys: log.info('The target year is closer to ys as the minimum spinup ' 'period -> therefore the minimum spinup period is ' 'adapted and it is the only period which is tried by the ' 'dynamic spinup function!') - min_spinup_period = yr_target - ys - spinup_period = yr_target - ys + min_spinup_period = target_yr - ys + spinup_period = target_yr - ys if spinup_start_yr_max is None: spinup_start_yr_max = yr0_ref_mb @@ -1178,7 +1178,7 @@ def dynamic_melt_f_run_with_dynamic_spinup( spinup_period=spinup_period, spinup_start_yr=ys, spinup_start_yr_max=spinup_start_yr_max, - min_spinup_period=min_spinup_period, yr_target=yr_target, + min_spinup_period=min_spinup_period, target_yr=target_yr, precision_percent=precision_percent, precision_absolute=precision_absolute, min_ice_thickness=min_ice_thickness, @@ -1220,7 +1220,7 @@ def dynamic_melt_f_run_with_dynamic_spinup_fallback( evolution_model=None, minimise_for='area', mb_model_historical=None, mb_model_spinup=None, climate_input_filesuffix='', spinup_period=20, min_spinup_period=10, - yr_target=None, precision_percent=1, + target_yr=None, precision_percent=1, precision_absolute=1, min_ice_thickness=10, first_guess_t_bias=-2, t_bias_max_step_length=2, maxiter=30, store_model_geometry=True, store_fl_diagnostics=None, @@ -1266,7 +1266,7 @@ def dynamic_melt_f_run_with_dynamic_spinup_fallback( with the provided parameter climate_input_filesuffix and during the period of spinup_start_yr until rgi_year (e.g. 1979 - 2000). minimise_for : str - The variable we want to match at yr_target. Options are 'area' or + The variable we want to match at target_yr. Options are 'area' or 'volume'. Default is 'area'. climate_input_filesuffix : str @@ -1274,10 +1274,10 @@ def dynamic_melt_f_run_with_dynamic_spinup_fallback( Default is '' spinup_period : int The period how long the spinup should run. Start date of historical run - is defined "yr_target - spinup_period". Minimum allowed value is + is defined "target_yr - spinup_period". Minimum allowed value is defined with 'min_spinup_period'. If the provided climate data starts - at year later than (yr_target - spinup_period) the spinup_period is set - to (yr_target - yr_climate_start). Caution if spinup_start_yr is set + at year later than (target_yr - spinup_period) the spinup_period is set + to (target_yr - yr_climate_start). Caution if spinup_start_yr is set the spinup_period is ignored. Default is 20 min_spinup_period : int @@ -1285,7 +1285,7 @@ def dynamic_melt_f_run_with_dynamic_spinup_fallback( a shorter period is tried. Here you can define the minimum period to try. Default is 10 - yr_target : int or None + target_yr : int or None The rgi date, at which we want to match area or volume. If None, gdir.rgi_date + 1 is used (the default). Default is None @@ -1338,7 +1338,7 @@ def dynamic_melt_f_run_with_dynamic_spinup_fallback( spinup_start_yr_max : int or None Possibility to provide a maximum year where the dynamic spinup must start from at least. If set, this overrides the min_spinup_period if - yr_target - spinup_start_yr_max > min_spinup_period. + target_yr - spinup_start_yr_max > min_spinup_period. Default is None add_fixed_geometry_spinup : bool If True and the original spinup_period of the dynamical spinup must be @@ -1380,15 +1380,15 @@ def dynamic_melt_f_run_with_dynamic_spinup_fallback( os.remove(os.path.join(gdir.dir, 'model_flowlines_dyn_melt_f_calib.pkl')) - if yr_target is None: - yr_target = gdir.rgi_date + 1 # + 1 converted to hydro years - if min_spinup_period > yr_target - ys: + if target_yr is None: + target_yr = gdir.rgi_date + 1 # + 1 converted to hydro years + if min_spinup_period > target_yr - ys: log.info('The RGI year is closer to ys as the minimum spinup ' 'period -> therefore the minimum spinup period is ' 'adapted and it is the only period which is tried by the ' 'dynamic spinup function!') - min_spinup_period = yr_target - ys - spinup_period = yr_target - ys + min_spinup_period = target_yr - ys + spinup_period = target_yr - ys yr_clim_min = gdir.get_climate_info()['baseline_yr_0'] try: @@ -1405,7 +1405,7 @@ def dynamic_melt_f_run_with_dynamic_spinup_fallback( spinup_start_yr=ys, min_spinup_period=min_spinup_period, spinup_start_yr_max=spinup_start_yr_max, - yr_target=yr_target, + target_yr=target_yr, minimise_for=minimise_for, precision_percent=precision_percent, precision_absolute=precision_absolute, @@ -1466,7 +1466,7 @@ def dynamic_melt_f_run_with_dynamic_spinup_fallback( def dynamic_melt_f_run( gdir, melt_f, yr0_ref_mb, yr1_ref_mb, fls_init, ys, ye, output_filesuffix='', evolution_model=None, - local_variables=None, set_local_variables=False, yr_target=None, + local_variables=None, set_local_variables=False, target_yr=None, **kwargs): """ This function is one option for a 'run_function' for the @@ -1504,7 +1504,7 @@ def dynamic_melt_f_run( set_local_variables : bool Not needed in this function. Only here to be confirm with the use of this function in 'run_dynamic_melt_f_calibration'. - yr_target : int or None + target_yr : int or None The target year for a potential dynamic spinup (not needed here). Default is None kwargs : dict @@ -1555,7 +1555,7 @@ def dynamic_melt_f_run( def dynamic_melt_f_run_fallback( gdir, melt_f, fls_init, ys, ye, local_variables, output_filesuffix='', - evolution_model=None, yr_target=None, **kwargs): + evolution_model=None, target_yr=None, **kwargs): """ This is the fallback function corresponding to the function 'dynamic_melt_f_run', which are provided to @@ -1584,7 +1584,7 @@ def dynamic_melt_f_run_fallback( evolution_model : :class:oggm.core.FlowlineModel which evolution model to use. Default: cfg.PARAMS['evolution_model'] Not all models work in all circumstances! - yr_target : int or None + target_yr : int or None The target year for a potential dynamic spinup (not needed here). Default is None kwargs : dict @@ -1625,7 +1625,7 @@ def run_dynamic_melt_f_calibration( ref_period='', melt_f_min=None, melt_f_max=None, melt_f_max_step_length_minimum=0.1, maxiter=20, ignore_errors=False, output_filesuffix='_dynamic_melt_f', - ys=None, ye=None, yr_target=None, + ys=None, ye=None, target_yr=None, run_function=dynamic_melt_f_run_with_dynamic_spinup, kwargs_run_function=None, fallback_function=dynamic_melt_f_run_with_dynamic_spinup_fallback, @@ -1716,7 +1716,7 @@ def run_dynamic_melt_f_calibration( The end year of the conducted run. If None the last year of the provided climate file. Default is None - yr_target : int or None + target_yr : int or None The target year for a potential dynamic spinup (see run_dynamic_spinup function for more info). If None, gdir.rgi_date + 1 is used (the default). @@ -1822,18 +1822,18 @@ def run_dynamic_melt_f_calibration( raise RuntimeError('The provided ys is larger than the start year of ' 'the given geodetic_mb_period!') - if yr_target is None: - yr_target = gdir.rgi_date + 1 # + 1 converted to hydro years - if yr_target < ys: + if target_yr is None: + target_yr = gdir.rgi_date + 1 # + 1 converted to hydro years + if target_yr < ys: if ignore_errors: log.info('The rgi year is smaller than the provided start year ' 'ys -> setting the rgi year to ys to continue!') - yr_target = ys + target_yr = ys else: raise RuntimeError('The rgi year is smaller than the provided ' 'start year ys!') - kwargs_run_function['yr_target'] = yr_target - kwargs_fallback_function['yr_target'] = yr_target + kwargs_run_function['target_yr'] = target_yr + kwargs_fallback_function['target_yr'] = target_yr # get initial flowlines from which we want to start from if init_model_filesuffix is not None: diff --git a/oggm/tests/test_models.py b/oggm/tests/test_models.py index d6e23b602..1270a8115 100644 --- a/oggm/tests/test_models.py +++ b/oggm/tests/test_models.py @@ -3169,7 +3169,7 @@ def test_run_dynamic_spinup(self, hef_gdir, minimise_for): for store_model_evolution in [True, False]: model_dynamic_spinup = run_dynamic_spinup( hef_gdir, - yr_target=yr_rgi, + target_yr=yr_rgi, minimise_for=minimise_for, precision_percent=precision_percent, precision_absolute=precision_absolute, @@ -3230,14 +3230,14 @@ def test_run_dynamic_spinup(self, hef_gdir, minimise_for): assert len(model_dynamic_spinup.fls) == len(fmod.fls) # test user provided target year and value - yr_target = 2000 + target_yr = 2000 if minimise_for == 'area': ref_value = 8.5 elif minimise_for == 'volume': ref_value = 0.6 model_dynamic_spinup_target_yr = run_dynamic_spinup( hef_gdir, - yr_target=yr_target, + target_yr=target_yr, target_value=ref_value, minimise_for=minimise_for, precision_percent=precision_percent, @@ -3261,7 +3261,7 @@ def test_run_dynamic_spinup(self, hef_gdir, minimise_for): rtol=precision_percent / 100, atol=0) assert np.isclose(model_value, ref_value, rtol=0, atol=precision_absolute) - assert model_dynamic_spinup_target_yr.yr == yr_target + assert model_dynamic_spinup_target_yr.yr == target_yr assert len(model_dynamic_spinup_target_yr.fls) == len(fls) # test if spinup_start_yr is handled correctly and overrides the spinup_period @@ -3270,7 +3270,7 @@ def test_run_dynamic_spinup(self, hef_gdir, minimise_for): hef_gdir, spinup_period=40, spinup_start_yr=spinup_start_yr, - yr_target=yr_rgi, + target_yr=yr_rgi, minimise_for=minimise_for, precision_percent=precision_percent, precision_absolute=precision_absolute, @@ -3315,7 +3315,7 @@ def test_run_dynamic_spinup(self, hef_gdir, minimise_for): run_dynamic_spinup( hef_gdir, minimise_for=minimise_for, - yr_target=2002, + target_yr=2002, ye=2002, ignore_errors=ignore_errors, spinup_period=10, @@ -3334,7 +3334,7 @@ def test_run_dynamic_spinup(self, hef_gdir, minimise_for): model = run_dynamic_spinup( hef_gdir, minimise_for=minimise_for, - yr_target=2002, + target_yr=2002, ye=2002, ignore_errors=ignore_errors, maxiter=2, @@ -3359,7 +3359,7 @@ def test_run_dynamic_spinup(self, hef_gdir, minimise_for): hef_gdir, spinup_period=40, spinup_start_yr=spinup_start_yr, - yr_target=yr_rgi, + target_yr=yr_rgi, ye=ye, return_t_bias_best=True, minimise_for=minimise_for, @@ -3392,7 +3392,7 @@ def test_run_dynamic_spinup(self, hef_gdir, minimise_for): spinup_period=5, spinup_start_yr=None, spinup_start_yr_max=1990, - yr_target=yr_rgi, + target_yr=yr_rgi, minimise_for=minimise_for, precision_percent=precision_percent, precision_absolute=precision_absolute, @@ -3419,13 +3419,13 @@ def test_run_dynamic_spinup(self, hef_gdir, minimise_for): spinup_start_yr_max=yr_rgi - 10, spinup_start_yr=yr_rgi - 5) - # test that provided ye is larger than yr_target + # test that provided ye is larger than target_yr with pytest.raises(RuntimeError, match='The provided end year *'): run_dynamic_spinup( hef_gdir, minimise_for=minimise_for, - yr_target=yr_rgi, + target_yr=yr_rgi, ye=yr_rgi - 1) # test if provided model geometry works and some other principle @@ -3441,7 +3441,7 @@ def test_run_dynamic_spinup(self, hef_gdir, minimise_for): minimise_for=minimise_for, init_model_filesuffix='_one_yr', init_model_yr=yr_rgi - 1, - yr_target=yr_rgi, + target_yr=yr_rgi, store_model_geometry=False) # test that error is raised if mb_elev_feedback not annual @@ -3471,7 +3471,7 @@ def test_run_dynamic_spinup(self, hef_gdir, minimise_for): precision_percent=0.00012, minimise_for=minimise_for, output_filesuffix='_without_fixed_spinup', - yr_target=yr_rgi, + target_yr=yr_rgi, add_fixed_geometry_spinup=False) run_without_fixed_spinup = utils.compile_run_output( hef_gdir, input_filesuffix='_without_fixed_spinup', path=False) @@ -3483,7 +3483,7 @@ def test_run_dynamic_spinup(self, hef_gdir, minimise_for): precision_percent=0.00012, minimise_for=minimise_for, output_filesuffix='_with_fixed_spinup', - yr_target=yr_rgi, + target_yr=yr_rgi, add_fixed_geometry_spinup=True) run_with_fixed_spinup = utils.compile_run_output( hef_gdir, input_filesuffix='_with_fixed_spinup', path=False)