diff --git a/arpav_ppcv/bootstrapper/cliapp.py b/arpav_ppcv/bootstrapper/cliapp.py index d6b80c84..467d2461 100644 --- a/arpav_ppcv/bootstrapper/cliapp.py +++ b/arpav_ppcv/bootstrapper/cliapp.py @@ -16,18 +16,22 @@ from ..schemas.coverages import ( ConfigurationParameterCreate, ConfigurationParameterValueCreateEmbeddedInConfigurationParameter, + ConfigurationParameterPossibleValueUpdate, + CoverageConfigurationUpdate, ) -from .coverage_configurations.cdd import generate_cdd_configurations -from .coverage_configurations.fd import generate_fd_configurations -from .coverage_configurations.pr import generate_pr_configurations -from .coverage_configurations.r95ptot import generate_r95ptot_configurations -from .coverage_configurations.snwdays import generate_snwdays_configurations -from .coverage_configurations.su30 import generate_su30_configurations -from .coverage_configurations.tas import generate_tas_configurations -from .coverage_configurations.tasmax import generate_tasmax_configurations -from .coverage_configurations.tasmin import generate_tasmin_configurations -from .coverage_configurations.tr import generate_tr_configurations +from .coverage_configurations import ( + cdd, + fd, + pr, + r95ptot, + snwdays, + su30, + tas, + tasmax, + tasmin, + tr, +) app = typer.Typer() @@ -200,29 +204,29 @@ def bootstrap_coverage_configurations( for pv in all_conf_param_values } coverage_configurations = [] - coverage_configurations.extend(generate_cdd_configurations(conf_param_values)) + coverage_configurations.extend(cdd.generate_configurations(conf_param_values)) coverage_configurations.extend( - generate_fd_configurations(conf_param_values, variables) + fd.generate_configurations(conf_param_values, variables) ) coverage_configurations.extend( - generate_pr_configurations(conf_param_values, variables) + pr.generate_configurations(conf_param_values, variables) ) - coverage_configurations.extend(generate_r95ptot_configurations(conf_param_values)) - coverage_configurations.extend(generate_snwdays_configurations(conf_param_values)) + coverage_configurations.extend(r95ptot.generate_configurations(conf_param_values)) + coverage_configurations.extend(snwdays.generate_configurations(conf_param_values)) coverage_configurations.extend( - generate_su30_configurations(conf_param_values, variables) + su30.generate_configurations(conf_param_values, variables) ) coverage_configurations.extend( - generate_tas_configurations(conf_param_values, variables) + tas.generate_configurations(conf_param_values, variables) ) coverage_configurations.extend( - generate_tasmax_configurations(conf_param_values, variables) + tasmax.generate_configurations(conf_param_values, variables) ) coverage_configurations.extend( - generate_tasmin_configurations(conf_param_values, variables) + tasmin.generate_configurations(conf_param_values, variables) ) coverage_configurations.extend( - generate_tr_configurations(conf_param_values, variables) + tr.generate_configurations(conf_param_values, variables) ) for cov_conf_create in coverage_configurations: @@ -237,3 +241,86 @@ def bootstrap_coverage_configurations( f"{cov_conf_create.name!r}: {err}" ) session.rollback() + + print("Creating related coverage relationships...") + all_cov_confs = { + cc.name: cc for cc in database.collect_all_coverage_configurations(session) + } + + to_update = {} + for name, related_names in { + **cdd.get_related_map(), + **fd.get_related_map(), + **pr.get_related_map(), + **r95ptot.get_related_map(), + **snwdays.get_related_map(), + **su30.get_related_map(), + **tas.get_related_map(), + **tasmax.get_related_map(), + **tasmin.get_related_map(), + **tr.get_related_map(), + }.items(): + to_update[name] = { + "related": related_names, + } + + for name, uncertainties in { + **cdd.get_uncertainty_map(), + **fd.get_uncertainty_map(), + **pr.get_uncertainty_map(), + **r95ptot.get_uncertainty_map(), + **snwdays.get_uncertainty_map(), + **su30.get_uncertainty_map(), + **tas.get_uncertainty_map(), + **tasmax.get_uncertainty_map(), + **tasmin.get_uncertainty_map(), + **tr.get_uncertainty_map(), + }.items(): + info = to_update.setdefault(name, {}) + info["uncertainties"] = uncertainties + + for name, info in to_update.items(): + main_cov_conf = all_cov_confs[name] + secondaries = info.get("related") + uncertainties = info.get("uncertainties") + update_kwargs = {} + if secondaries is not None: + secondary_cov_confs = [ + cc for name, cc in all_cov_confs.items() if name in secondaries + ] + update_kwargs["secondary_coverage_configurations_ids"] = [ + cc.id for cc in secondary_cov_confs + ] + if uncertainties is not None: + lower_uncert_id = [ + cc.id for name, cc in all_cov_confs.items() if name == uncertainties[0] + ][0] + upper_uncert_id = [ + cc.id for name, cc in all_cov_confs.items() if name == uncertainties[1] + ][0] + update_kwargs.update( + uncertainty_lower_bounds_coverage_configuration_id=lower_uncert_id, + uncertainty_upper_bounds_coverage_configuration_id=upper_uncert_id, + ) + cov_update = CoverageConfigurationUpdate( + **main_cov_conf.model_dump( + exclude={ + "uncertainty_lower_bounds_coverage_configuration_id", + "uncertainty_upper_bounds_coverage_configuration_id", + "secondary_coverage_configurations_ids", + "possible_values", + } + ), + **update_kwargs, + possible_values=[ + ConfigurationParameterPossibleValueUpdate( + configuration_parameter_value_id=pv.configuration_parameter_value_id + ) + for pv in main_cov_conf.possible_values + ], + ) + database.update_coverage_configuration( + session, + main_cov_conf, + cov_update, + ) diff --git a/arpav_ppcv/bootstrapper/coverage_configurations/cdd.py b/arpav_ppcv/bootstrapper/coverage_configurations/cdd.py index 6a949280..56e85225 100644 --- a/arpav_ppcv/bootstrapper/coverage_configurations/cdd.py +++ b/arpav_ppcv/bootstrapper/coverage_configurations/cdd.py @@ -13,7 +13,7 @@ ) -def generate_cdd_configurations( +def generate_configurations( conf_param_values, ) -> list[CoverageConfigurationCreate]: return [ @@ -22,7 +22,7 @@ def generate_cdd_configurations( netcdf_main_dataset_name="cdd", thredds_url_pattern="ensembletwbc/std/clipped/eca_cdd_an_avgagree_{time_window}_{scenario}_{year_period}_ls_VFVGTAA.nc", unit="gg", - palette="uncert-stippled/div-BrBg-inv", + palette="uncert-stippled/div-BrBG-inv", color_scale_min=-40, color_scale_max=40, possible_values=[ @@ -78,7 +78,7 @@ def generate_cdd_configurations( netcdf_main_dataset_name="cdd", thredds_url_pattern="indici5rcm/clipped/eca_cdd_an_EC-EARTH_CCLM4-8-17_{scenario}_{year_period}_{time_window}_ls_VFVGTAA.nc", unit="gg", - palette="default/div-BrBg-inv", + palette="default/div-BrBG-inv", color_scale_min=-40, color_scale_max=40, possible_values=[ @@ -134,7 +134,7 @@ def generate_cdd_configurations( netcdf_main_dataset_name="cdd", thredds_url_pattern="indici5rcm/clipped/eca_cdd_an_EC-EARTH_RACMO22E_{scenario}_{year_period}_{time_window}_ls_VFVGTAA.nc", unit="gg", - palette="default/div-BrBg-inv", + palette="default/div-BrBG-inv", color_scale_min=-40, color_scale_max=40, possible_values=[ @@ -190,7 +190,7 @@ def generate_cdd_configurations( netcdf_main_dataset_name="cdd", thredds_url_pattern="indici5rcm/clipped/eca_cdd_an_EC-EARTH_RCA4_{scenario}_{year_period}_{time_window}_ls_VFVGTAA.nc", unit="gg", - palette="default/div-BrBg-inv", + palette="default/div-BrBG-inv", color_scale_min=-40, color_scale_max=40, possible_values=[ @@ -246,7 +246,7 @@ def generate_cdd_configurations( netcdf_main_dataset_name="cdd", thredds_url_pattern="indici5rcm/clipped/eca_cdd_an_HadGEM2-ES_RACMO22E_{scenario}_{year_period}_{time_window}_ls_VFVGTAA.nc", unit="gg", - palette="default/div-BrBg-inv", + palette="default/div-BrBG-inv", color_scale_min=-40, color_scale_max=40, possible_values=[ @@ -302,7 +302,7 @@ def generate_cdd_configurations( netcdf_main_dataset_name="cdd", thredds_url_pattern="indici5rcm/clipped/eca_cdd_an_MPI-ESM-LR_REMO2009_{scenario}_{year_period}_{time_window}_ls_VFVGTAA.nc", unit="gg", - palette="default/div-BrBg-inv", + palette="default/div-BrBG-inv", color_scale_min=-40, color_scale_max=40, possible_values=[ @@ -354,3 +354,54 @@ def generate_cdd_configurations( ], ), ] + + +def get_related_map() -> dict[str, list[str]]: + return { + "cdd_30yr_anomaly_annual_agree_model_ensemble": [ + "cdd_30yr_anomaly_annual_model_ec_earth_cclm4_8_17", + "cdd_30yr_anomaly_annual_model_ec_earth_racmo22e", + "cdd_30yr_anomaly_annual_model_ec_earth_rca4", + "cdd_30yr_anomaly_annual_model_hadgem2_es_racmo22e", + "cdd_30yr_anomaly_annual_model_mpi_esm_lr_remo2009", + ], + "cdd_30yr_anomaly_annual_model_ec_earth_cclm4_8_17": [ + "cdd_30yr_anomaly_annual_agree_model_ensemble", + "cdd_30yr_anomaly_annual_model_ec_earth_racmo22e", + "cdd_30yr_anomaly_annual_model_ec_earth_rca4", + "cdd_30yr_anomaly_annual_model_hadgem2_es_racmo22e", + "cdd_30yr_anomaly_annual_model_mpi_esm_lr_remo2009", + ], + "cdd_30yr_anomaly_annual_model_ec_earth_racmo22e": [ + "cdd_30yr_anomaly_annual_agree_model_ensemble", + "cdd_30yr_anomaly_annual_model_ec_earth_cclm4_8_17", + "cdd_30yr_anomaly_annual_model_ec_earth_rca4", + "cdd_30yr_anomaly_annual_model_hadgem2_es_racmo22e", + "cdd_30yr_anomaly_annual_model_mpi_esm_lr_remo2009", + ], + "cdd_30yr_anomaly_annual_model_ec_earth_rca4": [ + "cdd_30yr_anomaly_annual_agree_model_ensemble", + "cdd_30yr_anomaly_annual_model_ec_earth_cclm4_8_17", + "cdd_30yr_anomaly_annual_model_ec_earth_racmo22e", + "cdd_30yr_anomaly_annual_model_hadgem2_es_racmo22e", + "cdd_30yr_anomaly_annual_model_mpi_esm_lr_remo2009", + ], + "cdd_30yr_anomaly_annual_model_hadgem2_es_racmo22e": [ + "cdd_30yr_anomaly_annual_agree_model_ensemble", + "cdd_30yr_anomaly_annual_model_ec_earth_cclm4_8_17", + "cdd_30yr_anomaly_annual_model_ec_earth_racmo22e", + "cdd_30yr_anomaly_annual_model_ec_earth_rca4", + "cdd_30yr_anomaly_annual_model_mpi_esm_lr_remo2009", + ], + "cdd_30yr_anomaly_annual_model_mpi_esm_lr_remo2009": [ + "cdd_30yr_anomaly_annual_agree_model_ensemble", + "cdd_30yr_anomaly_annual_model_ec_earth_cclm4_8_17", + "cdd_30yr_anomaly_annual_model_ec_earth_racmo22e", + "cdd_30yr_anomaly_annual_model_ec_earth_rca4", + "cdd_30yr_anomaly_annual_model_hadgem2_es_racmo22e", + ], + } + + +def get_uncertainty_map() -> dict[str, tuple[str, str]]: + return {} diff --git a/arpav_ppcv/bootstrapper/coverage_configurations/fd.py b/arpav_ppcv/bootstrapper/coverage_configurations/fd.py index 3eba8490..a263a621 100644 --- a/arpav_ppcv/bootstrapper/coverage_configurations/fd.py +++ b/arpav_ppcv/bootstrapper/coverage_configurations/fd.py @@ -24,7 +24,7 @@ ) -def generate_fd_configurations( +def generate_configurations( conf_param_values, variables ) -> list[CoverageConfigurationCreate]: return [ @@ -477,3 +477,101 @@ def generate_fd_configurations( ], ), ] + + +def get_related_map() -> dict[str, list[str]]: + return { + "fd_annual_absolute_model_ensemble": [ + "fd_annual_absolute_model_ec_earth_cclm4_8_17", + "fd_annual_absolute_model_ec_earth_racmo22e", + "fd_annual_absolute_model_ec_earth_rca4", + "fd_annual_absolute_model_hadgem2_es_racmo22e", + "fd_annual_absolute_model_mpi_esm_lr_remo2009", + ], + "fd_annual_absolute_model_ec_earth_cclm4_8_17": [ + "fd_annual_absolute_model_ensemble", + "fd_annual_absolute_model_ec_earth_racmo22e", + "fd_annual_absolute_model_ec_earth_rca4", + "fd_annual_absolute_model_hadgem2_es_racmo22e", + "fd_annual_absolute_model_mpi_esm_lr_remo2009", + ], + "fd_annual_absolute_model_ec_earth_racmo22e": [ + "fd_annual_absolute_model_ensemble", + "fd_annual_absolute_model_ec_earth_cclm4_8_17", + "fd_annual_absolute_model_ec_earth_rca4", + "fd_annual_absolute_model_hadgem2_es_racmo22e", + "fd_annual_absolute_model_mpi_esm_lr_remo2009", + ], + "fd_annual_absolute_model_ec_earth_rca4": [ + "fd_annual_absolute_model_ensemble", + "fd_annual_absolute_model_ec_earth_cclm4_8_17", + "fd_annual_absolute_model_ec_earth_racmo22e", + "fd_annual_absolute_model_hadgem2_es_racmo22e", + "fd_annual_absolute_model_mpi_esm_lr_remo2009", + ], + "fd_annual_absolute_model_hadgem2_es_racmo22e": [ + "fd_annual_absolute_model_ensemble", + "fd_annual_absolute_model_ec_earth_cclm4_8_17", + "fd_annual_absolute_model_ec_earth_racmo22e", + "fd_annual_absolute_model_ec_earth_rca4", + "fd_annual_absolute_model_mpi_esm_lr_remo2009", + ], + "fd_annual_absolute_model_mpi_esm_lr_remo2009": [ + "fd_annual_absolute_model_ensemble", + "fd_annual_absolute_model_ec_earth_cclm4_8_17", + "fd_annual_absolute_model_ec_earth_racmo22e", + "fd_annual_absolute_model_ec_earth_rca4", + "fd_annual_absolute_model_hadgem2_es_racmo22e", + ], + "fd_30yr_anomaly_annual_agree_model_ensemble": [ + "fd_30yr_anomaly_annual_model_ec_earth_cclm4_8_17", + "fd_30yr_anomaly_annual_model_ec_earth_racmo22e", + "fd_30yr_anomaly_annual_model_ec_earth_rca4", + "fd_30yr_anomaly_annual_model_hadgem2_es_racmo22e", + "fd_30yr_anomaly_annual_model_mpi_esm_lr_remo2009", + ], + "fd_30yr_anomaly_annual_model_ec_earth_cclm4_8_17": [ + "fd_30yr_anomaly_annual_agree_model_ensemble", + "fd_30yr_anomaly_annual_model_ec_earth_racmo22e", + "fd_30yr_anomaly_annual_model_ec_earth_rca4", + "fd_30yr_anomaly_annual_model_hadgem2_es_racmo22e", + "fd_30yr_anomaly_annual_model_mpi_esm_lr_remo2009", + ], + "fd_30yr_anomaly_annual_model_ec_earth_racmo22e": [ + "fd_30yr_anomaly_annual_agree_model_ensemble", + "fd_30yr_anomaly_annual_model_ec_earth_cclm4_8_17", + "fd_30yr_anomaly_annual_model_ec_earth_rca4", + "fd_30yr_anomaly_annual_model_hadgem2_es_racmo22e", + "fd_30yr_anomaly_annual_model_mpi_esm_lr_remo2009", + ], + "fd_30yr_anomaly_annual_model_ec_earth_rca4": [ + "fd_30yr_anomaly_annual_agree_model_ensemble", + "fd_30yr_anomaly_annual_model_ec_earth_cclm4_8_17", + "fd_30yr_anomaly_annual_model_ec_earth_racmo22e", + "fd_30yr_anomaly_annual_model_hadgem2_es_racmo22e", + "fd_30yr_anomaly_annual_model_mpi_esm_lr_remo2009", + ], + "fd_30yr_anomaly_annual_model_hadgem2_es_racmo22e": [ + "fd_30yr_anomaly_annual_agree_model_ensemble", + "fd_30yr_anomaly_annual_model_ec_earth_cclm4_8_17", + "fd_30yr_anomaly_annual_model_ec_earth_racmo22e", + "fd_30yr_anomaly_annual_model_ec_earth_rca4", + "fd_30yr_anomaly_annual_model_mpi_esm_lr_remo2009", + ], + "fd_30yr_anomaly_annual_model_mpi_esm_lr_remo2009": [ + "fd_30yr_anomaly_annual_agree_model_ensemble", + "fd_30yr_anomaly_annual_model_ec_earth_cclm4_8_17", + "fd_30yr_anomaly_annual_model_ec_earth_racmo22e", + "fd_30yr_anomaly_annual_model_ec_earth_rca4", + "fd_30yr_anomaly_annual_model_hadgem2_es_racmo22e", + ], + } + + +def get_uncertainty_map() -> dict[str, tuple[str, str]]: + return { + "fd_annual_absolute_model_ensemble": ( + "fd_annual_absolute_model_ensemble_upper_uncertainty", + "fd_annual_absolute_model_ensemble_lower_uncertainty", + ), + } diff --git a/arpav_ppcv/bootstrapper/coverage_configurations/pr.py b/arpav_ppcv/bootstrapper/coverage_configurations/pr.py index be26709a..a1e9cee5 100644 --- a/arpav_ppcv/bootstrapper/coverage_configurations/pr.py +++ b/arpav_ppcv/bootstrapper/coverage_configurations/pr.py @@ -45,7 +45,7 @@ ) -def generate_pr_configurations( +def generate_configurations( conf_param_values, variables ) -> list[CoverageConfigurationCreate]: return [ @@ -54,7 +54,7 @@ def generate_pr_configurations( netcdf_main_dataset_name="pr", thredds_url_pattern="ens5ym/clipped/pr_anom_pp_ts_{scenario}_{year_period}_VFVGTAA.nc", unit="%", - palette="default/div-BrBg", + palette="default/div-BrBG", color_scale_min=-40, color_scale_max=40, possible_values=[ @@ -100,7 +100,7 @@ def generate_pr_configurations( netcdf_main_dataset_name="pr", thredds_url_pattern="EC-EARTH_CCLM4-8-17ym/clipped/pr_EC-EARTH_CCLM4-8-17_{scenario}_{year_period}_anomaly_pp_percentage_VFVGTAA.nc", unit="%", - palette="default/div-BrBg", + palette="default/div-BrBG", color_scale_min=-40, color_scale_max=40, possible_values=[ @@ -146,7 +146,7 @@ def generate_pr_configurations( netcdf_main_dataset_name="pr", thredds_url_pattern="EC-EARTH_RACMO22Eym/clipped/pr_EC-EARTH_RACMO22E_{scenario}_{year_period}_anomaly_pp_percentage_VFVGTAA.nc", unit="%", - palette="default/div-BrBg", + palette="default/div-BrBG", color_scale_min=-40, color_scale_max=40, possible_values=[ @@ -192,7 +192,7 @@ def generate_pr_configurations( netcdf_main_dataset_name="pr", thredds_url_pattern="EC-EARTH_RCA4ym/clipped/pr_EC-EARTH_RCA4_{scenario}_{year_period}_anomaly_pp_percentage_VFVGTAA.nc", unit="%", - palette="default/div-BrBg", + palette="default/div-BrBG", color_scale_min=-40, color_scale_max=40, possible_values=[ @@ -238,7 +238,7 @@ def generate_pr_configurations( netcdf_main_dataset_name="pr", thredds_url_pattern="HadGEM2-ES_RACMO22Eym/clipped/pr_HadGEM2-ES_RACMO22E_{scenario}_{year_period}_anomaly_pp_percentage_VFVGTAA.nc", unit="%", - palette="default/div-BrBg", + palette="default/div-BrBG", color_scale_min=-40, color_scale_max=40, possible_values=[ @@ -284,7 +284,7 @@ def generate_pr_configurations( netcdf_main_dataset_name="pr", thredds_url_pattern="MPI-ESM-LR_REMO2009ym/clipped/pr_MPI-ESM-LR_REMO2009_{scenario}_{year_period}_anomaly_pp_percentage_VFVGTAA.nc", unit="%", - palette="default/div-BrBg", + palette="default/div-BrBG", color_scale_min=-40, color_scale_max=40, possible_values=[ @@ -1046,7 +1046,7 @@ def generate_pr_configurations( netcdf_main_dataset_name="pr", thredds_url_pattern="ensembletwbc/std/clipped/pr_avgagree_percentage_{time_window}_{scenario}_{year_period}_VFVGTAA.nc", unit="%", - palette="uncert-stippled/div-BrBg", + palette="uncert-stippled/div-BrBG", color_scale_min=-40, color_scale_max=40, possible_values=[ @@ -1102,7 +1102,7 @@ def generate_pr_configurations( netcdf_main_dataset_name="pr", thredds_url_pattern="taspr5rcm/clipped/pr_EC-EARTH_CCLM4-8-17_{scenario}_seas_{time_window}_percentage_{year_period}_VFVGTAA.nc", unit="%", - palette="default/div-BrBg", + palette="default/div-BrBG", color_scale_min=-40, color_scale_max=40, possible_values=[ @@ -1158,7 +1158,7 @@ def generate_pr_configurations( netcdf_main_dataset_name="pr", thredds_url_pattern="taspr5rcm/clipped/pr_EC-EARTH_RACMO22E_{scenario}_seas_{time_window}_percentage_{year_period}_VFVGTAA.nc", unit="%", - palette="default/div-BrBg", + palette="default/div-BrBG", color_scale_min=-40, color_scale_max=40, possible_values=[ @@ -1214,7 +1214,7 @@ def generate_pr_configurations( netcdf_main_dataset_name="pr", thredds_url_pattern="taspr5rcm/clipped/pr_EC-EARTH_RCA4_{scenario}_seas_{time_window}_percentage_{year_period}_VFVGTAA.nc", unit="%", - palette="default/div-BrBg", + palette="default/div-BrBG", color_scale_min=-40, color_scale_max=40, possible_values=[ @@ -1270,7 +1270,7 @@ def generate_pr_configurations( netcdf_main_dataset_name="pr", thredds_url_pattern="taspr5rcm/clipped/pr_HadGEM2-ES_RACMO22E_{scenario}_seas_{time_window}_percentage_{year_period}_VFVGTAA.nc", unit="%", - palette="default/div-BrBg", + palette="default/div-BrBG", color_scale_min=-40, color_scale_max=40, possible_values=[ @@ -1326,7 +1326,7 @@ def generate_pr_configurations( netcdf_main_dataset_name="pr", thredds_url_pattern="taspr5rcm/clipped/pr_MPI-ESM-LR_REMO2009_{scenario}_seas_{time_window}_percentage_{year_period}_VFVGTAA.nc", unit="%", - palette="default/div-BrBg", + palette="default/div-BrBG", color_scale_min=-40, color_scale_max=40, possible_values=[ @@ -1378,3 +1378,193 @@ def generate_pr_configurations( ], ), ] + + +def get_related_map() -> dict[str, list[str]]: + return { + "pr_seasonal_anomaly_model_ensemble": [ + "pr_seasonal_anomaly_model_ec_earth_cclm4_8_17", + "pr_seasonal_anomaly_model_ec_earth_racmo22e", + "pr_seasonal_anomaly_model_ec_earth_rca4", + "pr_seasonal_anomaly_model_hadgem2_es_racmo22e", + "pr_seasonal_anomaly_model_mpi_esm_lr_remo2009", + ], + "pr_seasonal_anomaly_model_ec_earth_cclm4_8_17": [ + "pr_seasonal_anomaly_model_ensemble", + "pr_seasonal_anomaly_model_ec_earth_racmo22e", + "pr_seasonal_anomaly_model_ec_earth_rca4", + "pr_seasonal_anomaly_model_hadgem2_es_racmo22e", + "pr_seasonal_anomaly_model_mpi_esm_lr_remo2009", + ], + "pr_seasonal_anomaly_model_ec_earth_racmo22e": [ + "pr_seasonal_anomaly_model_ensemble", + "pr_seasonal_anomaly_model_ec_earth_cclm4_8_17", + "pr_seasonal_anomaly_model_ec_earth_rca4", + "pr_seasonal_anomaly_model_hadgem2_es_racmo22e", + "pr_seasonal_anomaly_model_mpi_esm_lr_remo2009", + ], + "pr_seasonal_anomaly_model_ec_earth_rca4": [ + "pr_seasonal_anomaly_model_ensemble", + "pr_seasonal_anomaly_model_ec_earth_cclm4_8_17", + "pr_seasonal_anomaly_model_ec_earth_racmo22e", + "pr_seasonal_anomaly_model_hadgem2_es_racmo22e", + "pr_seasonal_anomaly_model_mpi_esm_lr_remo2009", + ], + "pr_seasonal_anomaly_model_hadgem2_es_racmo22e": [ + "pr_seasonal_anomaly_model_ensemble", + "pr_seasonal_anomaly_model_ec_earth_cclm4_8_17", + "pr_seasonal_anomaly_model_ec_earth_racmo22e", + "pr_seasonal_anomaly_model_ec_earth_rca4", + "pr_seasonal_anomaly_model_mpi_esm_lr_remo2009", + ], + "pr_seasonal_anomaly_model_mpi_esm_lr_remo2009": [ + "pr_seasonal_anomaly_model_ensemble", + "pr_seasonal_anomaly_model_ec_earth_cclm4_8_17", + "pr_seasonal_anomaly_model_ec_earth_racmo22e", + "pr_seasonal_anomaly_model_ec_earth_rca4", + "pr_seasonal_anomaly_model_hadgem2_es_racmo22e", + ], + "pr_seasonal_absolute_model_ensemble": [ + "pr_seasonal_absolute_model_ec_earth_cclm4_8_17", + "pr_seasonal_absolute_model_ec_earth_racmo22e", + "pr_seasonal_absolute_model_ec_earth_rca4", + "pr_seasonal_absolute_model_hadgem2_es_racmo22e", + "pr_seasonal_absolute_model_mpi_esm_lr_remo2009", + ], + "pr_seasonal_absolute_model_ec_earth_cclm4_8_17": [ + "pr_seasonal_absolute_model_ensemble", + "pr_seasonal_absolute_model_ec_earth_racmo22e", + "pr_seasonal_absolute_model_ec_earth_rca4", + "pr_seasonal_absolute_model_hadgem2_es_racmo22e", + "pr_seasonal_absolute_model_mpi_esm_lr_remo2009", + ], + "pr_seasonal_absolute_model_ec_earth_racmo22e": [ + "pr_seasonal_absolute_model_ensemble", + "pr_seasonal_absolute_model_ec_earth_cclm4_8_17", + "pr_seasonal_absolute_model_ec_earth_rca4", + "pr_seasonal_absolute_model_hadgem2_es_racmo22e", + "pr_seasonal_absolute_model_mpi_esm_lr_remo2009", + ], + "pr_seasonal_absolute_model_ec_earth_rca4": [ + "pr_seasonal_absolute_model_ensemble", + "pr_seasonal_absolute_model_ec_earth_cclm4_8_17", + "pr_seasonal_absolute_model_ec_earth_racmo22e", + "pr_seasonal_absolute_model_hadgem2_es_racmo22e", + "pr_seasonal_absolute_model_mpi_esm_lr_remo2009", + ], + "pr_seasonal_absolute_model_hadgem2_es_racmo22e": [ + "pr_seasonal_absolute_model_ensemble", + "pr_seasonal_absolute_model_ec_earth_cclm4_8_17", + "pr_seasonal_absolute_model_ec_earth_racmo22e", + "pr_seasonal_absolute_model_ec_earth_rca4", + "pr_seasonal_absolute_model_mpi_esm_lr_remo2009", + ], + "pr_seasonal_absolute_model_mpi_esm_lr_remo2009": [ + "pr_seasonal_absolute_model_ensemble", + "pr_seasonal_absolute_model_ec_earth_cclm4_8_17", + "pr_seasonal_absolute_model_ec_earth_racmo22e", + "pr_seasonal_absolute_model_ec_earth_rca4", + "pr_seasonal_absolute_model_hadgem2_es_racmo22e", + ], + "pr_annual_absolute_model_ensemble": [ + "pr_annual_absolute_model_ec_earth_cclm4_8_17", + "pr_annual_absolute_model_ec_earth_racmo22e", + "pr_annual_absolute_model_ec_earth_rca4", + "pr_annual_absolute_model_hadgem2_es_racmo22e", + "pr_annual_absolute_model_mpi_esm_lr_remo2009", + ], + "pr_annual_absolute_model_ec_earth_cclm4_8_17": [ + "pr_annual_absolute_model_ensemble", + "pr_annual_absolute_model_ec_earth_racmo22e", + "pr_annual_absolute_model_ec_earth_rca4", + "pr_annual_absolute_model_hadgem2_es_racmo22e", + "pr_annual_absolute_model_mpi_esm_lr_remo2009", + ], + "pr_annual_absolute_model_ec_earth_racmo22e": [ + "pr_annual_absolute_model_ensemble", + "pr_annual_absolute_model_ec_earth_cclm4_8_17", + "pr_annual_absolute_model_ec_earth_rca4", + "pr_annual_absolute_model_hadgem2_es_racmo22e", + "pr_annual_absolute_model_mpi_esm_lr_remo2009", + ], + "pr_annual_absolute_model_ec_earth_rca4": [ + "pr_annual_absolute_model_ensemble", + "pr_annual_absolute_model_ec_earth_cclm4_8_17", + "pr_annual_absolute_model_ec_earth_racmo22e", + "pr_annual_absolute_model_hadgem2_es_racmo22e", + "pr_annual_absolute_model_mpi_esm_lr_remo2009", + ], + "pr_annual_absolute_model_hadgem2_es_racmo22e": [ + "pr_annual_absolute_model_ensemble", + "pr_annual_absolute_model_ec_earth_cclm4_8_17", + "pr_annual_absolute_model_ec_earth_racmo22e", + "pr_annual_absolute_model_ec_earth_rca4", + "pr_annual_absolute_model_mpi_esm_lr_remo2009", + ], + "pr_annual_absolute_model_mpi_esm_lr_remo2009": [ + "pr_annual_absolute_model_ensemble", + "pr_annual_absolute_model_ec_earth_cclm4_8_17", + "pr_annual_absolute_model_ec_earth_racmo22e", + "pr_annual_absolute_model_ec_earth_rca4", + "pr_annual_absolute_model_hadgem2_es_racmo22e", + ], + "pr_30yr_anomaly_seasonal_agree_model_ensemble": [ + "pr_30yr_anomaly_seasonal_model_ec_earth_cclm4_8_17", + "pr_30yr_anomaly_seasonal_model_ec_earth_racmo22e", + "pr_30yr_anomaly_seasonal_model_ec_earth_rca4", + "pr_30yr_anomaly_seasonal_model_hadgem2_es_racmo22e", + "pr_30yr_anomaly_seasonal_model_mpi_esm_lr_remo2009", + ], + "pr_30yr_anomaly_seasonal_model_ec_earth_cclm4_8_17": [ + "pr_30yr_anomaly_seasonal_agree_model_ensemble", + "pr_30yr_anomaly_seasonal_model_ec_earth_racmo22e", + "pr_30yr_anomaly_seasonal_model_ec_earth_rca4", + "pr_30yr_anomaly_seasonal_model_hadgem2_es_racmo22e", + "pr_30yr_anomaly_seasonal_model_mpi_esm_lr_remo2009", + ], + "pr_30yr_anomaly_seasonal_model_ec_earth_racmo22e": [ + "pr_30yr_anomaly_seasonal_agree_model_ensemble", + "pr_30yr_anomaly_seasonal_model_ec_earth_cclm4_8_17", + "pr_30yr_anomaly_seasonal_model_ec_earth_rca4", + "pr_30yr_anomaly_seasonal_model_hadgem2_es_racmo22e", + "pr_30yr_anomaly_seasonal_model_mpi_esm_lr_remo2009", + ], + "pr_30yr_anomaly_seasonal_model_ec_earth_rca4": [ + "pr_30yr_anomaly_seasonal_agree_model_ensemble", + "pr_30yr_anomaly_seasonal_model_ec_earth_cclm4_8_17", + "pr_30yr_anomaly_seasonal_model_ec_earth_racmo22e", + "pr_30yr_anomaly_seasonal_model_hadgem2_es_racmo22e", + "pr_30yr_anomaly_seasonal_model_mpi_esm_lr_remo2009", + ], + "pr_30yr_anomaly_seasonal_model_hadgem2_es_racmo22e": [ + "pr_30yr_anomaly_seasonal_agree_model_ensemble", + "pr_30yr_anomaly_seasonal_model_ec_earth_cclm4_8_17", + "pr_30yr_anomaly_seasonal_model_ec_earth_racmo22e", + "pr_30yr_anomaly_seasonal_model_ec_earth_rca4", + "pr_30yr_anomaly_seasonal_model_mpi_esm_lr_remo2009", + ], + "pr_30yr_anomaly_seasonal_model_mpi_esm_lr_remo2009": [ + "pr_30yr_anomaly_seasonal_agree_model_ensemble", + "pr_30yr_anomaly_seasonal_model_ec_earth_cclm4_8_17", + "pr_30yr_anomaly_seasonal_model_ec_earth_racmo22e", + "pr_30yr_anomaly_seasonal_model_ec_earth_rca4", + "pr_30yr_anomaly_seasonal_model_hadgem2_es_racmo22e", + ], + } + + +def get_uncertainty_map() -> dict[str, tuple[str, str]]: + return { + "pr_seasonal_anomaly_model_ensemble": ( + "pr_seasonal_anomaly_model_ensemble_upper_uncertainty", + "pr_seasonal_anomaly_model_ensemble_lower_uncertainty", + ), + "pr_seasonal_absolute_model_ensemble": ( + "pr_seasonal_absolute_model_ensemble_upper_uncertainty", + "pr_seasonal_absolute_model_ensemble_lower_uncertainty", + ), + "pr_annual_absolute_model_ensemble": ( + "pr_annual_absolute_model_ensemble_upper_uncertainty", + "pr_annual_absolute_model_ensemble_lower_uncertainty", + ), + } diff --git a/arpav_ppcv/bootstrapper/coverage_configurations/r95ptot.py b/arpav_ppcv/bootstrapper/coverage_configurations/r95ptot.py index 5e8af24d..1c7dc5c0 100644 --- a/arpav_ppcv/bootstrapper/coverage_configurations/r95ptot.py +++ b/arpav_ppcv/bootstrapper/coverage_configurations/r95ptot.py @@ -13,7 +13,7 @@ ) -def generate_r95ptot_configurations( +def generate_configurations( conf_param_values, ) -> list[CoverageConfigurationCreate]: return [ @@ -22,7 +22,7 @@ def generate_r95ptot_configurations( netcdf_main_dataset_name="r95ptot", thredds_url_pattern="ensembletwbc/std/clipped/pr_change_cumulative_check_avgagree_{time_window}_{scenario}_{year_period}_VFVGTAA.nc", unit="%", - palette="uncert-stippled/div-BrBg", + palette="uncert-stippled/div-BrBG", color_scale_min=-160, color_scale_max=160, possible_values=[ @@ -78,7 +78,7 @@ def generate_r95ptot_configurations( netcdf_main_dataset_name="r95ptot", thredds_url_pattern="indici5rcm/clipped/pr_change_cumulative_EC-EARTH_CCLM4-8-17_{year_period}_{scenario}_{time_window}_VFVGTAA.nc", unit="%", - palette="default/div-BrBg", + palette="default/div-BrBG", color_scale_min=-160, color_scale_max=160, possible_values=[ @@ -134,7 +134,7 @@ def generate_r95ptot_configurations( netcdf_main_dataset_name="r95ptot", thredds_url_pattern="indici5rcm/clipped/pr_change_cumulative_EC-EARTH_RACMO22E_{year_period}_{scenario}_{time_window}_VFVGTAA.nc", unit="%", - palette="default/div-BrBg", + palette="default/div-BrBG", color_scale_min=-160, color_scale_max=160, possible_values=[ @@ -190,7 +190,7 @@ def generate_r95ptot_configurations( netcdf_main_dataset_name="r95ptot", thredds_url_pattern="indici5rcm/clipped/pr_change_cumulative_EC-EARTH_RCA4_{year_period}_{scenario}_{time_window}_VFVGTAA.nc", unit="%", - palette="default/div-BrBg", + palette="default/div-BrBG", color_scale_min=-160, color_scale_max=160, possible_values=[ @@ -246,7 +246,7 @@ def generate_r95ptot_configurations( netcdf_main_dataset_name="r95ptot", thredds_url_pattern="indici5rcm/clipped/pr_change_cumulative_HadGEM2-ES_RACMO22E_{year_period}_{scenario}_{time_window}_VFVGTAA.nc", unit="%", - palette="default/div-BrBg", + palette="default/div-BrBG", color_scale_min=-160, color_scale_max=160, possible_values=[ @@ -302,7 +302,7 @@ def generate_r95ptot_configurations( netcdf_main_dataset_name="r95ptot", thredds_url_pattern="indici5rcm/clipped/pr_change_cumulative_MPI-ESM-LR_REMO2009_{year_period}_{scenario}_{time_window}_VFVGTAA.nc", unit="%", - palette="default/div-BrBg", + palette="default/div-BrBG", color_scale_min=-160, color_scale_max=160, possible_values=[ @@ -354,3 +354,54 @@ def generate_r95ptot_configurations( ], ), ] + + +def get_related_map() -> dict[str, list[str]]: + return { + "r95ptot_30yr_anomaly_annual_agree_model_ensemble": [ + "r95ptot_30yr_anomaly_annual_model_ec_earth_cclm4_8_17", + "r95ptot_30yr_anomaly_annual_model_ec_earth_racmo22e", + "r95ptot_30yr_anomaly_annual_model_ec_earth_rca4", + "r95ptot_30yr_anomaly_annual_model_hadgem2_es_racmo22e", + "r95ptot_30yr_anomaly_annual_model_mpi_esm_lr_remo2009", + ], + "r95ptot_30yr_anomaly_annual_model_ec_earth_cclm4_8_17": [ + "r95ptot_30yr_anomaly_annual_agree_model_ensemble", + "r95ptot_30yr_anomaly_annual_model_ec_earth_racmo22e", + "r95ptot_30yr_anomaly_annual_model_ec_earth_rca4", + "r95ptot_30yr_anomaly_annual_model_hadgem2_es_racmo22e", + "r95ptot_30yr_anomaly_annual_model_mpi_esm_lr_remo2009", + ], + "r95ptot_30yr_anomaly_annual_model_ec_earth_racmo22e": [ + "r95ptot_30yr_anomaly_annual_agree_model_ensemble", + "r95ptot_30yr_anomaly_annual_model_ec_earth_cclm4_8_17", + "r95ptot_30yr_anomaly_annual_model_ec_earth_rca4", + "r95ptot_30yr_anomaly_annual_model_hadgem2_es_racmo22e", + "r95ptot_30yr_anomaly_annual_model_mpi_esm_lr_remo2009", + ], + "r95ptot_30yr_anomaly_annual_model_ec_earth_rca4": [ + "r95ptot_30yr_anomaly_annual_agree_model_ensemble", + "r95ptot_30yr_anomaly_annual_model_ec_earth_cclm4_8_17", + "r95ptot_30yr_anomaly_annual_model_ec_earth_racmo22e", + "r95ptot_30yr_anomaly_annual_model_hadgem2_es_racmo22e", + "r95ptot_30yr_anomaly_annual_model_mpi_esm_lr_remo2009", + ], + "r95ptot_30yr_anomaly_annual_model_hadgem2_es_racmo22e": [ + "r95ptot_30yr_anomaly_annual_agree_model_ensemble", + "r95ptot_30yr_anomaly_annual_model_ec_earth_cclm4_8_17", + "r95ptot_30yr_anomaly_annual_model_ec_earth_racmo22e", + "r95ptot_30yr_anomaly_annual_model_ec_earth_rca4", + "r95ptot_30yr_anomaly_annual_model_mpi_esm_lr_remo2009", + ], + "r95ptot_30yr_anomaly_annual_model_mpi_esm_lr_remo2009": [ + "r95ptot_30yr_anomaly_annual_agree_model_ensemble", + "r95ptot_30yr_anomaly_annual_model_ec_earth_cclm4_8_17", + "r95ptot_30yr_anomaly_annual_model_ec_earth_racmo22e", + "r95ptot_30yr_anomaly_annual_model_ec_earth_rca4", + "r95ptot_30yr_anomaly_annual_model_hadgem2_es_racmo22e", + ], + } + + +def get_uncertainty_map() -> dict[str, tuple[str, str]]: + return {} diff --git a/arpav_ppcv/bootstrapper/coverage_configurations/snwdays.py b/arpav_ppcv/bootstrapper/coverage_configurations/snwdays.py index 67bd6bf6..f5018c03 100644 --- a/arpav_ppcv/bootstrapper/coverage_configurations/snwdays.py +++ b/arpav_ppcv/bootstrapper/coverage_configurations/snwdays.py @@ -22,7 +22,7 @@ ) -def generate_snwdays_configurations( +def generate_configurations( conf_param_values, ) -> list[CoverageConfigurationCreate]: return [ @@ -452,3 +452,101 @@ def generate_snwdays_configurations( ], ), ] + + +def get_related_map() -> dict[str, list[str]]: + return { + "snwdays_annual_absolute_model_ensemble": [ + "snwdays_annual_absolute_model_ec_earth_cclm4_8_17", + "snwdays_annual_absolute_model_ec_earth_racmo22e", + "snwdays_annual_absolute_model_ec_earth_rca4", + "snwdays_annual_absolute_model_hadgem2_es_racmo22e", + "snwdays_annual_absolute_model_mpi_esm_lr_remo2009", + ], + "snwdays_annual_absolute_model_ec_earth_cclm4_8_17": [ + "snwdays_annual_absolute_model_ensemble", + "snwdays_annual_absolute_model_ec_earth_racmo22e", + "snwdays_annual_absolute_model_ec_earth_rca4", + "snwdays_annual_absolute_model_hadgem2_es_racmo22e", + "snwdays_annual_absolute_model_mpi_esm_lr_remo2009", + ], + "snwdays_annual_absolute_model_ec_earth_racmo22e": [ + "snwdays_annual_absolute_model_ensemble", + "snwdays_annual_absolute_model_ec_earth_cclm4_8_17", + "snwdays_annual_absolute_model_ec_earth_rca4", + "snwdays_annual_absolute_model_hadgem2_es_racmo22e", + "snwdays_annual_absolute_model_mpi_esm_lr_remo2009", + ], + "snwdays_annual_absolute_model_ec_earth_rca4": [ + "snwdays_annual_absolute_model_ensemble", + "snwdays_annual_absolute_model_ec_earth_cclm4_8_17", + "snwdays_annual_absolute_model_ec_earth_racmo22e", + "snwdays_annual_absolute_model_hadgem2_es_racmo22e", + "snwdays_annual_absolute_model_mpi_esm_lr_remo2009", + ], + "snwdays_annual_absolute_model_hadgem2_es_racmo22e": [ + "snwdays_annual_absolute_model_ensemble", + "snwdays_annual_absolute_model_ec_earth_cclm4_8_17", + "snwdays_annual_absolute_model_ec_earth_racmo22e", + "snwdays_annual_absolute_model_ec_earth_rca4", + "snwdays_annual_absolute_model_mpi_esm_lr_remo2009", + ], + "snwdays_annual_absolute_model_mpi_esm_lr_remo2009": [ + "snwdays_annual_absolute_model_ensemble", + "snwdays_annual_absolute_model_ec_earth_cclm4_8_17", + "snwdays_annual_absolute_model_ec_earth_racmo22e", + "snwdays_annual_absolute_model_ec_earth_rca4", + "snwdays_annual_absolute_model_hadgem2_es_racmo22e", + ], + "snwdays_30yr_anomaly_annual_agree_model_ensemble": [ + "snwdays_30yr_anomaly_annual_model_ec_earth_cclm4_8_17", + "snwdays_30yr_anomaly_annual_model_ec_earth_racmo22e", + "snwdays_30yr_anomaly_annual_model_ec_earth_rca4", + "snwdays_30yr_anomaly_annual_model_hadgem2_es_racmo22e", + "snwdays_30yr_anomaly_annual_model_mpi_esm_lr_remo2009", + ], + "snwdays_30yr_anomaly_annual_model_ec_earth_cclm4_8_17": [ + "snwdays_30yr_anomaly_annual_agree_model_ensemble", + "snwdays_30yr_anomaly_annual_model_ec_earth_racmo22e", + "snwdays_30yr_anomaly_annual_model_ec_earth_rca4", + "snwdays_30yr_anomaly_annual_model_hadgem2_es_racmo22e", + "snwdays_30yr_anomaly_annual_model_mpi_esm_lr_remo2009", + ], + "snwdays_30yr_anomaly_annual_model_ec_earth_racmo22e": [ + "snwdays_30yr_anomaly_annual_agree_model_ensemble", + "snwdays_30yr_anomaly_annual_model_ec_earth_cclm4_8_17", + "snwdays_30yr_anomaly_annual_model_ec_earth_rca4", + "snwdays_30yr_anomaly_annual_model_hadgem2_es_racmo22e", + "snwdays_30yr_anomaly_annual_model_mpi_esm_lr_remo2009", + ], + "snwdays_30yr_anomaly_annual_model_ec_earth_rca4": [ + "snwdays_30yr_anomaly_annual_agree_model_ensemble", + "snwdays_30yr_anomaly_annual_model_ec_earth_cclm4_8_17", + "snwdays_30yr_anomaly_annual_model_ec_earth_racmo22e", + "snwdays_30yr_anomaly_annual_model_hadgem2_es_racmo22e", + "snwdays_30yr_anomaly_annual_model_mpi_esm_lr_remo2009", + ], + "snwdays_30yr_anomaly_annual_model_hadgem2_es_racmo22e": [ + "snwdays_30yr_anomaly_annual_agree_model_ensemble", + "snwdays_30yr_anomaly_annual_model_ec_earth_cclm4_8_17", + "snwdays_30yr_anomaly_annual_model_ec_earth_racmo22e", + "snwdays_30yr_anomaly_annual_model_ec_earth_rca4", + "snwdays_30yr_anomaly_annual_model_mpi_esm_lr_remo2009", + ], + "snwdays_30yr_anomaly_annual_model_mpi_esm_lr_remo2009": [ + "snwdays_30yr_anomaly_annual_agree_model_ensemble", + "snwdays_30yr_anomaly_annual_model_ec_earth_cclm4_8_17", + "snwdays_30yr_anomaly_annual_model_ec_earth_racmo22e", + "snwdays_30yr_anomaly_annual_model_ec_earth_rca4", + "snwdays_30yr_anomaly_annual_model_hadgem2_es_racmo22e", + ], + } + + +def get_uncertainty_map() -> dict[str, tuple[str, str]]: + return { + "snwdays_annual_absolute_model_ensemble": ( + "snwdays_annual_absolute_model_ensemble_upper_uncertainty", + "snwdays_annual_absolute_model_ensemble_lower_uncertainty", + ), + } diff --git a/arpav_ppcv/bootstrapper/coverage_configurations/su30.py b/arpav_ppcv/bootstrapper/coverage_configurations/su30.py index 7bd98fb8..2d334f89 100644 --- a/arpav_ppcv/bootstrapper/coverage_configurations/su30.py +++ b/arpav_ppcv/bootstrapper/coverage_configurations/su30.py @@ -23,7 +23,7 @@ ) -def generate_su30_configurations( +def generate_configurations( conf_param_values, variables ) -> list[CoverageConfigurationCreate]: return [ @@ -476,3 +476,101 @@ def generate_su30_configurations( ], ), ] + + +def get_related_map() -> dict[str, list[str]]: + return { + "su30_annual_absolute_model_ensemble": [ + "su30_annual_absolute_model_ec_earth_cclm4_8_17", + "su30_annual_absolute_model_ec_earth_racmo22e", + "su30_annual_absolute_model_ec_earth_rca4", + "su30_annual_absolute_model_hadgem2_es_racmo22e", + "su30_annual_absolute_model_mpi_esm_lr_remo2009", + ], + "su30_annual_absolute_model_ec_earth_cclm4_8_17": [ + "su30_annual_absolute_model_ensemble", + "su30_annual_absolute_model_ec_earth_racmo22e", + "su30_annual_absolute_model_ec_earth_rca4", + "su30_annual_absolute_model_hadgem2_es_racmo22e", + "su30_annual_absolute_model_mpi_esm_lr_remo2009", + ], + "su30_annual_absolute_model_ec_earth_racmo22e": [ + "su30_annual_absolute_model_ensemble", + "su30_annual_absolute_model_ec_earth_cclm4_8_17", + "su30_annual_absolute_model_ec_earth_rca4", + "su30_annual_absolute_model_hadgem2_es_racmo22e", + "su30_annual_absolute_model_mpi_esm_lr_remo2009", + ], + "su30_annual_absolute_model_ec_earth_rca4": [ + "su30_annual_absolute_model_ensemble", + "su30_annual_absolute_model_ec_earth_cclm4_8_17", + "su30_annual_absolute_model_ec_earth_racmo22e", + "su30_annual_absolute_model_hadgem2_es_racmo22e", + "su30_annual_absolute_model_mpi_esm_lr_remo2009", + ], + "su30_annual_absolute_model_hadgem2_es_racmo22e": [ + "su30_annual_absolute_model_ensemble", + "su30_annual_absolute_model_ec_earth_cclm4_8_17", + "su30_annual_absolute_model_ec_earth_racmo22e", + "su30_annual_absolute_model_ec_earth_rca4", + "su30_annual_absolute_model_mpi_esm_lr_remo2009", + ], + "su30_annual_absolute_model_mpi_esm_lr_remo2009": [ + "su30_annual_absolute_model_ensemble", + "su30_annual_absolute_model_ec_earth_cclm4_8_17", + "su30_annual_absolute_model_ec_earth_racmo22e", + "su30_annual_absolute_model_ec_earth_rca4", + "su30_annual_absolute_model_hadgem2_es_racmo22e", + ], + "su30_30yr_anomaly_annual_agree_model_ensemble": [ + "su30_30yr_anomaly_annual_model_ec_earth_cclm4_8_17", + "su30_30yr_anomaly_annual_model_ec_earth_racmo22e", + "su30_30yr_anomaly_annual_model_ec_earth_rca4", + "su30_30yr_anomaly_annual_model_hadgem2_es_racmo22e", + "su30_30yr_anomaly_annual_model_mpi_esm_lr_remo2009", + ], + "su30_30yr_anomaly_annual_model_ec_earth_cclm4_8_17": [ + "su30_30yr_anomaly_annual_agree_model_ensemble", + "su30_30yr_anomaly_annual_model_ec_earth_racmo22e", + "su30_30yr_anomaly_annual_model_ec_earth_rca4", + "su30_30yr_anomaly_annual_model_hadgem2_es_racmo22e", + "su30_30yr_anomaly_annual_model_mpi_esm_lr_remo2009", + ], + "su30_30yr_anomaly_annual_model_ec_earth_racmo22e": [ + "su30_30yr_anomaly_annual_agree_model_ensemble", + "su30_30yr_anomaly_annual_model_ec_earth_cclm4_8_17", + "su30_30yr_anomaly_annual_model_ec_earth_rca4", + "su30_30yr_anomaly_annual_model_hadgem2_es_racmo22e", + "su30_30yr_anomaly_annual_model_mpi_esm_lr_remo2009", + ], + "su30_30yr_anomaly_annual_model_ec_earth_rca4": [ + "su30_30yr_anomaly_annual_agree_model_ensemble", + "su30_30yr_anomaly_annual_model_ec_earth_cclm4_8_17", + "su30_30yr_anomaly_annual_model_ec_earth_racmo22e", + "su30_30yr_anomaly_annual_model_hadgem2_es_racmo22e", + "su30_30yr_anomaly_annual_model_mpi_esm_lr_remo2009", + ], + "su30_30yr_anomaly_annual_model_hadgem2_es_racmo22e": [ + "su30_30yr_anomaly_annual_agree_model_ensemble", + "su30_30yr_anomaly_annual_model_ec_earth_cclm4_8_17", + "su30_30yr_anomaly_annual_model_ec_earth_racmo22e", + "su30_30yr_anomaly_annual_model_ec_earth_rca4", + "su30_30yr_anomaly_annual_model_mpi_esm_lr_remo2009", + ], + "su30_30yr_anomaly_annual_model_mpi_esm_lr_remo2009": [ + "su30_30yr_anomaly_annual_agree_model_ensemble", + "su30_30yr_anomaly_annual_model_ec_earth_cclm4_8_17", + "su30_30yr_anomaly_annual_model_ec_earth_racmo22e", + "su30_30yr_anomaly_annual_model_ec_earth_rca4", + "su30_30yr_anomaly_annual_model_hadgem2_es_racmo22e", + ], + } + + +def get_uncertainty_map() -> dict[str, tuple[str, str]]: + return { + "su30_annual_absolute_model_ensemble": ( + "su30_annual_absolute_model_ensemble_upper_uncertainty", + "su30_annual_absolute_model_ensemble_lower_uncertainty", + ), + } diff --git a/arpav_ppcv/bootstrapper/coverage_configurations/tas.py b/arpav_ppcv/bootstrapper/coverage_configurations/tas.py index adb7608d..040222c9 100644 --- a/arpav_ppcv/bootstrapper/coverage_configurations/tas.py +++ b/arpav_ppcv/bootstrapper/coverage_configurations/tas.py @@ -46,7 +46,7 @@ ) -def generate_tas_configurations( +def generate_configurations( conf_param_values, variables ) -> list[CoverageConfigurationCreate]: return [ @@ -1379,3 +1379,193 @@ def generate_tas_configurations( ], ), ] + + +def get_related_map() -> dict[str, list[str]]: + return { + "tas_seasonal_anomaly_model_ensemble": [ + "tas_seasonal_anomaly_model_ec_earth_cclm4_8_17", + "tas_seasonal_anomaly_model_ec_earth_racmo22e", + "tas_seasonal_anomaly_model_ec_earth_rca4", + "tas_seasonal_anomaly_model_hadgem2_es_racmo22e", + "tas_seasonal_anomaly_model_mpi_esm_lr_remo2009", + ], + "tas_seasonal_anomaly_model_ec_earth_cclm4_8_17": [ + "tas_seasonal_anomaly_model_ensemble", + "tas_seasonal_anomaly_model_ec_earth_racmo22e", + "tas_seasonal_anomaly_model_ec_earth_rca4", + "tas_seasonal_anomaly_model_hadgem2_es_racmo22e", + "tas_seasonal_anomaly_model_mpi_esm_lr_remo2009", + ], + "tas_seasonal_anomaly_model_ec_earth_racmo22e": [ + "tas_seasonal_anomaly_model_ensemble", + "tas_seasonal_anomaly_model_ec_earth_cclm4_8_17", + "tas_seasonal_anomaly_model_ec_earth_rca4", + "tas_seasonal_anomaly_model_hadgem2_es_racmo22e", + "tas_seasonal_anomaly_model_mpi_esm_lr_remo2009", + ], + "tas_seasonal_anomaly_model_ec_earth_rca4": [ + "tas_seasonal_anomaly_model_ensemble", + "tas_seasonal_anomaly_model_ec_earth_cclm4_8_17", + "tas_seasonal_anomaly_model_ec_earth_racmo22e", + "tas_seasonal_anomaly_model_hadgem2_es_racmo22e", + "tas_seasonal_anomaly_model_mpi_esm_lr_remo2009", + ], + "tas_seasonal_anomaly_model_hadgem2_es_racmo22e": [ + "tas_seasonal_anomaly_model_ensemble", + "tas_seasonal_anomaly_model_ec_earth_cclm4_8_17", + "tas_seasonal_anomaly_model_ec_earth_racmo22e", + "tas_seasonal_anomaly_model_ec_earth_rca4", + "tas_seasonal_anomaly_model_mpi_esm_lr_remo2009", + ], + "tas_seasonal_anomaly_model_mpi_esm_lr_remo2009": [ + "tas_seasonal_anomaly_model_ensemble", + "tas_seasonal_anomaly_model_ec_earth_cclm4_8_17", + "tas_seasonal_anomaly_model_ec_earth_racmo22e", + "tas_seasonal_anomaly_model_ec_earth_rca4", + "tas_seasonal_anomaly_model_hadgem2_es_racmo22e", + ], + "tas_seasonal_absolute_model_ensemble": [ + "tas_seasonal_absolute_model_ec_earth_cclm4_8_17", + "tas_seasonal_absolute_model_ec_earth_racmo22e", + "tas_seasonal_absolute_model_ec_earth_rca4", + "tas_seasonal_absolute_model_hadgem2_es_racmo22e", + "tas_seasonal_absolute_model_mpi_esm_lr_remo2009", + ], + "tas_seasonal_absolute_model_ec_earth_cclm4_8_17": [ + "tas_seasonal_absolute_model_ensemble", + "tas_seasonal_absolute_model_ec_earth_racmo22e", + "tas_seasonal_absolute_model_ec_earth_rca4", + "tas_seasonal_absolute_model_hadgem2_es_racmo22e", + "tas_seasonal_absolute_model_mpi_esm_lr_remo2009", + ], + "tas_seasonal_absolute_model_ec_earth_racmo22e": [ + "tas_seasonal_absolute_model_ensemble", + "tas_seasonal_absolute_model_ec_earth_cclm4_8_17", + "tas_seasonal_absolute_model_ec_earth_rca4", + "tas_seasonal_absolute_model_hadgem2_es_racmo22e", + "tas_seasonal_absolute_model_mpi_esm_lr_remo2009", + ], + "tas_seasonal_absolute_model_ec_earth_rca4": [ + "tas_seasonal_absolute_model_ensemble", + "tas_seasonal_absolute_model_ec_earth_cclm4_8_17", + "tas_seasonal_absolute_model_ec_earth_racmo22e", + "tas_seasonal_absolute_model_hadgem2_es_racmo22e", + "tas_seasonal_absolute_model_mpi_esm_lr_remo2009", + ], + "tas_seasonal_absolute_model_hadgem2_es_racmo22e": [ + "tas_seasonal_absolute_model_ensemble", + "tas_seasonal_absolute_model_ec_earth_cclm4_8_17", + "tas_seasonal_absolute_model_ec_earth_racmo22e", + "tas_seasonal_absolute_model_ec_earth_rca4", + "tas_seasonal_absolute_model_mpi_esm_lr_remo2009", + ], + "tas_seasonal_absolute_model_mpi_esm_lr_remo2009": [ + "tas_seasonal_absolute_model_ensemble", + "tas_seasonal_absolute_model_ec_earth_cclm4_8_17", + "tas_seasonal_absolute_model_ec_earth_racmo22e", + "tas_seasonal_absolute_model_ec_earth_rca4", + "tas_seasonal_absolute_model_hadgem2_es_racmo22e", + ], + "tas_annual_absolute_model_ensemble": [ + "tas_annual_absolute_model_ec_earth_cclm4_8_17", + "tas_annual_absolute_model_ec_earth_racmo22e", + "tas_annual_absolute_model_ec_earth_rca4", + "tas_annual_absolute_model_hadgem2_es_racmo22e", + "tas_annual_absolute_model_mpi_esm_lr_remo2009", + ], + "tas_annual_absolute_model_ec_earth_cclm4_8_17": [ + "tas_annual_absolute_model_ensemble", + "tas_annual_absolute_model_ec_earth_racmo22e", + "tas_annual_absolute_model_ec_earth_rca4", + "tas_annual_absolute_model_hadgem2_es_racmo22e", + "tas_annual_absolute_model_mpi_esm_lr_remo2009", + ], + "tas_annual_absolute_model_ec_earth_racmo22e": [ + "tas_annual_absolute_model_ensemble", + "tas_annual_absolute_model_ec_earth_cclm4_8_17", + "tas_annual_absolute_model_ec_earth_rca4", + "tas_annual_absolute_model_hadgem2_es_racmo22e", + "tas_annual_absolute_model_mpi_esm_lr_remo2009", + ], + "tas_annual_absolute_model_ec_earth_rca4": [ + "tas_annual_absolute_model_ensemble", + "tas_annual_absolute_model_ec_earth_cclm4_8_17", + "tas_annual_absolute_model_ec_earth_racmo22e", + "tas_annual_absolute_model_hadgem2_es_racmo22e", + "tas_annual_absolute_model_mpi_esm_lr_remo2009", + ], + "tas_annual_absolute_model_hadgem2_es_racmo22e": [ + "tas_annual_absolute_model_ensemble", + "tas_annual_absolute_model_ec_earth_cclm4_8_17", + "tas_annual_absolute_model_ec_earth_racmo22e", + "tas_annual_absolute_model_ec_earth_rca4", + "tas_annual_absolute_model_mpi_esm_lr_remo2009", + ], + "tas_annual_absolute_model_mpi_esm_lr_remo2009": [ + "tas_annual_absolute_model_ensemble", + "tas_annual_absolute_model_ec_earth_cclm4_8_17", + "tas_annual_absolute_model_ec_earth_racmo22e", + "tas_annual_absolute_model_ec_earth_rca4", + "tas_annual_absolute_model_hadgem2_es_racmo22e", + ], + "tas_30yr_anomaly_seasonal_agree_model_ensemble": [ + "tas_30yr_anomaly_seasonal_model_ec_earth_cclm4_8_17", + "tas_30yr_anomaly_seasonal_model_ec_earth_racmo22e", + "tas_30yr_anomaly_seasonal_model_ec_earth_rca4", + "tas_30yr_anomaly_seasonal_model_hadgem2_es_racmo22e", + "tas_30yr_anomaly_seasonal_model_mpi_esm_lr_remo2009", + ], + "tas_30yr_anomaly_seasonal_model_ec_earth_cclm4_8_17": [ + "tas_30yr_anomaly_seasonal_agree_model_ensemble", + "tas_30yr_anomaly_seasonal_model_ec_earth_racmo22e", + "tas_30yr_anomaly_seasonal_model_ec_earth_rca4", + "tas_30yr_anomaly_seasonal_model_hadgem2_es_racmo22e", + "tas_30yr_anomaly_seasonal_model_mpi_esm_lr_remo2009", + ], + "tas_30yr_anomaly_seasonal_model_ec_earth_racmo22e": [ + "tas_30yr_anomaly_seasonal_agree_model_ensemble", + "tas_30yr_anomaly_seasonal_model_ec_earth_cclm4_8_17", + "tas_30yr_anomaly_seasonal_model_ec_earth_rca4", + "tas_30yr_anomaly_seasonal_model_hadgem2_es_racmo22e", + "tas_30yr_anomaly_seasonal_model_mpi_esm_lr_remo2009", + ], + "tas_30yr_anomaly_seasonal_model_ec_earth_rca4": [ + "tas_30yr_anomaly_seasonal_agree_model_ensemble", + "tas_30yr_anomaly_seasonal_model_ec_earth_cclm4_8_17", + "tas_30yr_anomaly_seasonal_model_ec_earth_racmo22e", + "tas_30yr_anomaly_seasonal_model_hadgem2_es_racmo22e", + "tas_30yr_anomaly_seasonal_model_mpi_esm_lr_remo2009", + ], + "tas_30yr_anomaly_seasonal_model_hadgem2_es_racmo22e": [ + "tas_30yr_anomaly_seasonal_agree_model_ensemble", + "tas_30yr_anomaly_seasonal_model_ec_earth_cclm4_8_17", + "tas_30yr_anomaly_seasonal_model_ec_earth_racmo22e", + "tas_30yr_anomaly_seasonal_model_ec_earth_rca4", + "tas_30yr_anomaly_seasonal_model_mpi_esm_lr_remo2009", + ], + "tas_30yr_anomaly_seasonal_model_mpi_esm_lr_remo2009": [ + "tas_30yr_anomaly_seasonal_agree_model_ensemble", + "tas_30yr_anomaly_seasonal_model_ec_earth_cclm4_8_17", + "tas_30yr_anomaly_seasonal_model_ec_earth_racmo22e", + "tas_30yr_anomaly_seasonal_model_ec_earth_rca4", + "tas_30yr_anomaly_seasonal_model_hadgem2_es_racmo22e", + ], + } + + +def get_uncertainty_map() -> dict[str, tuple[str, str]]: + return { + "tas_seasonal_anomaly_model_ensemble": ( + "tas_seasonal_anomaly_model_ensemble_lower_uncertainty", + "tas_seasonal_anomaly_model_ensemble_upper_uncertainty", + ), + "tas_seasonal_absolute_model_ensemble": ( + "tas_seasonal_absolute_model_ensemble_lower_uncertainty", + "tas_seasonal_absolute_model_ensemble_upper_uncertainty", + ), + "tas_annual_absolute_model_ensemble": ( + "tas_annual_absolute_model_ensemble_lower_uncertainty", + "tas_annual_absolute_model_ensemble_upper_uncertainty", + ), + } diff --git a/arpav_ppcv/bootstrapper/coverage_configurations/tasmax.py b/arpav_ppcv/bootstrapper/coverage_configurations/tasmax.py index 73b19e62..9f9256f4 100644 --- a/arpav_ppcv/bootstrapper/coverage_configurations/tasmax.py +++ b/arpav_ppcv/bootstrapper/coverage_configurations/tasmax.py @@ -34,7 +34,7 @@ ) -def generate_tasmax_configurations( +def generate_configurations( conf_param_values, variables ) -> list[CoverageConfigurationCreate]: return [ @@ -999,3 +999,147 @@ def generate_tasmax_configurations( ], ), ] + + +def get_related_map() -> dict[str, list[str]]: + return { + "tasmax_seasonal_absolute_model_ensemble": [ + "tasmax_seasonal_absolute_model_ec_earth_cclm4_8_17", + "tasmax_seasonal_absolute_model_ec_earth_racmo22e", + "tasmax_seasonal_absolute_model_ec_earth_rca4", + "tasmax_seasonal_absolute_model_hadgem2_es_racmo22e", + "tasmax_seasonal_absolute_model_mpi_esm_lr_remo2009", + ], + "tasmax_seasonal_absolute_model_ec_earth_cclm4_8_17": [ + "tasmax_seasonal_absolute_model_ensemble", + "tasmax_seasonal_absolute_model_ec_earth_racmo22e", + "tasmax_seasonal_absolute_model_ec_earth_rca4", + "tasmax_seasonal_absolute_model_hadgem2_es_racmo22e", + "tasmax_seasonal_absolute_model_mpi_esm_lr_remo2009", + ], + "tasmax_seasonal_absolute_model_ec_earth_racmo22e": [ + "tasmax_seasonal_absolute_model_ensemble", + "tasmax_seasonal_absolute_model_ec_earth_cclm4_8_17", + "tasmax_seasonal_absolute_model_ec_earth_rca4", + "tasmax_seasonal_absolute_model_hadgem2_es_racmo22e", + "tasmax_seasonal_absolute_model_mpi_esm_lr_remo2009", + ], + "tasmax_seasonal_absolute_model_ec_earth_rca4": [ + "tasmax_seasonal_absolute_model_ensemble", + "tasmax_seasonal_absolute_model_ec_earth_cclm4_8_17", + "tasmax_seasonal_absolute_model_ec_earth_racmo22e", + "tasmax_seasonal_absolute_model_hadgem2_es_racmo22e", + "tasmax_seasonal_absolute_model_mpi_esm_lr_remo2009", + ], + "tasmax_seasonal_absolute_model_hadgem2_es_racmo22e": [ + "tasmax_seasonal_absolute_model_ensemble", + "tasmax_seasonal_absolute_model_ec_earth_cclm4_8_17", + "tasmax_seasonal_absolute_model_ec_earth_racmo22e", + "tasmax_seasonal_absolute_model_ec_earth_rca4", + "tasmax_seasonal_absolute_model_mpi_esm_lr_remo2009", + ], + "tasmax_seasonal_absolute_model_mpi_esm_lr_remo2009": [ + "tasmax_seasonal_absolute_model_ensemble", + "tasmax_seasonal_absolute_model_ec_earth_cclm4_8_17", + "tasmax_seasonal_absolute_model_ec_earth_racmo22e", + "tasmax_seasonal_absolute_model_ec_earth_rca4", + "tasmax_seasonal_absolute_model_hadgem2_es_racmo22e", + ], + "tasmax_annual_absolute_model_ensemble": [ + "tasmax_annual_absolute_model_ec_earth_cclm4_8_17", + "tasmax_annual_absolute_model_ec_earth_racmo22e", + "tasmax_annual_absolute_model_ec_earth_rca4", + "tasmax_annual_absolute_model_hadgem2_es_racmo22e", + "tasmax_annual_absolute_model_mpi_esm_lr_remo2009", + ], + "tasmax_annual_absolute_model_ec_earth_cclm4_8_17": [ + "tasmax_annual_absolute_model_ensemble", + "tasmax_annual_absolute_model_ec_earth_racmo22e", + "tasmax_annual_absolute_model_ec_earth_rca4", + "tasmax_annual_absolute_model_hadgem2_es_racmo22e", + "tasmax_annual_absolute_model_mpi_esm_lr_remo2009", + ], + "tasmax_annual_absolute_model_ec_earth_racmo22e": [ + "tasmax_annual_absolute_model_ensemble", + "tasmax_annual_absolute_model_ec_earth_cclm4_8_17", + "tasmax_annual_absolute_model_ec_earth_rca4", + "tasmax_annual_absolute_model_hadgem2_es_racmo22e", + "tasmax_annual_absolute_model_mpi_esm_lr_remo2009", + ], + "tasmax_annual_absolute_model_ec_earth_rca4": [ + "tasmax_annual_absolute_model_ensemble", + "tasmax_annual_absolute_model_ec_earth_cclm4_8_17", + "tasmax_annual_absolute_model_ec_earth_racmo22e", + "tasmax_annual_absolute_model_hadgem2_es_racmo22e", + "tasmax_annual_absolute_model_mpi_esm_lr_remo2009", + ], + "tasmax_annual_absolute_model_hadgem2_es_racmo22e": [ + "tasmax_annual_absolute_model_ensemble", + "tasmax_annual_absolute_model_ec_earth_cclm4_8_17", + "tasmax_annual_absolute_model_ec_earth_racmo22e", + "tasmax_annual_absolute_model_ec_earth_rca4", + "tasmax_annual_absolute_model_mpi_esm_lr_remo2009", + ], + "tasmax_annual_absolute_model_mpi_esm_lr_remo2009": [ + "tasmax_annual_absolute_model_ensemble", + "tasmax_annual_absolute_model_ec_earth_cclm4_8_17", + "tasmax_annual_absolute_model_ec_earth_racmo22e", + "tasmax_annual_absolute_model_ec_earth_rca4", + "tasmax_annual_absolute_model_hadgem2_es_racmo22e", + ], + "tasmax_30yr_anomaly_seasonal_agree_model_ensemble": [ + "tasmax_30yr_anomaly_seasonal_model_ec_earth_cclm4_8_17", + "tasmax_30yr_anomaly_seasonal_model_ec_earth_racmo22e", + "tasmax_30yr_anomaly_seasonal_model_ec_earth_rca4", + "tasmax_30yr_anomaly_seasonal_model_hadgem2_es_racmo22e", + "tasmax_30yr_anomaly_seasonal_model_mpi_esm_lr_remo2009", + ], + "tasmax_30yr_anomaly_seasonal_model_ec_earth_cclm4_8_17": [ + "tasmax_30yr_anomaly_seasonal_agree_model_ensemble", + "tasmax_30yr_anomaly_seasonal_model_ec_earth_racmo22e", + "tasmax_30yr_anomaly_seasonal_model_ec_earth_rca4", + "tasmax_30yr_anomaly_seasonal_model_hadgem2_es_racmo22e", + "tasmax_30yr_anomaly_seasonal_model_mpi_esm_lr_remo2009", + ], + "tasmax_30yr_anomaly_seasonal_model_ec_earth_racmo22e": [ + "tasmax_30yr_anomaly_seasonal_agree_model_ensemble", + "tasmax_30yr_anomaly_seasonal_model_ec_earth_cclm4_8_17", + "tasmax_30yr_anomaly_seasonal_model_ec_earth_rca4", + "tasmax_30yr_anomaly_seasonal_model_hadgem2_es_racmo22e", + "tasmax_30yr_anomaly_seasonal_model_mpi_esm_lr_remo2009", + ], + "tasmax_30yr_anomaly_seasonal_model_ec_earth_rca4": [ + "tasmax_30yr_anomaly_seasonal_agree_model_ensemble", + "tasmax_30yr_anomaly_seasonal_model_ec_earth_cclm4_8_17", + "tasmax_30yr_anomaly_seasonal_model_ec_earth_racmo22e", + "tasmax_30yr_anomaly_seasonal_model_hadgem2_es_racmo22e", + "tasmax_30yr_anomaly_seasonal_model_mpi_esm_lr_remo2009", + ], + "tasmax_30yr_anomaly_seasonal_model_hadgem2_es_racmo22e": [ + "tasmax_30yr_anomaly_seasonal_agree_model_ensemble", + "tasmax_30yr_anomaly_seasonal_model_ec_earth_cclm4_8_17", + "tasmax_30yr_anomaly_seasonal_model_ec_earth_racmo22e", + "tasmax_30yr_anomaly_seasonal_model_ec_earth_rca4", + "tasmax_30yr_anomaly_seasonal_model_mpi_esm_lr_remo2009", + ], + "tasmax_30yr_anomaly_seasonal_model_mpi_esm_lr_remo2009": [ + "tasmax_30yr_anomaly_seasonal_agree_model_ensemble", + "tasmax_30yr_anomaly_seasonal_model_ec_earth_cclm4_8_17", + "tasmax_30yr_anomaly_seasonal_model_ec_earth_racmo22e", + "tasmax_30yr_anomaly_seasonal_model_ec_earth_rca4", + "tasmax_30yr_anomaly_seasonal_model_hadgem2_es_racmo22e", + ], + } + + +def get_uncertainty_map() -> dict[str, tuple[str, str]]: + return { + "tasmax_seasonal_absolute_model_ensemble": ( + "tasmax_seasonal_absolute_model_ensemble_upper_uncertainty", + "tasmax_seasonal_absolute_model_ensemble_lower_uncertainty", + ), + "tasmax_annual_absolute_model_ensemble": ( + "tasmax_annual_absolute_model_ensemble_upper_uncertainty", + "tasmax_annual_absolute_model_ensemble_lower_uncertainty", + ), + } diff --git a/arpav_ppcv/bootstrapper/coverage_configurations/tasmin.py b/arpav_ppcv/bootstrapper/coverage_configurations/tasmin.py index 53e96b8b..14de7abf 100644 --- a/arpav_ppcv/bootstrapper/coverage_configurations/tasmin.py +++ b/arpav_ppcv/bootstrapper/coverage_configurations/tasmin.py @@ -34,7 +34,7 @@ ) -def generate_tasmin_configurations( +def generate_configurations( conf_param_values, variables ) -> list[CoverageConfigurationCreate]: return [ @@ -999,3 +999,147 @@ def generate_tasmin_configurations( ], ), ] + + +def get_related_map() -> dict[str, list[str]]: + return { + "tasmin_seasonal_absolute_model_ensemble": [ + "tasmin_seasonal_absolute_model_ec_earth_cclm4_8_17", + "tasmin_seasonal_absolute_model_ec_earth_racmo22e", + "tasmin_seasonal_absolute_model_ec_earth_rca4", + "tasmin_seasonal_absolute_model_hadgem2_es_racmo22e", + "tasmin_seasonal_absolute_model_mpi_esm_lr_remo2009", + ], + "tasmin_seasonal_absolute_model_ec_earth_cclm4_8_17": [ + "tasmin_seasonal_absolute_model_ensemble", + "tasmin_seasonal_absolute_model_ec_earth_racmo22e", + "tasmin_seasonal_absolute_model_ec_earth_rca4", + "tasmin_seasonal_absolute_model_hadgem2_es_racmo22e", + "tasmin_seasonal_absolute_model_mpi_esm_lr_remo2009", + ], + "tasmin_seasonal_absolute_model_ec_earth_racmo22e": [ + "tasmin_seasonal_absolute_model_ensemble", + "tasmin_seasonal_absolute_model_ec_earth_cclm4_8_17", + "tasmin_seasonal_absolute_model_ec_earth_rca4", + "tasmin_seasonal_absolute_model_hadgem2_es_racmo22e", + "tasmin_seasonal_absolute_model_mpi_esm_lr_remo2009", + ], + "tasmin_seasonal_absolute_model_ec_earth_rca4": [ + "tasmin_seasonal_absolute_model_ensemble", + "tasmin_seasonal_absolute_model_ec_earth_cclm4_8_17", + "tasmin_seasonal_absolute_model_ec_earth_racmo22e", + "tasmin_seasonal_absolute_model_hadgem2_es_racmo22e", + "tasmin_seasonal_absolute_model_mpi_esm_lr_remo2009", + ], + "tasmin_seasonal_absolute_model_hadgem2_es_racmo22e": [ + "tasmin_seasonal_absolute_model_ensemble", + "tasmin_seasonal_absolute_model_ec_earth_cclm4_8_17", + "tasmin_seasonal_absolute_model_ec_earth_racmo22e", + "tasmin_seasonal_absolute_model_ec_earth_rca4", + "tasmin_seasonal_absolute_model_mpi_esm_lr_remo2009", + ], + "tasmin_seasonal_absolute_model_mpi_esm_lr_remo2009": [ + "tasmin_seasonal_absolute_model_ensemble", + "tasmin_seasonal_absolute_model_ec_earth_cclm4_8_17", + "tasmin_seasonal_absolute_model_ec_earth_racmo22e", + "tasmin_seasonal_absolute_model_ec_earth_rca4", + "tasmin_seasonal_absolute_model_hadgem2_es_racmo22e", + ], + "tasmin_annual_absolute_model_ensemble": [ + "tasmin_annual_absolute_model_ec_earth_cclm4_8_17", + "tasmin_annual_absolute_model_ec_earth_racmo22e", + "tasmin_annual_absolute_model_ec_earth_rca4", + "tasmin_annual_absolute_model_hadgem2_es_racmo22e", + "tasmin_annual_absolute_model_mpi_esm_lr_remo2009", + ], + "tasmin_annual_absolute_model_ec_earth_cclm4_8_17": [ + "tasmin_annual_absolute_model_ensemble", + "tasmin_annual_absolute_model_ec_earth_racmo22e", + "tasmin_annual_absolute_model_ec_earth_rca4", + "tasmin_annual_absolute_model_hadgem2_es_racmo22e", + "tasmin_annual_absolute_model_mpi_esm_lr_remo2009", + ], + "tasmin_annual_absolute_model_ec_earth_racmo22e": [ + "tasmin_annual_absolute_model_ensemble", + "tasmin_annual_absolute_model_ec_earth_cclm4_8_17", + "tasmin_annual_absolute_model_ec_earth_rca4", + "tasmin_annual_absolute_model_hadgem2_es_racmo22e", + "tasmin_annual_absolute_model_mpi_esm_lr_remo2009", + ], + "tasmin_annual_absolute_model_ec_earth_rca4": [ + "tasmin_annual_absolute_model_ensemble", + "tasmin_annual_absolute_model_ec_earth_cclm4_8_17", + "tasmin_annual_absolute_model_ec_earth_racmo22e", + "tasmin_annual_absolute_model_hadgem2_es_racmo22e", + "tasmin_annual_absolute_model_mpi_esm_lr_remo2009", + ], + "tasmin_annual_absolute_model_hadgem2_es_racmo22e": [ + "tasmin_annual_absolute_model_ensemble", + "tasmin_annual_absolute_model_ec_earth_cclm4_8_17", + "tasmin_annual_absolute_model_ec_earth_racmo22e", + "tasmin_annual_absolute_model_ec_earth_rca4", + "tasmin_annual_absolute_model_mpi_esm_lr_remo2009", + ], + "tasmin_annual_absolute_model_mpi_esm_lr_remo2009": [ + "tasmin_annual_absolute_model_ensemble", + "tasmin_annual_absolute_model_ec_earth_cclm4_8_17", + "tasmin_annual_absolute_model_ec_earth_racmo22e", + "tasmin_annual_absolute_model_ec_earth_rca4", + "tasmin_annual_absolute_model_hadgem2_es_racmo22e", + ], + "tasmin_30yr_anomaly_seasonal_agree_model_ensemble": [ + "tasmin_30yr_anomaly_seasonal_model_ec_earth_cclm4_8_17", + "tasmin_30yr_anomaly_seasonal_model_ec_earth_racmo22e", + "tasmin_30yr_anomaly_seasonal_model_ec_earth_rca4", + "tasmin_30yr_anomaly_seasonal_model_hadgem2_es_racmo22e", + "tasmin_30yr_anomaly_seasonal_model_mpi_esm_lr_remo2009", + ], + "tasmin_30yr_anomaly_seasonal_model_ec_earth_cclm4_8_17": [ + "tasmin_30yr_anomaly_seasonal_agree_model_ensemble", + "tasmin_30yr_anomaly_seasonal_model_ec_earth_racmo22e", + "tasmin_30yr_anomaly_seasonal_model_ec_earth_rca4", + "tasmin_30yr_anomaly_seasonal_model_hadgem2_es_racmo22e", + "tasmin_30yr_anomaly_seasonal_model_mpi_esm_lr_remo2009", + ], + "tasmin_30yr_anomaly_seasonal_model_ec_earth_racmo22e": [ + "tasmin_30yr_anomaly_seasonal_agree_model_ensemble", + "tasmin_30yr_anomaly_seasonal_model_ec_earth_cclm4_8_17", + "tasmin_30yr_anomaly_seasonal_model_ec_earth_rca4", + "tasmin_30yr_anomaly_seasonal_model_hadgem2_es_racmo22e", + "tasmin_30yr_anomaly_seasonal_model_mpi_esm_lr_remo2009", + ], + "tasmin_30yr_anomaly_seasonal_model_ec_earth_rca4": [ + "tasmin_30yr_anomaly_seasonal_agree_model_ensemble", + "tasmin_30yr_anomaly_seasonal_model_ec_earth_cclm4_8_17", + "tasmin_30yr_anomaly_seasonal_model_ec_earth_racmo22e", + "tasmin_30yr_anomaly_seasonal_model_hadgem2_es_racmo22e", + "tasmin_30yr_anomaly_seasonal_model_mpi_esm_lr_remo2009", + ], + "tasmin_30yr_anomaly_seasonal_model_hadgem2_es_racmo22e": [ + "tasmin_30yr_anomaly_seasonal_agree_model_ensemble", + "tasmin_30yr_anomaly_seasonal_model_ec_earth_cclm4_8_17", + "tasmin_30yr_anomaly_seasonal_model_ec_earth_racmo22e", + "tasmin_30yr_anomaly_seasonal_model_ec_earth_rca4", + "tasmin_30yr_anomaly_seasonal_model_mpi_esm_lr_remo2009", + ], + "tasmin_30yr_anomaly_seasonal_model_mpi_esm_lr_remo2009": [ + "tasmin_30yr_anomaly_seasonal_agree_model_ensemble", + "tasmin_30yr_anomaly_seasonal_model_ec_earth_cclm4_8_17", + "tasmin_30yr_anomaly_seasonal_model_ec_earth_racmo22e", + "tasmin_30yr_anomaly_seasonal_model_ec_earth_rca4", + "tasmin_30yr_anomaly_seasonal_model_hadgem2_es_racmo22e", + ], + } + + +def get_uncertainty_map() -> dict[str, tuple[str, str]]: + return { + "tasmin_seasonal_absolute_model_ensemble": ( + "tasmin_seasonal_absolute_model_ensemble_upper_uncertainty", + "tasmin_seasonal_absolute_model_ensemble_lower_uncertainty", + ), + "tasmin_annual_absolute_model_ensemble": ( + "tasmin_annual_absolute_model_ensemble_upper_uncertainty", + "tasmin_annual_absolute_model_ensemble_lower_uncertainty", + ), + } diff --git a/arpav_ppcv/bootstrapper/coverage_configurations/tr.py b/arpav_ppcv/bootstrapper/coverage_configurations/tr.py index e3caff4e..3967fe12 100644 --- a/arpav_ppcv/bootstrapper/coverage_configurations/tr.py +++ b/arpav_ppcv/bootstrapper/coverage_configurations/tr.py @@ -23,7 +23,7 @@ ) -def generate_tr_configurations( +def generate_configurations( conf_param_values, variables ) -> list[CoverageConfigurationCreate]: return [ @@ -476,3 +476,101 @@ def generate_tr_configurations( ], ), ] + + +def get_related_map() -> dict[str, list[str]]: + return { + "tr_annual_absolute_model_ensemble": [ + "tr_annual_absolute_model_ec_earth_cclm4_8_17", + "tr_annual_absolute_model_ec_earth_racmo22e", + "tr_annual_absolute_model_ec_earth_rca4", + "tr_annual_absolute_model_hadgem2_es_racmo22e", + "tr_annual_absolute_model_mpi_esm_lr_remo2009", + ], + "tr_annual_absolute_model_ec_earth_cclm4_8_17": [ + "tr_annual_absolute_model_ensemble", + "tr_annual_absolute_model_ec_earth_racmo22e", + "tr_annual_absolute_model_ec_earth_rca4", + "tr_annual_absolute_model_hadgem2_es_racmo22e", + "tr_annual_absolute_model_mpi_esm_lr_remo2009", + ], + "tr_annual_absolute_model_ec_earth_racmo22e": [ + "tr_annual_absolute_model_ensemble", + "tr_annual_absolute_model_ec_earth_cclm4_8_17", + "tr_annual_absolute_model_ec_earth_rca4", + "tr_annual_absolute_model_hadgem2_es_racmo22e", + "tr_annual_absolute_model_mpi_esm_lr_remo2009", + ], + "tr_annual_absolute_model_ec_earth_rca4": [ + "tr_annual_absolute_model_ensemble", + "tr_annual_absolute_model_ec_earth_cclm4_8_17", + "tr_annual_absolute_model_ec_earth_racmo22e", + "tr_annual_absolute_model_hadgem2_es_racmo22e", + "tr_annual_absolute_model_mpi_esm_lr_remo2009", + ], + "tr_annual_absolute_model_hadgem2_es_racmo22e": [ + "tr_annual_absolute_model_ensemble", + "tr_annual_absolute_model_ec_earth_cclm4_8_17", + "tr_annual_absolute_model_ec_earth_racmo22e", + "tr_annual_absolute_model_ec_earth_rca4", + "tr_annual_absolute_model_mpi_esm_lr_remo2009", + ], + "tr_annual_absolute_model_mpi_esm_lr_remo2009": [ + "tr_annual_absolute_model_ensemble", + "tr_annual_absolute_model_ec_earth_cclm4_8_17", + "tr_annual_absolute_model_ec_earth_racmo22e", + "tr_annual_absolute_model_ec_earth_rca4", + "tr_annual_absolute_model_hadgem2_es_racmo22e", + ], + "tr_30yr_anomaly_annual_agree_model_ensemble": [ + "tr_30yr_anomaly_annual_model_ec_earth_cclm4_8_17", + "tr_30yr_anomaly_annual_model_ec_earth_racmo22e", + "tr_30yr_anomaly_annual_model_ec_earth_rca4", + "tr_30yr_anomaly_annual_model_hadgem2_es_racmo22e", + "tr_30yr_anomaly_annual_model_mpi_esm_lr_remo2009", + ], + "tr_30yr_anomaly_annual_model_ec_earth_cclm4_8_17": [ + "tr_30yr_anomaly_annual_agree_model_ensemble", + "tr_30yr_anomaly_annual_model_ec_earth_racmo22e", + "tr_30yr_anomaly_annual_model_ec_earth_rca4", + "tr_30yr_anomaly_annual_model_hadgem2_es_racmo22e", + "tr_30yr_anomaly_annual_model_mpi_esm_lr_remo2009", + ], + "tr_30yr_anomaly_annual_model_ec_earth_racmo22e": [ + "tr_30yr_anomaly_annual_agree_model_ensemble", + "tr_30yr_anomaly_annual_model_ec_earth_cclm4_8_17", + "tr_30yr_anomaly_annual_model_ec_earth_rca4", + "tr_30yr_anomaly_annual_model_hadgem2_es_racmo22e", + "tr_30yr_anomaly_annual_model_mpi_esm_lr_remo2009", + ], + "tr_30yr_anomaly_annual_model_ec_earth_rca4": [ + "tr_30yr_anomaly_annual_agree_model_ensemble", + "tr_30yr_anomaly_annual_model_ec_earth_cclm4_8_17", + "tr_30yr_anomaly_annual_model_ec_earth_racmo22e", + "tr_30yr_anomaly_annual_model_hadgem2_es_racmo22e", + "tr_30yr_anomaly_annual_model_mpi_esm_lr_remo2009", + ], + "tr_30yr_anomaly_annual_model_hadgem2_es_racmo22e": [ + "tr_30yr_anomaly_annual_agree_model_ensemble", + "tr_30yr_anomaly_annual_model_ec_earth_cclm4_8_17", + "tr_30yr_anomaly_annual_model_ec_earth_racmo22e", + "tr_30yr_anomaly_annual_model_ec_earth_rca4", + "tr_30yr_anomaly_annual_model_mpi_esm_lr_remo2009", + ], + "tr_30yr_anomaly_annual_model_mpi_esm_lr_remo2009": [ + "tr_30yr_anomaly_annual_agree_model_ensemble", + "tr_30yr_anomaly_annual_model_ec_earth_cclm4_8_17", + "tr_30yr_anomaly_annual_model_ec_earth_racmo22e", + "tr_30yr_anomaly_annual_model_ec_earth_rca4", + "tr_30yr_anomaly_annual_model_hadgem2_es_racmo22e", + ], + } + + +def get_uncertainty_map() -> dict[str, tuple[str, str]]: + return { + "tr_annual_absolute_model_ensemble": ( + "tr_annual_absolute_model_ensemble_upper_uncertainty", + "tr_annual_absolute_model_ensemble_lower_uncertainty", + ) + }