From 088c93320e880d702d1f655760992786de6bd3fd Mon Sep 17 00:00:00 2001 From: Ricardo Garcia Silva Date: Thu, 14 Nov 2024 17:58:56 +0000 Subject: [PATCH] Replacing variable with climatic_indicator (wip) --- arpav_ppcv/bootstrapper/cliapp.py | 107 +-- .../coverage_configurations/forecast/cdd.py | 161 ---- .../coverage_configurations/forecast/cdds.py | 352 -------- .../coverage_configurations/forecast/fd.py | 386 +------- .../coverage_configurations/forecast/hdds.py | 359 +------- .../coverage_configurations/forecast/hwdi.py | 162 ---- .../coverage_configurations/forecast/pr.py | 780 +---------------- .../forecast/r95ptot.py | 155 ---- .../forecast/snwdays.py | 362 -------- .../coverage_configurations/forecast/su30.py | 386 +------- .../coverage_configurations/forecast/tas.py | 822 +----------------- .../forecast/tasmax.py | 588 +------------ .../forecast/tasmin.py | 588 +------------ .../coverage_configurations/forecast/tr.py | 386 +------- .../historical/cdds.py | 64 -- .../coverage_configurations/historical/fd.py | 72 +- .../historical/hdds.py | 64 -- .../historical/prcptot.py | 129 +-- .../historical/su30.py | 72 +- .../coverage_configurations/historical/tdd.py | 149 +--- .../coverage_configurations/historical/tnd.py | 129 +-- .../coverage_configurations/historical/tr.py | 69 +- .../coverage_configurations/historical/txd.py | 129 +-- arpav_ppcv/database.py | 14 - ...added_relationship_between_measurement_.py | 41 + arpav_ppcv/schemas/climaticindicators.py | 42 + arpav_ppcv/schemas/coverages.py | 44 - arpav_ppcv/schemas/observations.py | 6 +- arpav_ppcv/webapp/api_v2/routers/coverages.py | 6 +- 29 files changed, 134 insertions(+), 6490 deletions(-) create mode 100644 arpav_ppcv/migrations/versions/7b7412888496_added_relationship_between_measurement_.py diff --git a/arpav_ppcv/bootstrapper/cliapp.py b/arpav_ppcv/bootstrapper/cliapp.py index 762707f3..2e9e93df 100644 --- a/arpav_ppcv/bootstrapper/cliapp.py +++ b/arpav_ppcv/bootstrapper/cliapp.py @@ -61,7 +61,6 @@ tr as tr_climatic_indicators, ) -# from .variables import generate_variable_configurations from .configurationparameters import generate_configuration_parameters app = typer.Typer() @@ -69,11 +68,19 @@ @app.command("municipalities") def bootstrap_municipalities( - ctx: typer.Context, municipalities_dataset: Path, force: bool = False + ctx: typer.Context, + municipalities_dataset: Annotated[ + Path, + typer.Argument( + help=( + "Path to the municipalities geoJSON dataset. Example: " + "/home/appuser/app/data/municipalities-istat-2021.geojson" + ) + ), + ], + force: bool = False, ) -> None: """Bootstrap Italian municipalities""" - # data_directory = Path(__file__).parents[2] / "data" - # municipalities_dataset = data_directory / "limits_IT_municipalities.geojson" to_create = [] should_bootstrap = False @@ -178,26 +185,6 @@ def bootstrap_station_variables( print("Done!") -# @app.command("observation-variables") -# def bootstrap_observation_variables( -# ctx: typer.Context, -# ): -# """Create initial observation variables.""" -# variables = generate_variable_configurations() -# with sqlmodel.Session(ctx.obj["engine"]) as session: -# for var_create in variables: -# try: -# db_variable = database.create_variable(session, var_create) -# print(f"Created observation variable {db_variable.name!r}") -# except IntegrityError as err: -# print( -# f"Could not create observation " -# f"variable {var_create.name!r}: {err}" -# ) -# session.rollback() -# print("Done!") - - @app.command("climatic-indicators") def bootstrap_climatic_indicators( ctx: typer.Context, name_filter: Optional[str] = None @@ -291,11 +278,9 @@ def bootstrap_coverage_configurations( ): """Create initial coverage configurations.""" with sqlmodel.Session(ctx.obj["engine"]) as session: - all_vars = database.collect_all_variables(session) all_conf_param_values = database.collect_all_configuration_parameter_values( session ) - variables = {v.name: v for v in all_vars} conf_param_values = { (pv.configuration_parameter.name, pv.name): pv for pv in all_conf_param_values @@ -307,27 +292,19 @@ def bootstrap_coverage_configurations( cdd_forecast.generate_configurations(conf_param_values, clim_indicator_ids) ) coverage_configurations.extend( - cdds_forecast.generate_configurations( - conf_param_values, variables, clim_indicator_ids - ) + cdds_forecast.generate_configurations(conf_param_values, clim_indicator_ids) ) coverage_configurations.extend( - fd_forecast.generate_configurations( - conf_param_values, variables, clim_indicator_ids - ) + fd_forecast.generate_configurations(conf_param_values, clim_indicator_ids) ) coverage_configurations.extend( - hdds_forecast.generate_configurations( - conf_param_values, variables, clim_indicator_ids - ) + hdds_forecast.generate_configurations(conf_param_values, clim_indicator_ids) ) coverage_configurations.extend( hwdi_forecast.generate_configurations(conf_param_values, clim_indicator_ids) ) coverage_configurations.extend( - pr_forecast.generate_configurations( - conf_param_values, variables, clim_indicator_ids - ) + pr_forecast.generate_configurations(conf_param_values, clim_indicator_ids) ) coverage_configurations.extend( r95ptot_forecast.generate_configurations(conf_param_values, clim_indicator_ids) @@ -336,74 +313,48 @@ def bootstrap_coverage_configurations( snwdays_forecast.generate_configurations(conf_param_values, clim_indicator_ids) ) coverage_configurations.extend( - su30_forecast.generate_configurations( - conf_param_values, variables, clim_indicator_ids - ) + su30_forecast.generate_configurations(conf_param_values, clim_indicator_ids) ) coverage_configurations.extend( - tas_forecast.generate_configurations( - conf_param_values, variables, clim_indicator_ids - ) + tas_forecast.generate_configurations(conf_param_values, clim_indicator_ids) ) coverage_configurations.extend( - tasmax_forecast.generate_configurations( - conf_param_values, variables, clim_indicator_ids - ) + tasmax_forecast.generate_configurations(conf_param_values, clim_indicator_ids) ) coverage_configurations.extend( - tasmin_forecast.generate_configurations( - conf_param_values, variables, clim_indicator_ids - ) + tasmin_forecast.generate_configurations(conf_param_values, clim_indicator_ids) ) coverage_configurations.extend( - tr_forecast.generate_configurations( - conf_param_values, variables, clim_indicator_ids - ) + tr_forecast.generate_configurations(conf_param_values, clim_indicator_ids) ) coverage_configurations.extend( - cdds_historical.generate_configurations( - conf_param_values, variables, clim_indicator_ids - ) + cdds_historical.generate_configurations(conf_param_values, clim_indicator_ids) ) coverage_configurations.extend( - fd_historical.generate_configurations( - conf_param_values, variables, clim_indicator_ids - ) + fd_historical.generate_configurations(conf_param_values, clim_indicator_ids) ) coverage_configurations.extend( - hdds_historical.generate_configurations( - conf_param_values, variables, clim_indicator_ids - ) + hdds_historical.generate_configurations(conf_param_values, clim_indicator_ids) ) coverage_configurations.extend( prcptot_historical.generate_configurations( - conf_param_values, variables, clim_indicator_ids + conf_param_values, clim_indicator_ids ) ) coverage_configurations.extend( - su30_historical.generate_configurations( - conf_param_values, variables, clim_indicator_ids - ) + su30_historical.generate_configurations(conf_param_values, clim_indicator_ids) ) coverage_configurations.extend( - tdd_historical.generate_configurations( - conf_param_values, variables, clim_indicator_ids - ) + tdd_historical.generate_configurations(conf_param_values, clim_indicator_ids) ) coverage_configurations.extend( - tnd_historical.generate_configurations( - conf_param_values, variables, clim_indicator_ids - ) + tnd_historical.generate_configurations(conf_param_values, clim_indicator_ids) ) coverage_configurations.extend( - tr_historical.generate_configurations( - conf_param_values, variables, clim_indicator_ids - ) + tr_historical.generate_configurations(conf_param_values, clim_indicator_ids) ) coverage_configurations.extend( - txd_historical.generate_configurations( - conf_param_values, variables, clim_indicator_ids - ) + txd_historical.generate_configurations(conf_param_values, clim_indicator_ids) ) for cov_conf_create in coverage_configurations: diff --git a/arpav_ppcv/bootstrapper/coverage_configurations/forecast/cdd.py b/arpav_ppcv/bootstrapper/coverage_configurations/forecast/cdd.py index 3e839d53..e07459d3 100644 --- a/arpav_ppcv/bootstrapper/coverage_configurations/forecast/cdd.py +++ b/arpav_ppcv/bootstrapper/coverage_configurations/forecast/cdd.py @@ -4,17 +4,6 @@ ) from ....schemas.base import CoreConfParamName -# _DISPLAY_NAME_ENGLISH = "Consecutive dry days" -# _DISPLAY_NAME_ITALIAN = "Giorni secchi" -# _DESCRIPTION_ENGLISH = ( -# "Maximum number of consecutive dry days (daily precipitation less than 1 mm)" -# ) -# _DESCRIPTION_ITALIAN = ( -# "Numero massimo di giorni consecutivi asciutti (precipitazione giornaliera " -# "inferiore a 1 mm)" -# ) -# _DATA_PRECISION = 0 - def generate_configurations( conf_param_values, @@ -23,20 +12,10 @@ def generate_configurations( return [ CoverageConfigurationCreate( name="cdd_30yr_anomaly_seasonal_agree_model_ensemble", - # display_name_english=_DISPLAY_NAME_ENGLISH, - # display_name_italian=_DISPLAY_NAME_ITALIAN, - # description_english=_DESCRIPTION_ENGLISH, - # description_italian=_DESCRIPTION_ITALIAN, netcdf_main_dataset_name="cdd", wms_main_layer_name="consecutive_dry_days_index_per_time_period-uncertainty_group", wms_secondary_layer_name="consecutive_dry_days_index_per_time_period", thredds_url_pattern="ensembletwbc/std/clipped/eca_cdd_an_avgagree_{time_window}_{scenario}_{year_period}_ls_VFVGTAA.nc", - # unit_english="days", - # unit_italian="gg", - # palette="uncert-stippled/div-BrBG-inv", - # color_scale_min=-40, - # color_scale_max=40, - # data_precision=_DATA_PRECISION, climatic_indicator_id=climatic_indicators["cdd-anomaly-thirty_year"], possible_values=[ ConfigurationParameterPossibleValueCreate( @@ -44,21 +23,6 @@ def generate_configurations( (CoreConfParamName.ARCHIVE.value, "forecast") ].id ), - # ConfigurationParameterPossibleValueCreate( - # configuration_parameter_value_id=conf_param_values[ - # (CoreConfParamName.CLIMATOLOGICAL_VARIABLE.value, "cdd") - # ].id - # ), - # ConfigurationParameterPossibleValueCreate( - # configuration_parameter_value_id=conf_param_values[ - # (CoreConfParamName.AGGREGATION_PERIOD.value, "30yr") - # ].id - # ), - # ConfigurationParameterPossibleValueCreate( - # configuration_parameter_value_id=conf_param_values[ - # (CoreConfParamName.MEASURE.value, "anomaly") - # ].id - # ), ConfigurationParameterPossibleValueCreate( configuration_parameter_value_id=conf_param_values[ (CoreConfParamName.CLIMATOLOGICAL_MODEL.value, "model_ensemble") @@ -113,19 +77,9 @@ def generate_configurations( ), CoverageConfigurationCreate( name="cdd_30yr_anomaly_seasonal_model_ec_earth_cclm4_8_17", - # display_name_english=_DISPLAY_NAME_ENGLISH, - # display_name_italian=_DISPLAY_NAME_ITALIAN, - # description_english=_DESCRIPTION_ENGLISH, - # description_italian=_DESCRIPTION_ITALIAN, netcdf_main_dataset_name="cdd", wms_main_layer_name="consecutive_dry_days_index_per_time_period", thredds_url_pattern="indici5rcm/clipped/eca_cdd_an_EC-EARTH_CCLM4-8-17_{scenario}_{year_period}_{time_window}_ls_VFVGTAA.nc", - # unit_english="days", - # unit_italian="gg", - # palette="default/div-BrBG-inv", - # color_scale_min=-40, - # color_scale_max=40, - # data_precision=_DATA_PRECISION, climatic_indicator_id=climatic_indicators["cdd-anomaly-thirty_year"], possible_values=[ ConfigurationParameterPossibleValueCreate( @@ -133,21 +87,6 @@ def generate_configurations( (CoreConfParamName.ARCHIVE.value, "forecast") ].id ), - # ConfigurationParameterPossibleValueCreate( - # configuration_parameter_value_id=conf_param_values[ - # (CoreConfParamName.CLIMATOLOGICAL_VARIABLE.value, "cdd") - # ].id - # ), - # ConfigurationParameterPossibleValueCreate( - # configuration_parameter_value_id=conf_param_values[ - # (CoreConfParamName.AGGREGATION_PERIOD.value, "30yr") - # ].id - # ), - # ConfigurationParameterPossibleValueCreate( - # configuration_parameter_value_id=conf_param_values[ - # (CoreConfParamName.MEASURE.value, "anomaly") - # ].id - # ), ConfigurationParameterPossibleValueCreate( configuration_parameter_value_id=conf_param_values[ ( @@ -205,19 +144,9 @@ def generate_configurations( ), CoverageConfigurationCreate( name="cdd_30yr_anomaly_seasonal_model_ec_earth_racmo22e", - # display_name_english=_DISPLAY_NAME_ENGLISH, - # display_name_italian=_DISPLAY_NAME_ITALIAN, - # description_english=_DESCRIPTION_ENGLISH, - # description_italian=_DESCRIPTION_ITALIAN, netcdf_main_dataset_name="cdd", wms_main_layer_name="consecutive_dry_days_index_per_time_period", thredds_url_pattern="indici5rcm/clipped/eca_cdd_an_EC-EARTH_RACMO22E_{scenario}_{year_period}_{time_window}_ls_VFVGTAA.nc", - # unit_english="days", - # unit_italian="gg", - # palette="default/div-BrBG-inv", - # color_scale_min=-40, - # color_scale_max=40, - # data_precision=_DATA_PRECISION, climatic_indicator_id=climatic_indicators["cdd-anomaly-thirty_year"], possible_values=[ ConfigurationParameterPossibleValueCreate( @@ -225,21 +154,6 @@ def generate_configurations( (CoreConfParamName.ARCHIVE.value, "forecast") ].id ), - # ConfigurationParameterPossibleValueCreate( - # configuration_parameter_value_id=conf_param_values[ - # (CoreConfParamName.CLIMATOLOGICAL_VARIABLE.value, "cdd") - # ].id - # ), - # ConfigurationParameterPossibleValueCreate( - # configuration_parameter_value_id=conf_param_values[ - # (CoreConfParamName.AGGREGATION_PERIOD.value, "30yr") - # ].id - # ), - # ConfigurationParameterPossibleValueCreate( - # configuration_parameter_value_id=conf_param_values[ - # (CoreConfParamName.MEASURE.value, "anomaly") - # ].id - # ), ConfigurationParameterPossibleValueCreate( configuration_parameter_value_id=conf_param_values[ ( @@ -297,19 +211,9 @@ def generate_configurations( ), CoverageConfigurationCreate( name="cdd_30yr_anomaly_seasonal_model_ec_earth_rca4", - # display_name_english=_DISPLAY_NAME_ENGLISH, - # display_name_italian=_DISPLAY_NAME_ITALIAN, - # description_english=_DESCRIPTION_ENGLISH, - # description_italian=_DESCRIPTION_ITALIAN, netcdf_main_dataset_name="cdd", wms_main_layer_name="consecutive_dry_days_index_per_time_period", thredds_url_pattern="indici5rcm/clipped/eca_cdd_an_EC-EARTH_RCA4_{scenario}_{year_period}_{time_window}_ls_VFVGTAA.nc", - # unit_english="days", - # unit_italian="gg", - # palette="default/div-BrBG-inv", - # color_scale_min=-40, - # color_scale_max=40, - # data_precision=_DATA_PRECISION, climatic_indicator_id=climatic_indicators["cdd-anomaly-thirty_year"], possible_values=[ ConfigurationParameterPossibleValueCreate( @@ -317,21 +221,6 @@ def generate_configurations( (CoreConfParamName.ARCHIVE.value, "forecast") ].id ), - # ConfigurationParameterPossibleValueCreate( - # configuration_parameter_value_id=conf_param_values[ - # (CoreConfParamName.CLIMATOLOGICAL_VARIABLE.value, "cdd") - # ].id - # ), - # ConfigurationParameterPossibleValueCreate( - # configuration_parameter_value_id=conf_param_values[ - # (CoreConfParamName.AGGREGATION_PERIOD.value, "30yr") - # ].id - # ), - # ConfigurationParameterPossibleValueCreate( - # configuration_parameter_value_id=conf_param_values[ - # (CoreConfParamName.MEASURE.value, "anomaly") - # ].id - # ), ConfigurationParameterPossibleValueCreate( configuration_parameter_value_id=conf_param_values[ (CoreConfParamName.CLIMATOLOGICAL_MODEL.value, "ec_earth_rca4") @@ -386,19 +275,9 @@ def generate_configurations( ), CoverageConfigurationCreate( name="cdd_30yr_anomaly_seasonal_model_hadgem2_es_racmo22e", - # display_name_english=_DISPLAY_NAME_ENGLISH, - # display_name_italian=_DISPLAY_NAME_ITALIAN, - # description_english=_DESCRIPTION_ENGLISH, - # description_italian=_DESCRIPTION_ITALIAN, netcdf_main_dataset_name="cdd", wms_main_layer_name="consecutive_dry_days_index_per_time_period", thredds_url_pattern="indici5rcm/clipped/eca_cdd_an_HadGEM2-ES_RACMO22E_{scenario}_{year_period}_{time_window}_ls_VFVGTAA.nc", - # unit_english="days", - # unit_italian="gg", - # palette="default/div-BrBG-inv", - # color_scale_min=-40, - # color_scale_max=40, - # data_precision=_DATA_PRECISION, climatic_indicator_id=climatic_indicators["cdd-anomaly-thirty_year"], possible_values=[ ConfigurationParameterPossibleValueCreate( @@ -406,21 +285,6 @@ def generate_configurations( (CoreConfParamName.ARCHIVE.value, "forecast") ].id ), - # ConfigurationParameterPossibleValueCreate( - # configuration_parameter_value_id=conf_param_values[ - # (CoreConfParamName.CLIMATOLOGICAL_VARIABLE.value, "cdd") - # ].id - # ), - # ConfigurationParameterPossibleValueCreate( - # configuration_parameter_value_id=conf_param_values[ - # (CoreConfParamName.AGGREGATION_PERIOD.value, "30yr") - # ].id - # ), - # ConfigurationParameterPossibleValueCreate( - # configuration_parameter_value_id=conf_param_values[ - # (CoreConfParamName.MEASURE.value, "anomaly") - # ].id - # ), ConfigurationParameterPossibleValueCreate( configuration_parameter_value_id=conf_param_values[ ( @@ -478,19 +342,9 @@ def generate_configurations( ), CoverageConfigurationCreate( name="cdd_30yr_anomaly_seasonal_model_mpi_esm_lr_remo2009", - # display_name_english=_DISPLAY_NAME_ENGLISH, - # display_name_italian=_DISPLAY_NAME_ITALIAN, - # description_english=_DESCRIPTION_ENGLISH, - # description_italian=_DESCRIPTION_ITALIAN, netcdf_main_dataset_name="cdd", wms_main_layer_name="consecutive_dry_days_index_per_time_period", thredds_url_pattern="indici5rcm/clipped/eca_cdd_an_MPI-ESM-LR_REMO2009_{scenario}_{year_period}_{time_window}_ls_VFVGTAA.nc", - # unit_english="days", - # unit_italian="gg", - # palette="default/div-BrBG-inv", - # color_scale_min=-40, - # color_scale_max=40, - # data_precision=_DATA_PRECISION, climatic_indicator_id=climatic_indicators["cdd-anomaly-thirty_year"], possible_values=[ ConfigurationParameterPossibleValueCreate( @@ -498,21 +352,6 @@ def generate_configurations( (CoreConfParamName.ARCHIVE.value, "forecast") ].id ), - # ConfigurationParameterPossibleValueCreate( - # configuration_parameter_value_id=conf_param_values[ - # (CoreConfParamName.CLIMATOLOGICAL_VARIABLE.value, "cdd") - # ].id - # ), - # ConfigurationParameterPossibleValueCreate( - # configuration_parameter_value_id=conf_param_values[ - # (CoreConfParamName.AGGREGATION_PERIOD.value, "30yr") - # ].id - # ), - # ConfigurationParameterPossibleValueCreate( - # configuration_parameter_value_id=conf_param_values[ - # (CoreConfParamName.MEASURE.value, "anomaly") - # ].id - # ), ConfigurationParameterPossibleValueCreate( configuration_parameter_value_id=conf_param_values[ ( diff --git a/arpav_ppcv/bootstrapper/coverage_configurations/forecast/cdds.py b/arpav_ppcv/bootstrapper/coverage_configurations/forecast/cdds.py index 4c3697fd..8e862c97 100644 --- a/arpav_ppcv/bootstrapper/coverage_configurations/forecast/cdds.py +++ b/arpav_ppcv/bootstrapper/coverage_configurations/forecast/cdds.py @@ -7,39 +7,17 @@ ConfigurationParameterPossibleValueCreate, ) -# _DISPLAY_NAME_ENGLISH = "Cooling degree days" -# _DISPLAY_NAME_ITALIAN = "Gradi giorno di raffrescamento" -# _DESCRIPTION_ENGLISH = ( -# "Sum of the average daily temperature minus 21°C if the average daily temperature " -# "is greater than 24°C" -# ) -# _DESCRIPTION_ITALIAN = ( -# "Somma della temperatura media giornaliera meno 21°C se la temperatura media " -# "giornaliera è maggiore di 24°C" -# ) -# _DATA_PRECISION = 0 - def generate_configurations( conf_param_values, - variables, climatic_indicators: dict[str, int], ) -> list[CoverageConfigurationCreate]: return [ CoverageConfigurationCreate( name="cdds_annual_absolute_model_ensemble", - # display_name_english=_DISPLAY_NAME_ENGLISH, - # display_name_italian=_DISPLAY_NAME_ITALIAN, - # description_english=_DESCRIPTION_ENGLISH, - # description_italian=_DESCRIPTION_ITALIAN, netcdf_main_dataset_name="cdds", wms_main_layer_name="cdds", thredds_url_pattern="ensymbc/clipped_noppcne/cdds_21oc24oc_avg_ts19762100_{scenario}_ls_VFVG.nc", - # unit_english="ºC", - # palette="default/seq-YlOrRd", - # color_scale_min=0, - # color_scale_max=1000, - # data_precision=_DATA_PRECISION, climatic_indicator_id=climatic_indicators["cdds-absolute-annual"], possible_values=[ ConfigurationParameterPossibleValueCreate( @@ -47,21 +25,6 @@ def generate_configurations( (CoreConfParamName.ARCHIVE.value, "forecast") ].id ), - # ConfigurationParameterPossibleValueCreate( - # configuration_parameter_value_id=conf_param_values[ - # (CoreConfParamName.CLIMATOLOGICAL_VARIABLE.value, "cdds") - # ].id - # ), - # ConfigurationParameterPossibleValueCreate( - # configuration_parameter_value_id=conf_param_values[ - # (CoreConfParamName.AGGREGATION_PERIOD.value, "annual") - # ].id - # ), - # ConfigurationParameterPossibleValueCreate( - # configuration_parameter_value_id=conf_param_values[ - # (CoreConfParamName.MEASURE.value, "absolute") - # ].id - # ), ConfigurationParameterPossibleValueCreate( configuration_parameter_value_id=conf_param_values[ (CoreConfParamName.CLIMATOLOGICAL_MODEL.value, "model_ensemble") @@ -88,25 +51,13 @@ def generate_configurations( ].id ), ], - observation_variable_id=( - v.id if (v := variables.get("CDD_jrc")) is not None else None - ), observation_variable_aggregation_type=ObservationAggregationType.YEARLY, ), CoverageConfigurationCreate( name="cdds_annual_absolute_model_ec_earth_cclm4_8_17", - # display_name_english=_DISPLAY_NAME_ENGLISH, - # display_name_italian=_DISPLAY_NAME_ITALIAN, - # description_english=_DESCRIPTION_ENGLISH, - # description_italian=_DESCRIPTION_ITALIAN, netcdf_main_dataset_name="cdds", wms_main_layer_name="cdds", thredds_url_pattern="EC-EARTH_CCLM4-8-17ymbc/clipped_noppcne/cdds_21oc24oc_EC-EARTH_CCLM4-8-17_{scenario}_ts19762100_ls_VFVG.nc", - # unit_english="ºC", - # palette="default/seq-YlOrRd", - # color_scale_min=0, - # color_scale_max=1000, - # data_precision=_DATA_PRECISION, climatic_indicator_id=climatic_indicators["cdds-absolute-annual"], possible_values=[ ConfigurationParameterPossibleValueCreate( @@ -114,21 +65,6 @@ def generate_configurations( (CoreConfParamName.ARCHIVE.value, "forecast") ].id ), - # ConfigurationParameterPossibleValueCreate( - # configuration_parameter_value_id=conf_param_values[ - # (CoreConfParamName.CLIMATOLOGICAL_VARIABLE.value, "cdds") - # ].id - # ), - # ConfigurationParameterPossibleValueCreate( - # configuration_parameter_value_id=conf_param_values[ - # (CoreConfParamName.AGGREGATION_PERIOD.value, "annual") - # ].id - # ), - # ConfigurationParameterPossibleValueCreate( - # configuration_parameter_value_id=conf_param_values[ - # (CoreConfParamName.MEASURE.value, "absolute") - # ].id - # ), ConfigurationParameterPossibleValueCreate( configuration_parameter_value_id=conf_param_values[ ( @@ -161,18 +97,9 @@ def generate_configurations( ), CoverageConfigurationCreate( name="cdds_annual_absolute_model_ec_earth_racmo22e", - # display_name_english=_DISPLAY_NAME_ENGLISH, - # display_name_italian=_DISPLAY_NAME_ITALIAN, - # description_english=_DESCRIPTION_ENGLISH, - # description_italian=_DESCRIPTION_ITALIAN, netcdf_main_dataset_name="cdds", wms_main_layer_name="cdds", thredds_url_pattern="EC-EARTH_RACMO22Eymbc/clipped_noppcne/cdds_21oc24oc_EC-EARTH_RACMO22E_{scenario}_ts19762100_ls_VFVG.nc", - # unit_english="ºC", - # palette="default/seq-YlOrRd", - # color_scale_min=0, - # color_scale_max=1000, - # data_precision=_DATA_PRECISION, climatic_indicator_id=climatic_indicators["cdds-absolute-annual"], possible_values=[ ConfigurationParameterPossibleValueCreate( @@ -180,21 +107,6 @@ def generate_configurations( (CoreConfParamName.ARCHIVE.value, "forecast") ].id ), - # ConfigurationParameterPossibleValueCreate( - # configuration_parameter_value_id=conf_param_values[ - # (CoreConfParamName.CLIMATOLOGICAL_VARIABLE.value, "cdds") - # ].id - # ), - # ConfigurationParameterPossibleValueCreate( - # configuration_parameter_value_id=conf_param_values[ - # (CoreConfParamName.AGGREGATION_PERIOD.value, "annual") - # ].id - # ), - # ConfigurationParameterPossibleValueCreate( - # configuration_parameter_value_id=conf_param_values[ - # (CoreConfParamName.MEASURE.value, "absolute") - # ].id - # ), ConfigurationParameterPossibleValueCreate( configuration_parameter_value_id=conf_param_values[ ( @@ -227,18 +139,9 @@ def generate_configurations( ), CoverageConfigurationCreate( name="cdds_annual_absolute_model_ec_earth_rca4", - # display_name_english=_DISPLAY_NAME_ENGLISH, - # display_name_italian=_DISPLAY_NAME_ITALIAN, - # description_english=_DESCRIPTION_ENGLISH, - # description_italian=_DESCRIPTION_ITALIAN, netcdf_main_dataset_name="cdds", wms_main_layer_name="cdds", thredds_url_pattern="EC-EARTH_RCA4ymbc/clipped_noppcne/cdds_21oc24oc_EC-EARTH_RCA4_{scenario}_ts19762100_ls_VFVG.nc", - # unit_english="ºC", - # palette="default/seq-YlOrRd", - # color_scale_min=0, - # color_scale_max=1000, - # data_precision=_DATA_PRECISION, climatic_indicator_id=climatic_indicators["cdds-absolute-annual"], possible_values=[ ConfigurationParameterPossibleValueCreate( @@ -246,21 +149,6 @@ def generate_configurations( (CoreConfParamName.ARCHIVE.value, "forecast") ].id ), - # ConfigurationParameterPossibleValueCreate( - # configuration_parameter_value_id=conf_param_values[ - # (CoreConfParamName.CLIMATOLOGICAL_VARIABLE.value, "cdds") - # ].id - # ), - # ConfigurationParameterPossibleValueCreate( - # configuration_parameter_value_id=conf_param_values[ - # (CoreConfParamName.AGGREGATION_PERIOD.value, "annual") - # ].id - # ), - # ConfigurationParameterPossibleValueCreate( - # configuration_parameter_value_id=conf_param_values[ - # (CoreConfParamName.MEASURE.value, "absolute") - # ].id - # ), ConfigurationParameterPossibleValueCreate( configuration_parameter_value_id=conf_param_values[ (CoreConfParamName.CLIMATOLOGICAL_MODEL.value, "ec_earth_rca4") @@ -290,18 +178,9 @@ def generate_configurations( ), CoverageConfigurationCreate( name="cdds_annual_absolute_model_hadgem2_es_racmo22e", - # display_name_english=_DISPLAY_NAME_ENGLISH, - # display_name_italian=_DISPLAY_NAME_ITALIAN, - # description_english=_DESCRIPTION_ENGLISH, - # description_italian=_DESCRIPTION_ITALIAN, netcdf_main_dataset_name="cdds", wms_main_layer_name="cdds", thredds_url_pattern="HadGEM2-ES_RACMO22Eymbc/clipped_noppcne/cdds_21oc24oc_HadGEM2-ES_RACMO22E_{scenario}_ts19762100_ls_VFVG.nc", - # unit_english="ºC", - # palette="default/seq-YlOrRd", - # color_scale_min=0, - # color_scale_max=1000, - # data_precision=_DATA_PRECISION, climatic_indicator_id=climatic_indicators["cdds-absolute-annual"], possible_values=[ ConfigurationParameterPossibleValueCreate( @@ -309,21 +188,6 @@ def generate_configurations( (CoreConfParamName.ARCHIVE.value, "forecast") ].id ), - # ConfigurationParameterPossibleValueCreate( - # configuration_parameter_value_id=conf_param_values[ - # (CoreConfParamName.CLIMATOLOGICAL_VARIABLE.value, "cdds") - # ].id - # ), - # ConfigurationParameterPossibleValueCreate( - # configuration_parameter_value_id=conf_param_values[ - # (CoreConfParamName.AGGREGATION_PERIOD.value, "annual") - # ].id - # ), - # ConfigurationParameterPossibleValueCreate( - # configuration_parameter_value_id=conf_param_values[ - # (CoreConfParamName.MEASURE.value, "absolute") - # ].id - # ), ConfigurationParameterPossibleValueCreate( configuration_parameter_value_id=conf_param_values[ ( @@ -356,18 +220,9 @@ def generate_configurations( ), CoverageConfigurationCreate( name="cdds_annual_absolute_model_mpi_esm_lr_remo2009", - # display_name_english=_DISPLAY_NAME_ENGLISH, - # display_name_italian=_DISPLAY_NAME_ITALIAN, - # description_english=_DESCRIPTION_ENGLISH, - # description_italian=_DESCRIPTION_ITALIAN, netcdf_main_dataset_name="cdds", wms_main_layer_name="cdds", thredds_url_pattern="MPI-ESM-LR_REMO2009ymbc/clipped_noppcne/cdds_21oc24oc_MPI-ESM-LR_REMO2009_{scenario}_ts19762100_ls_VFVG.nc", - # unit_english="ºC", - # palette="default/seq-YlOrRd", - # color_scale_min=0, - # color_scale_max=1000, - # data_precision=_DATA_PRECISION, climatic_indicator_id=climatic_indicators["cdds-absolute-annual"], possible_values=[ ConfigurationParameterPossibleValueCreate( @@ -375,21 +230,6 @@ def generate_configurations( (CoreConfParamName.ARCHIVE.value, "forecast") ].id ), - # ConfigurationParameterPossibleValueCreate( - # configuration_parameter_value_id=conf_param_values[ - # (CoreConfParamName.CLIMATOLOGICAL_VARIABLE.value, "cdds") - # ].id - # ), - # ConfigurationParameterPossibleValueCreate( - # configuration_parameter_value_id=conf_param_values[ - # (CoreConfParamName.AGGREGATION_PERIOD.value, "annual") - # ].id - # ), - # ConfigurationParameterPossibleValueCreate( - # configuration_parameter_value_id=conf_param_values[ - # (CoreConfParamName.MEASURE.value, "absolute") - # ].id - # ), ConfigurationParameterPossibleValueCreate( configuration_parameter_value_id=conf_param_values[ ( @@ -422,18 +262,9 @@ def generate_configurations( ), CoverageConfigurationCreate( name="cdds_annual_absolute_model_ensemble_upper_uncertainty", - # display_name_english=_DISPLAY_NAME_ENGLISH, - # display_name_italian=_DISPLAY_NAME_ITALIAN, - # description_english=_DESCRIPTION_ENGLISH, - # description_italian=_DESCRIPTION_ITALIAN, netcdf_main_dataset_name="cdds_stdup", wms_main_layer_name="cdds_stdup", thredds_url_pattern="ensymbc/std/clipped/cdds_21oc24oc_stdup_ts19762100_{scenario}_ls_VFVG.nc", - # unit_english="ºC", - # palette="default/seq-YlOrRd", - # color_scale_min=0, - # color_scale_max=1000, - # data_precision=_DATA_PRECISION, climatic_indicator_id=climatic_indicators["cdds-absolute-annual"], possible_values=[ ConfigurationParameterPossibleValueCreate( @@ -441,21 +272,6 @@ def generate_configurations( (CoreConfParamName.ARCHIVE.value, "forecast") ].id ), - # ConfigurationParameterPossibleValueCreate( - # configuration_parameter_value_id=conf_param_values[ - # (CoreConfParamName.CLIMATOLOGICAL_VARIABLE.value, "cdds") - # ].id - # ), - # ConfigurationParameterPossibleValueCreate( - # configuration_parameter_value_id=conf_param_values[ - # (CoreConfParamName.AGGREGATION_PERIOD.value, "annual") - # ].id - # ), - # ConfigurationParameterPossibleValueCreate( - # configuration_parameter_value_id=conf_param_values[ - # (CoreConfParamName.MEASURE.value, "absolute") - # ].id - # ), ConfigurationParameterPossibleValueCreate( configuration_parameter_value_id=conf_param_values[ (CoreConfParamName.CLIMATOLOGICAL_MODEL.value, "model_ensemble") @@ -490,18 +306,9 @@ def generate_configurations( ), CoverageConfigurationCreate( name="cdds_annual_absolute_model_ensemble_lower_uncertainty", - # display_name_english=_DISPLAY_NAME_ENGLISH, - # display_name_italian=_DISPLAY_NAME_ITALIAN, - # description_english=_DESCRIPTION_ENGLISH, - # description_italian=_DESCRIPTION_ITALIAN, netcdf_main_dataset_name="cdds_stddown", wms_main_layer_name="cdds_stddown", thredds_url_pattern="ensymbc/std/clipped/cdds_21oc24oc_stddown_ts19762100_{scenario}_ls_VFVG.nc", - # unit_english="ºC", - # palette="default/seq-YlOrRd", - # color_scale_min=0, - # color_scale_max=1000, - # data_precision=_DATA_PRECISION, climatic_indicator_id=climatic_indicators["cdds-absolute-annual"], possible_values=[ ConfigurationParameterPossibleValueCreate( @@ -509,21 +316,6 @@ def generate_configurations( (CoreConfParamName.ARCHIVE.value, "forecast") ].id ), - # ConfigurationParameterPossibleValueCreate( - # configuration_parameter_value_id=conf_param_values[ - # (CoreConfParamName.CLIMATOLOGICAL_VARIABLE.value, "cdds") - # ].id - # ), - # ConfigurationParameterPossibleValueCreate( - # configuration_parameter_value_id=conf_param_values[ - # (CoreConfParamName.AGGREGATION_PERIOD.value, "annual") - # ].id - # ), - # ConfigurationParameterPossibleValueCreate( - # configuration_parameter_value_id=conf_param_values[ - # (CoreConfParamName.MEASURE.value, "absolute") - # ].id - # ), ConfigurationParameterPossibleValueCreate( configuration_parameter_value_id=conf_param_values[ (CoreConfParamName.CLIMATOLOGICAL_MODEL.value, "model_ensemble") @@ -558,19 +350,10 @@ def generate_configurations( ), CoverageConfigurationCreate( name="cdds_30yr_anomaly_annual_agree_model_ensemble", - # display_name_english=_DISPLAY_NAME_ENGLISH, - # display_name_italian=_DISPLAY_NAME_ITALIAN, - # description_english=_DESCRIPTION_ENGLISH, - # description_italian=_DESCRIPTION_ITALIAN, netcdf_main_dataset_name="cdds", wms_main_layer_name="cdds-uncertainty_group", wms_secondary_layer_name="cdds", thredds_url_pattern="ensembletwbc/std/clipped/cdds_an_21oc24oc_avgagree_{time_window}_{scenario}_ls_VFVG.nc", - # unit_english="ºC", - # palette="uncert-stippled/seq-YlOrRd", - # color_scale_min=0, - # color_scale_max=1000, - # data_precision=_DATA_PRECISION, climatic_indicator_id=climatic_indicators["cdds-anomaly-thirty_year"], possible_values=[ ConfigurationParameterPossibleValueCreate( @@ -578,21 +361,6 @@ def generate_configurations( (CoreConfParamName.ARCHIVE.value, "forecast") ].id ), - # ConfigurationParameterPossibleValueCreate( - # configuration_parameter_value_id=conf_param_values[ - # (CoreConfParamName.CLIMATOLOGICAL_VARIABLE.value, "cdds") - # ].id - # ), - # ConfigurationParameterPossibleValueCreate( - # configuration_parameter_value_id=conf_param_values[ - # (CoreConfParamName.AGGREGATION_PERIOD.value, "30yr") - # ].id - # ), - # ConfigurationParameterPossibleValueCreate( - # configuration_parameter_value_id=conf_param_values[ - # (CoreConfParamName.MEASURE.value, "anomaly") - # ].id - # ), ConfigurationParameterPossibleValueCreate( configuration_parameter_value_id=conf_param_values[ (CoreConfParamName.CLIMATOLOGICAL_MODEL.value, "model_ensemble") @@ -632,18 +400,9 @@ def generate_configurations( ), CoverageConfigurationCreate( name="cdds_30yr_anomaly_annual_model_ec_earth_cclm4_8_17", - # display_name_english=_DISPLAY_NAME_ENGLISH, - # display_name_italian=_DISPLAY_NAME_ITALIAN, - # description_english=_DESCRIPTION_ENGLISH, - # description_italian=_DESCRIPTION_ITALIAN, netcdf_main_dataset_name="cdds", wms_main_layer_name="cdds", thredds_url_pattern="indici5rcm/clipped_noppcne/cdds_an_21oc24oc_EC-EARTH_CCLM4-8-17_{scenario}_{time_window}_ls_VFVG.nc", - # unit_english="ºC", - # palette="default/seq-YlOrRd", - # color_scale_min=0, - # color_scale_max=1000, - # data_precision=_DATA_PRECISION, climatic_indicator_id=climatic_indicators["cdds-anomaly-thirty_year"], possible_values=[ ConfigurationParameterPossibleValueCreate( @@ -651,21 +410,6 @@ def generate_configurations( (CoreConfParamName.ARCHIVE.value, "forecast") ].id ), - # ConfigurationParameterPossibleValueCreate( - # configuration_parameter_value_id=conf_param_values[ - # (CoreConfParamName.CLIMATOLOGICAL_VARIABLE.value, "cdds") - # ].id - # ), - # ConfigurationParameterPossibleValueCreate( - # configuration_parameter_value_id=conf_param_values[ - # (CoreConfParamName.AGGREGATION_PERIOD.value, "30yr") - # ].id - # ), - # ConfigurationParameterPossibleValueCreate( - # configuration_parameter_value_id=conf_param_values[ - # (CoreConfParamName.MEASURE.value, "anomaly") - # ].id - # ), ConfigurationParameterPossibleValueCreate( configuration_parameter_value_id=conf_param_values[ ( @@ -708,18 +452,9 @@ def generate_configurations( ), CoverageConfigurationCreate( name="cdds_30yr_anomaly_annual_model_ec_earth_racmo22e", - # display_name_english=_DISPLAY_NAME_ENGLISH, - # display_name_italian=_DISPLAY_NAME_ITALIAN, - # description_english=_DESCRIPTION_ENGLISH, - # description_italian=_DESCRIPTION_ITALIAN, netcdf_main_dataset_name="cdds", wms_main_layer_name="cdds", thredds_url_pattern="indici5rcm/clipped_noppcne/cdds_an_21oc24oc_EC-EARTH_RACMO22E_{scenario}_{time_window}_ls_VFVG.nc", - # unit_english="ºC", - # palette="default/seq-YlOrRd", - # color_scale_min=0, - # color_scale_max=1000, - # data_precision=_DATA_PRECISION, climatic_indicator_id=climatic_indicators["cdds-anomaly-thirty_year"], possible_values=[ ConfigurationParameterPossibleValueCreate( @@ -727,21 +462,6 @@ def generate_configurations( (CoreConfParamName.ARCHIVE.value, "forecast") ].id ), - # ConfigurationParameterPossibleValueCreate( - # configuration_parameter_value_id=conf_param_values[ - # (CoreConfParamName.CLIMATOLOGICAL_VARIABLE.value, "cdds") - # ].id - # ), - # ConfigurationParameterPossibleValueCreate( - # configuration_parameter_value_id=conf_param_values[ - # (CoreConfParamName.AGGREGATION_PERIOD.value, "30yr") - # ].id - # ), - # ConfigurationParameterPossibleValueCreate( - # configuration_parameter_value_id=conf_param_values[ - # (CoreConfParamName.MEASURE.value, "anomaly") - # ].id - # ), ConfigurationParameterPossibleValueCreate( configuration_parameter_value_id=conf_param_values[ ( @@ -784,18 +504,9 @@ def generate_configurations( ), CoverageConfigurationCreate( name="cdds_30yr_anomaly_annual_model_ec_earth_rca4", - # display_name_english=_DISPLAY_NAME_ENGLISH, - # display_name_italian=_DISPLAY_NAME_ITALIAN, - # description_english=_DESCRIPTION_ENGLISH, - # description_italian=_DESCRIPTION_ITALIAN, netcdf_main_dataset_name="cdds", wms_main_layer_name="cdds", thredds_url_pattern="indici5rcm/clipped_noppcne/cdds_an_21oc24oc_EC-EARTH_RCA4_{scenario}_{time_window}_ls_VFVG.nc", - # unit_english="ºC", - # palette="default/seq-YlOrRd", - # color_scale_min=0, - # color_scale_max=1000, - # data_precision=_DATA_PRECISION, climatic_indicator_id=climatic_indicators["cdds-anomaly-thirty_year"], possible_values=[ ConfigurationParameterPossibleValueCreate( @@ -803,21 +514,6 @@ def generate_configurations( (CoreConfParamName.ARCHIVE.value, "forecast") ].id ), - # ConfigurationParameterPossibleValueCreate( - # configuration_parameter_value_id=conf_param_values[ - # (CoreConfParamName.CLIMATOLOGICAL_VARIABLE.value, "cdds") - # ].id - # ), - # ConfigurationParameterPossibleValueCreate( - # configuration_parameter_value_id=conf_param_values[ - # (CoreConfParamName.AGGREGATION_PERIOD.value, "30yr") - # ].id - # ), - # ConfigurationParameterPossibleValueCreate( - # configuration_parameter_value_id=conf_param_values[ - # (CoreConfParamName.MEASURE.value, "anomaly") - # ].id - # ), ConfigurationParameterPossibleValueCreate( configuration_parameter_value_id=conf_param_values[ (CoreConfParamName.CLIMATOLOGICAL_MODEL.value, "ec_earth_rca4") @@ -857,18 +553,9 @@ def generate_configurations( ), CoverageConfigurationCreate( name="cdds_30yr_anomaly_annual_model_hadgem2_es_racmo22e", - # display_name_english=_DISPLAY_NAME_ENGLISH, - # display_name_italian=_DISPLAY_NAME_ITALIAN, - # description_english=_DESCRIPTION_ENGLISH, - # description_italian=_DESCRIPTION_ITALIAN, netcdf_main_dataset_name="cdds", wms_main_layer_name="cdds", thredds_url_pattern="indici5rcm/clipped_noppcne/cdds_an_21oc24oc_HadGEM2-ES_RACMO22E_{scenario}_{time_window}_ls_VFVG.nc", - # unit_english="ºC", - # palette="default/seq-YlOrRd", - # color_scale_min=0, - # color_scale_max=1000, - # data_precision=_DATA_PRECISION, climatic_indicator_id=climatic_indicators["cdds-anomaly-thirty_year"], possible_values=[ ConfigurationParameterPossibleValueCreate( @@ -876,21 +563,6 @@ def generate_configurations( (CoreConfParamName.ARCHIVE.value, "forecast") ].id ), - # ConfigurationParameterPossibleValueCreate( - # configuration_parameter_value_id=conf_param_values[ - # (CoreConfParamName.CLIMATOLOGICAL_VARIABLE.value, "cdds") - # ].id - # ), - # ConfigurationParameterPossibleValueCreate( - # configuration_parameter_value_id=conf_param_values[ - # (CoreConfParamName.AGGREGATION_PERIOD.value, "30yr") - # ].id - # ), - # ConfigurationParameterPossibleValueCreate( - # configuration_parameter_value_id=conf_param_values[ - # (CoreConfParamName.MEASURE.value, "anomaly") - # ].id - # ), ConfigurationParameterPossibleValueCreate( configuration_parameter_value_id=conf_param_values[ ( @@ -933,18 +605,9 @@ def generate_configurations( ), CoverageConfigurationCreate( name="cdds_30yr_anomaly_annual_model_mpi_esm_lr_remo2009", - # display_name_english=_DISPLAY_NAME_ENGLISH, - # display_name_italian=_DISPLAY_NAME_ITALIAN, - # description_english=_DESCRIPTION_ENGLISH, - # description_italian=_DESCRIPTION_ITALIAN, netcdf_main_dataset_name="cdds", wms_main_layer_name="cdds", thredds_url_pattern="indici5rcm/clipped_noppcne/cdds_an_21oc24oc_MPI-ESM-LR_REMO2009_{scenario}_{time_window}_ls_VFVG.nc", - # unit_english="ºC", - # palette="default/seq-YlOrRd", - # color_scale_min=0, - # color_scale_max=1000, - # data_precision=_DATA_PRECISION, climatic_indicator_id=climatic_indicators["cdds-anomaly-thirty_year"], possible_values=[ ConfigurationParameterPossibleValueCreate( @@ -952,21 +615,6 @@ def generate_configurations( (CoreConfParamName.ARCHIVE.value, "forecast") ].id ), - # ConfigurationParameterPossibleValueCreate( - # configuration_parameter_value_id=conf_param_values[ - # (CoreConfParamName.CLIMATOLOGICAL_VARIABLE.value, "cdds") - # ].id - # ), - # ConfigurationParameterPossibleValueCreate( - # configuration_parameter_value_id=conf_param_values[ - # (CoreConfParamName.AGGREGATION_PERIOD.value, "30yr") - # ].id - # ), - # ConfigurationParameterPossibleValueCreate( - # configuration_parameter_value_id=conf_param_values[ - # (CoreConfParamName.MEASURE.value, "anomaly") - # ].id - # ), ConfigurationParameterPossibleValueCreate( configuration_parameter_value_id=conf_param_values[ ( diff --git a/arpav_ppcv/bootstrapper/coverage_configurations/forecast/fd.py b/arpav_ppcv/bootstrapper/coverage_configurations/forecast/fd.py index c40808de..a6e6c470 100644 --- a/arpav_ppcv/bootstrapper/coverage_configurations/forecast/fd.py +++ b/arpav_ppcv/bootstrapper/coverage_configurations/forecast/fd.py @@ -1,40 +1,20 @@ -from ....schemas.base import ( - CoreConfParamName, - ObservationAggregationType, -) +from ....schemas.base import CoreConfParamName from ....schemas.coverages import ( CoverageConfigurationCreate, ConfigurationParameterPossibleValueCreate, ) -# _DISPLAY_NAME_ENGLISH = "Frosty days" -# _DISPLAY_NAME_ITALIAN = "Giorni di gelo" -# _DESCRIPTION_ENGLISH = "Number of days with minimum temperature less than 0 °C" -# _DESCRIPTION_ITALIAN = "Numero di giorni con temperatura minima inferiore a 0 °C" -# _DATA_PRECISION = 0 - def generate_configurations( conf_param_values, - variables, climatic_indicators: dict[str, int], ) -> list[CoverageConfigurationCreate]: return [ CoverageConfigurationCreate( name="fd_annual_absolute_model_ensemble", - # display_name_english=_DISPLAY_NAME_ENGLISH, - # display_name_italian=_DISPLAY_NAME_ITALIAN, - # description_english=_DESCRIPTION_ENGLISH, - # description_italian=_DESCRIPTION_ITALIAN, netcdf_main_dataset_name="fd", wms_main_layer_name="fd", thredds_url_pattern="ensymbc/clipped/ecafd_0_avg_{scenario}_ts19762100_ls_VFVG.nc", - # unit_english="days", - # unit_italian="gg", - # palette="default/seq-Blues-inv", - # color_scale_min=0, - # color_scale_max=200, - # data_precision=_DATA_PRECISION, climatic_indicator_id=climatic_indicators["fd-absolute-annual"], possible_values=[ ConfigurationParameterPossibleValueCreate( @@ -42,21 +22,6 @@ def generate_configurations( (CoreConfParamName.ARCHIVE.value, "forecast") ].id ), - # ConfigurationParameterPossibleValueCreate( - # configuration_parameter_value_id=conf_param_values[ - # (CoreConfParamName.CLIMATOLOGICAL_VARIABLE.value, "fd") - # ].id - # ), - # ConfigurationParameterPossibleValueCreate( - # configuration_parameter_value_id=conf_param_values[ - # (CoreConfParamName.AGGREGATION_PERIOD.value, "annual") - # ].id - # ), - # ConfigurationParameterPossibleValueCreate( - # configuration_parameter_value_id=conf_param_values[ - # (CoreConfParamName.MEASURE.value, "absolute") - # ].id - # ), ConfigurationParameterPossibleValueCreate( configuration_parameter_value_id=conf_param_values[ (CoreConfParamName.CLIMATOLOGICAL_MODEL.value, "model_ensemble") @@ -83,26 +48,12 @@ def generate_configurations( ].id ), ], - observation_variable_id=( - v.id if (v := variables.get("FD")) is not None else None - ), - observation_variable_aggregation_type=ObservationAggregationType.SEASONAL, ), CoverageConfigurationCreate( name="fd_annual_absolute_model_ec_earth_cclm4_8_17", - # display_name_english=_DISPLAY_NAME_ENGLISH, - # display_name_italian=_DISPLAY_NAME_ITALIAN, - # description_english=_DESCRIPTION_ENGLISH, - # description_italian=_DESCRIPTION_ITALIAN, netcdf_main_dataset_name="fd", wms_main_layer_name="fd", thredds_url_pattern="EC-EARTH_CCLM4-8-17ymbc/clipped/ecafd_0_EC-EARTH_CCLM4-8-17_{scenario}_ts19762100_ls_VFVG.nc", - # unit_english="days", - # unit_italian="gg", - # palette="default/seq-Blues-inv", - # color_scale_min=0, - # color_scale_max=200, - # data_precision=_DATA_PRECISION, climatic_indicator_id=climatic_indicators["fd-absolute-annual"], possible_values=[ ConfigurationParameterPossibleValueCreate( @@ -110,21 +61,6 @@ def generate_configurations( (CoreConfParamName.ARCHIVE.value, "forecast") ].id ), - # ConfigurationParameterPossibleValueCreate( - # configuration_parameter_value_id=conf_param_values[ - # (CoreConfParamName.CLIMATOLOGICAL_VARIABLE.value, "fd") - # ].id - # ), - # ConfigurationParameterPossibleValueCreate( - # configuration_parameter_value_id=conf_param_values[ - # (CoreConfParamName.AGGREGATION_PERIOD.value, "annual") - # ].id - # ), - # ConfigurationParameterPossibleValueCreate( - # configuration_parameter_value_id=conf_param_values[ - # (CoreConfParamName.MEASURE.value, "absolute") - # ].id - # ), ConfigurationParameterPossibleValueCreate( configuration_parameter_value_id=conf_param_values[ ( @@ -154,26 +90,12 @@ def generate_configurations( ].id ), ], - observation_variable_id=( - v.id if (v := variables.get("FD")) is not None else None - ), - observation_variable_aggregation_type=ObservationAggregationType.SEASONAL, ), CoverageConfigurationCreate( name="fd_annual_absolute_model_ec_earth_racmo22e", - # display_name_english=_DISPLAY_NAME_ENGLISH, - # display_name_italian=_DISPLAY_NAME_ITALIAN, - # description_english=_DESCRIPTION_ENGLISH, - # description_italian=_DESCRIPTION_ITALIAN, netcdf_main_dataset_name="fd", wms_main_layer_name="fd", thredds_url_pattern="EC-EARTH_RACMO22Eymbc/clipped/ecafd_0_EC-EARTH_RACMO22E_{scenario}_ts19762100_ls_VFVG.nc", - # unit_english="days", - # unit_italian="gg", - # palette="default/seq-Blues-inv", - # color_scale_min=0, - # color_scale_max=200, - # data_precision=_DATA_PRECISION, climatic_indicator_id=climatic_indicators["fd-absolute-annual"], possible_values=[ ConfigurationParameterPossibleValueCreate( @@ -181,21 +103,6 @@ def generate_configurations( (CoreConfParamName.ARCHIVE.value, "forecast") ].id ), - # ConfigurationParameterPossibleValueCreate( - # configuration_parameter_value_id=conf_param_values[ - # (CoreConfParamName.CLIMATOLOGICAL_VARIABLE.value, "fd") - # ].id - # ), - # ConfigurationParameterPossibleValueCreate( - # configuration_parameter_value_id=conf_param_values[ - # (CoreConfParamName.AGGREGATION_PERIOD.value, "annual") - # ].id - # ), - # ConfigurationParameterPossibleValueCreate( - # configuration_parameter_value_id=conf_param_values[ - # (CoreConfParamName.MEASURE.value, "absolute") - # ].id - # ), ConfigurationParameterPossibleValueCreate( configuration_parameter_value_id=conf_param_values[ ( @@ -225,26 +132,12 @@ def generate_configurations( ].id ), ], - observation_variable_id=( - v.id if (v := variables.get("FD")) is not None else None - ), - observation_variable_aggregation_type=ObservationAggregationType.SEASONAL, ), CoverageConfigurationCreate( name="fd_annual_absolute_model_ec_earth_rca4", - # display_name_english=_DISPLAY_NAME_ENGLISH, - # display_name_italian=_DISPLAY_NAME_ITALIAN, - # description_english=_DESCRIPTION_ENGLISH, - # description_italian=_DESCRIPTION_ITALIAN, netcdf_main_dataset_name="fd", wms_main_layer_name="fd", thredds_url_pattern="EC-EARTH_RCA4ymbc/clipped/ecafd_0_EC-EARTH_RCA4_{scenario}_ts19762100_ls_VFVG.nc", - # unit_english="days", - # unit_italian="gg", - # palette="default/seq-Blues-inv", - # color_scale_min=0, - # color_scale_max=200, - # data_precision=_DATA_PRECISION, climatic_indicator_id=climatic_indicators["fd-absolute-annual"], possible_values=[ ConfigurationParameterPossibleValueCreate( @@ -252,21 +145,6 @@ def generate_configurations( (CoreConfParamName.ARCHIVE.value, "forecast") ].id ), - # ConfigurationParameterPossibleValueCreate( - # configuration_parameter_value_id=conf_param_values[ - # (CoreConfParamName.CLIMATOLOGICAL_VARIABLE.value, "fd") - # ].id - # ), - # ConfigurationParameterPossibleValueCreate( - # configuration_parameter_value_id=conf_param_values[ - # (CoreConfParamName.AGGREGATION_PERIOD.value, "annual") - # ].id - # ), - # ConfigurationParameterPossibleValueCreate( - # configuration_parameter_value_id=conf_param_values[ - # (CoreConfParamName.MEASURE.value, "absolute") - # ].id - # ), ConfigurationParameterPossibleValueCreate( configuration_parameter_value_id=conf_param_values[ (CoreConfParamName.CLIMATOLOGICAL_MODEL.value, "ec_earth_rca4") @@ -293,26 +171,12 @@ def generate_configurations( ].id ), ], - observation_variable_id=( - v.id if (v := variables.get("FD")) is not None else None - ), - observation_variable_aggregation_type=ObservationAggregationType.SEASONAL, ), CoverageConfigurationCreate( name="fd_annual_absolute_model_hadgem2_es_racmo22e", - # display_name_english=_DISPLAY_NAME_ENGLISH, - # display_name_italian=_DISPLAY_NAME_ITALIAN, - # description_english=_DESCRIPTION_ENGLISH, - # description_italian=_DESCRIPTION_ITALIAN, netcdf_main_dataset_name="fd", wms_main_layer_name="fd", thredds_url_pattern="HadGEM2-ES_RACMO22Eymbc/clipped/ecafd_0_HadGEM2-ES_RACMO22E_{scenario}_ts19762100_ls_VFVG.nc", - # unit_english="days", - # unit_italian="gg", - # palette="default/seq-Blues-inv", - # color_scale_min=0, - # color_scale_max=200, - # data_precision=_DATA_PRECISION, climatic_indicator_id=climatic_indicators["fd-absolute-annual"], possible_values=[ ConfigurationParameterPossibleValueCreate( @@ -320,21 +184,6 @@ def generate_configurations( (CoreConfParamName.ARCHIVE.value, "forecast") ].id ), - # ConfigurationParameterPossibleValueCreate( - # configuration_parameter_value_id=conf_param_values[ - # (CoreConfParamName.CLIMATOLOGICAL_VARIABLE.value, "fd") - # ].id - # ), - # ConfigurationParameterPossibleValueCreate( - # configuration_parameter_value_id=conf_param_values[ - # (CoreConfParamName.AGGREGATION_PERIOD.value, "annual") - # ].id - # ), - # ConfigurationParameterPossibleValueCreate( - # configuration_parameter_value_id=conf_param_values[ - # (CoreConfParamName.MEASURE.value, "absolute") - # ].id - # ), ConfigurationParameterPossibleValueCreate( configuration_parameter_value_id=conf_param_values[ ( @@ -364,26 +213,12 @@ def generate_configurations( ].id ), ], - observation_variable_id=( - v.id if (v := variables.get("FD")) is not None else None - ), - observation_variable_aggregation_type=ObservationAggregationType.SEASONAL, ), CoverageConfigurationCreate( name="fd_annual_absolute_model_mpi_esm_lr_remo2009", - # display_name_english=_DISPLAY_NAME_ENGLISH, - # display_name_italian=_DISPLAY_NAME_ITALIAN, - # description_english=_DESCRIPTION_ENGLISH, - # description_italian=_DESCRIPTION_ITALIAN, netcdf_main_dataset_name="fd", wms_main_layer_name="fd", thredds_url_pattern="MPI-ESM-LR_REMO2009ymbc/clipped/ecafd_0_MPI-ESM-LR_REMO2009_{scenario}_ts19762100_ls_VFVG.nc", - # unit_english="days", - # unit_italian="gg", - # palette="default/seq-Blues-inv", - # color_scale_min=0, - # color_scale_max=200, - # data_precision=_DATA_PRECISION, climatic_indicator_id=climatic_indicators["fd-absolute-annual"], possible_values=[ ConfigurationParameterPossibleValueCreate( @@ -391,21 +226,6 @@ def generate_configurations( (CoreConfParamName.ARCHIVE.value, "forecast") ].id ), - # ConfigurationParameterPossibleValueCreate( - # configuration_parameter_value_id=conf_param_values[ - # (CoreConfParamName.CLIMATOLOGICAL_VARIABLE.value, "fd") - # ].id - # ), - # ConfigurationParameterPossibleValueCreate( - # configuration_parameter_value_id=conf_param_values[ - # (CoreConfParamName.AGGREGATION_PERIOD.value, "annual") - # ].id - # ), - # ConfigurationParameterPossibleValueCreate( - # configuration_parameter_value_id=conf_param_values[ - # (CoreConfParamName.MEASURE.value, "absolute") - # ].id - # ), ConfigurationParameterPossibleValueCreate( configuration_parameter_value_id=conf_param_values[ ( @@ -435,26 +255,12 @@ def generate_configurations( ].id ), ], - observation_variable_id=( - v.id if (v := variables.get("FD")) is not None else None - ), - observation_variable_aggregation_type=ObservationAggregationType.SEASONAL, ), CoverageConfigurationCreate( name="fd_annual_absolute_model_ensemble_upper_uncertainty", - # display_name_english=_DISPLAY_NAME_ENGLISH, - # display_name_italian=_DISPLAY_NAME_ITALIAN, - # description_english=_DESCRIPTION_ENGLISH, - # description_italian=_DESCRIPTION_ITALIAN, netcdf_main_dataset_name="fd_stdup", wms_main_layer_name="fd_stdup", thredds_url_pattern="ensymbc/std/clipped/ecafd_0_stdup_{scenario}_ts19762100_ls_VFVG.nc", - # unit_english="days", - # unit_italian="gg", - # palette="default/seq-Blues-inv", - # color_scale_min=0, - # color_scale_max=200, - # data_precision=_DATA_PRECISION, climatic_indicator_id=climatic_indicators["fd-absolute-annual"], possible_values=[ ConfigurationParameterPossibleValueCreate( @@ -462,21 +268,6 @@ def generate_configurations( (CoreConfParamName.ARCHIVE.value, "forecast") ].id ), - # ConfigurationParameterPossibleValueCreate( - # configuration_parameter_value_id=conf_param_values[ - # (CoreConfParamName.CLIMATOLOGICAL_VARIABLE.value, "fd") - # ].id - # ), - # ConfigurationParameterPossibleValueCreate( - # configuration_parameter_value_id=conf_param_values[ - # (CoreConfParamName.AGGREGATION_PERIOD.value, "annual") - # ].id - # ), - # ConfigurationParameterPossibleValueCreate( - # configuration_parameter_value_id=conf_param_values[ - # (CoreConfParamName.MEASURE.value, "absolute") - # ].id - # ), ConfigurationParameterPossibleValueCreate( configuration_parameter_value_id=conf_param_values[ (CoreConfParamName.CLIMATOLOGICAL_MODEL.value, "model_ensemble") @@ -511,19 +302,9 @@ def generate_configurations( ), CoverageConfigurationCreate( name="fd_annual_absolute_model_ensemble_lower_uncertainty", - # display_name_english=_DISPLAY_NAME_ENGLISH, - # display_name_italian=_DISPLAY_NAME_ITALIAN, - # description_english=_DESCRIPTION_ENGLISH, - # description_italian=_DESCRIPTION_ITALIAN, netcdf_main_dataset_name="fd_stddown", wms_main_layer_name="fd_stddown", thredds_url_pattern="ensymbc/std/clipped/ecafd_0_stddown_{scenario}_ts19762100_ls_VFVG.nc", - # unit_english="days", - # unit_italian="gg", - # palette="default/seq-Blues-inv", - # color_scale_min=0, - # color_scale_max=200, - # data_precision=_DATA_PRECISION, climatic_indicator_id=climatic_indicators["fd-absolute-annual"], possible_values=[ ConfigurationParameterPossibleValueCreate( @@ -531,21 +312,6 @@ def generate_configurations( (CoreConfParamName.ARCHIVE.value, "forecast") ].id ), - # ConfigurationParameterPossibleValueCreate( - # configuration_parameter_value_id=conf_param_values[ - # (CoreConfParamName.CLIMATOLOGICAL_VARIABLE.value, "fd") - # ].id - # ), - # ConfigurationParameterPossibleValueCreate( - # configuration_parameter_value_id=conf_param_values[ - # (CoreConfParamName.AGGREGATION_PERIOD.value, "annual") - # ].id - # ), - # ConfigurationParameterPossibleValueCreate( - # configuration_parameter_value_id=conf_param_values[ - # (CoreConfParamName.MEASURE.value, "absolute") - # ].id - # ), ConfigurationParameterPossibleValueCreate( configuration_parameter_value_id=conf_param_values[ (CoreConfParamName.CLIMATOLOGICAL_MODEL.value, "model_ensemble") @@ -580,20 +346,10 @@ def generate_configurations( ), CoverageConfigurationCreate( name="fd_30yr_anomaly_annual_agree_model_ensemble", - # display_name_english=_DISPLAY_NAME_ENGLISH, - # display_name_italian=_DISPLAY_NAME_ITALIAN, - # description_english=_DESCRIPTION_ENGLISH, - # description_italian=_DESCRIPTION_ITALIAN, netcdf_main_dataset_name="fd", wms_main_layer_name="fd-uncertainty_group", wms_secondary_layer_name="fd", thredds_url_pattern="ensembletwbc/std/clipped/ecafdan_0_avgagree_{time_window}_{scenario}_ls_VFVG.nc", - # unit_english="days", - # unit_italian="gg", - # palette="uncert-stippled/seq-YlOrRd-inv", - # color_scale_min=-85, - # color_scale_max=5, - # data_precision=_DATA_PRECISION, climatic_indicator_id=climatic_indicators["fd-anomaly-thirty_year"], possible_values=[ ConfigurationParameterPossibleValueCreate( @@ -601,21 +357,6 @@ def generate_configurations( (CoreConfParamName.ARCHIVE.value, "forecast") ].id ), - # ConfigurationParameterPossibleValueCreate( - # configuration_parameter_value_id=conf_param_values[ - # (CoreConfParamName.CLIMATOLOGICAL_VARIABLE.value, "fd") - # ].id - # ), - # ConfigurationParameterPossibleValueCreate( - # configuration_parameter_value_id=conf_param_values[ - # (CoreConfParamName.AGGREGATION_PERIOD.value, "30yr") - # ].id - # ), - # ConfigurationParameterPossibleValueCreate( - # configuration_parameter_value_id=conf_param_values[ - # (CoreConfParamName.MEASURE.value, "anomaly") - # ].id - # ), ConfigurationParameterPossibleValueCreate( configuration_parameter_value_id=conf_param_values[ (CoreConfParamName.CLIMATOLOGICAL_MODEL.value, "model_ensemble") @@ -655,19 +396,9 @@ def generate_configurations( ), CoverageConfigurationCreate( name="fd_30yr_anomaly_annual_model_ec_earth_cclm4_8_17", - # display_name_english=_DISPLAY_NAME_ENGLISH, - # display_name_italian=_DISPLAY_NAME_ITALIAN, - # description_english=_DESCRIPTION_ENGLISH, - # description_italian=_DESCRIPTION_ITALIAN, netcdf_main_dataset_name="fd", wms_main_layer_name="fd", thredds_url_pattern="indici5rcm/clipped/ecafdan_0_EC-EARTH_CCLM4-8-17_{scenario}_{time_window}_ls_VFVG.nc", - # unit_english="days", - # unit_italian="gg", - # palette="default/seq-YlOrRd-inv", - # color_scale_min=-85, - # color_scale_max=5, - # data_precision=_DATA_PRECISION, climatic_indicator_id=climatic_indicators["fd-anomaly-thirty_year"], possible_values=[ ConfigurationParameterPossibleValueCreate( @@ -675,21 +406,6 @@ def generate_configurations( (CoreConfParamName.ARCHIVE.value, "forecast") ].id ), - # ConfigurationParameterPossibleValueCreate( - # configuration_parameter_value_id=conf_param_values[ - # (CoreConfParamName.CLIMATOLOGICAL_VARIABLE.value, "fd") - # ].id - # ), - # ConfigurationParameterPossibleValueCreate( - # configuration_parameter_value_id=conf_param_values[ - # (CoreConfParamName.AGGREGATION_PERIOD.value, "30yr") - # ].id - # ), - # ConfigurationParameterPossibleValueCreate( - # configuration_parameter_value_id=conf_param_values[ - # (CoreConfParamName.MEASURE.value, "anomaly") - # ].id - # ), ConfigurationParameterPossibleValueCreate( configuration_parameter_value_id=conf_param_values[ ( @@ -732,19 +448,9 @@ def generate_configurations( ), CoverageConfigurationCreate( name="fd_30yr_anomaly_annual_model_ec_earth_racmo22e", - # display_name_english=_DISPLAY_NAME_ENGLISH, - # display_name_italian=_DISPLAY_NAME_ITALIAN, - # description_english=_DESCRIPTION_ENGLISH, - # description_italian=_DESCRIPTION_ITALIAN, netcdf_main_dataset_name="fd", wms_main_layer_name="fd", thredds_url_pattern="indici5rcm/clipped/ecafdan_0_EC-EARTH_RACMO22E_{scenario}_{time_window}_ls_VFVG.nc", - # unit_english="days", - # unit_italian="gg", - # palette="default/seq-YlOrRd-inv", - # color_scale_min=-85, - # color_scale_max=5, - # data_precision=_DATA_PRECISION, climatic_indicator_id=climatic_indicators["fd-anomaly-thirty_year"], possible_values=[ ConfigurationParameterPossibleValueCreate( @@ -752,21 +458,6 @@ def generate_configurations( (CoreConfParamName.ARCHIVE.value, "forecast") ].id ), - # ConfigurationParameterPossibleValueCreate( - # configuration_parameter_value_id=conf_param_values[ - # (CoreConfParamName.CLIMATOLOGICAL_VARIABLE.value, "fd") - # ].id - # ), - # ConfigurationParameterPossibleValueCreate( - # configuration_parameter_value_id=conf_param_values[ - # (CoreConfParamName.AGGREGATION_PERIOD.value, "30yr") - # ].id - # ), - # ConfigurationParameterPossibleValueCreate( - # configuration_parameter_value_id=conf_param_values[ - # (CoreConfParamName.MEASURE.value, "anomaly") - # ].id - # ), ConfigurationParameterPossibleValueCreate( configuration_parameter_value_id=conf_param_values[ ( @@ -809,19 +500,9 @@ def generate_configurations( ), CoverageConfigurationCreate( name="fd_30yr_anomaly_annual_model_ec_earth_rca4", - # display_name_english=_DISPLAY_NAME_ENGLISH, - # display_name_italian=_DISPLAY_NAME_ITALIAN, - # description_english=_DESCRIPTION_ENGLISH, - # description_italian=_DESCRIPTION_ITALIAN, netcdf_main_dataset_name="fd", wms_main_layer_name="fd", thredds_url_pattern="indici5rcm/clipped/ecafdan_0_EC-EARTH_RCA4_{scenario}_{time_window}_ls_VFVG.nc", - # unit_english="days", - # unit_italian="gg", - # palette="default/seq-YlOrRd-inv", - # color_scale_min=-85, - # color_scale_max=5, - # data_precision=_DATA_PRECISION, climatic_indicator_id=climatic_indicators["fd-anomaly-thirty_year"], possible_values=[ ConfigurationParameterPossibleValueCreate( @@ -829,21 +510,6 @@ def generate_configurations( (CoreConfParamName.ARCHIVE.value, "forecast") ].id ), - # ConfigurationParameterPossibleValueCreate( - # configuration_parameter_value_id=conf_param_values[ - # (CoreConfParamName.CLIMATOLOGICAL_VARIABLE.value, "fd") - # ].id - # ), - # ConfigurationParameterPossibleValueCreate( - # configuration_parameter_value_id=conf_param_values[ - # (CoreConfParamName.AGGREGATION_PERIOD.value, "30yr") - # ].id - # ), - # ConfigurationParameterPossibleValueCreate( - # configuration_parameter_value_id=conf_param_values[ - # (CoreConfParamName.MEASURE.value, "anomaly") - # ].id - # ), ConfigurationParameterPossibleValueCreate( configuration_parameter_value_id=conf_param_values[ (CoreConfParamName.CLIMATOLOGICAL_MODEL.value, "ec_earth_rca4") @@ -883,19 +549,9 @@ def generate_configurations( ), CoverageConfigurationCreate( name="fd_30yr_anomaly_annual_model_hadgem2_es_racmo22e", - # display_name_english=_DISPLAY_NAME_ENGLISH, - # display_name_italian=_DISPLAY_NAME_ITALIAN, - # description_english=_DESCRIPTION_ENGLISH, - # description_italian=_DESCRIPTION_ITALIAN, netcdf_main_dataset_name="fd", wms_main_layer_name="fd", thredds_url_pattern="indici5rcm/clipped/ecafdan_0_HadGEM2-ES_RACMO22E_{scenario}_{time_window}_ls_VFVG.nc", - # unit_english="days", - # unit_italian="gg", - # palette="default/seq-YlOrRd-inv", - # color_scale_min=-85, - # color_scale_max=5, - # data_precision=_DATA_PRECISION, climatic_indicator_id=climatic_indicators["fd-anomaly-thirty_year"], possible_values=[ ConfigurationParameterPossibleValueCreate( @@ -903,21 +559,6 @@ def generate_configurations( (CoreConfParamName.ARCHIVE.value, "forecast") ].id ), - # ConfigurationParameterPossibleValueCreate( - # configuration_parameter_value_id=conf_param_values[ - # (CoreConfParamName.CLIMATOLOGICAL_VARIABLE.value, "fd") - # ].id - # ), - # ConfigurationParameterPossibleValueCreate( - # configuration_parameter_value_id=conf_param_values[ - # (CoreConfParamName.AGGREGATION_PERIOD.value, "30yr") - # ].id - # ), - # ConfigurationParameterPossibleValueCreate( - # configuration_parameter_value_id=conf_param_values[ - # (CoreConfParamName.MEASURE.value, "anomaly") - # ].id - # ), ConfigurationParameterPossibleValueCreate( configuration_parameter_value_id=conf_param_values[ ( @@ -960,19 +601,9 @@ def generate_configurations( ), CoverageConfigurationCreate( name="fd_30yr_anomaly_annual_model_mpi_esm_lr_remo2009", - # display_name_english=_DISPLAY_NAME_ENGLISH, - # display_name_italian=_DISPLAY_NAME_ITALIAN, - # description_english=_DESCRIPTION_ENGLISH, - # description_italian=_DESCRIPTION_ITALIAN, netcdf_main_dataset_name="fd", wms_main_layer_name="fd", thredds_url_pattern="indici5rcm/clipped/ecafdan_0_MPI-ESM-LR_REMO2009_{scenario}_{time_window}_ls_VFVG.nc", - # unit_english="days", - # unit_italian="gg", - # palette="default/seq-YlOrRd-inv", - # color_scale_min=-85, - # color_scale_max=5, - # data_precision=_DATA_PRECISION, climatic_indicator_id=climatic_indicators["fd-anomaly-thirty_year"], possible_values=[ ConfigurationParameterPossibleValueCreate( @@ -980,21 +611,6 @@ def generate_configurations( (CoreConfParamName.ARCHIVE.value, "forecast") ].id ), - # ConfigurationParameterPossibleValueCreate( - # configuration_parameter_value_id=conf_param_values[ - # (CoreConfParamName.CLIMATOLOGICAL_VARIABLE.value, "fd") - # ].id - # ), - # ConfigurationParameterPossibleValueCreate( - # configuration_parameter_value_id=conf_param_values[ - # (CoreConfParamName.AGGREGATION_PERIOD.value, "30yr") - # ].id - # ), - # ConfigurationParameterPossibleValueCreate( - # configuration_parameter_value_id=conf_param_values[ - # (CoreConfParamName.MEASURE.value, "anomaly") - # ].id - # ), ConfigurationParameterPossibleValueCreate( configuration_parameter_value_id=conf_param_values[ ( diff --git a/arpav_ppcv/bootstrapper/coverage_configurations/forecast/hdds.py b/arpav_ppcv/bootstrapper/coverage_configurations/forecast/hdds.py index 875b33cb..6c3be5a0 100644 --- a/arpav_ppcv/bootstrapper/coverage_configurations/forecast/hdds.py +++ b/arpav_ppcv/bootstrapper/coverage_configurations/forecast/hdds.py @@ -1,45 +1,20 @@ -from ....schemas.base import ( - CoreConfParamName, - ObservationAggregationType, -) +from ....schemas.base import CoreConfParamName from ....schemas.coverages import ( CoverageConfigurationCreate, ConfigurationParameterPossibleValueCreate, ) -# _DISPLAY_NAME_ENGLISH = "Heating degree days" -# _DISPLAY_NAME_ITALIAN = "Gradi giorno di riscaldamento" -# _DESCRIPTION_ENGLISH = ( -# "Sum of 20°C minus the average daily temperature if the average daily temperature " -# "is less than 20°C" -# ) -# _DESCRIPTION_ITALIAN = ( -# "Somma di 20°C meno la temperatura media giornaliera se la temperatura media " -# "giornaliera è minore di 20°C" -# ) -# _DATA_PRECISION = 0 - def generate_configurations( conf_param_values, - variables, climatic_indicators: dict[str, int], ) -> list[CoverageConfigurationCreate]: return [ CoverageConfigurationCreate( name="hdds_annual_absolute_model_ensemble", - # display_name_english=_DISPLAY_NAME_ENGLISH, - # display_name_italian=_DISPLAY_NAME_ITALIAN, - # description_english=_DESCRIPTION_ENGLISH, - # description_italian=_DESCRIPTION_ITALIAN, netcdf_main_dataset_name="hdds", wms_main_layer_name="hdds", thredds_url_pattern="ensymbc/clipped_noppcne/hdds_20oc_avg_ts19762100_{scenario}_ls_VFVG.nc", - # unit_english="ºC", - # palette="default/seq-Blues-inv", - # color_scale_min=0, - # color_scale_max=7000, - # data_precision=_DATA_PRECISION, climatic_indicator_id=climatic_indicators["hdds-absolute-annual"], possible_values=[ ConfigurationParameterPossibleValueCreate( @@ -47,21 +22,6 @@ def generate_configurations( (CoreConfParamName.ARCHIVE.value, "forecast") ].id ), - # ConfigurationParameterPossibleValueCreate( - # configuration_parameter_value_id=conf_param_values[ - # (CoreConfParamName.CLIMATOLOGICAL_VARIABLE.value, "hdds") - # ].id - # ), - # ConfigurationParameterPossibleValueCreate( - # configuration_parameter_value_id=conf_param_values[ - # (CoreConfParamName.AGGREGATION_PERIOD.value, "annual") - # ].id - # ), - # ConfigurationParameterPossibleValueCreate( - # configuration_parameter_value_id=conf_param_values[ - # (CoreConfParamName.MEASURE.value, "absolute") - # ].id - # ), ConfigurationParameterPossibleValueCreate( configuration_parameter_value_id=conf_param_values[ (CoreConfParamName.CLIMATOLOGICAL_MODEL.value, "model_ensemble") @@ -88,25 +48,12 @@ def generate_configurations( ].id ), ], - observation_variable_id=( - v.id if (v := variables.get("HDD_it")) is not None else None - ), - observation_variable_aggregation_type=ObservationAggregationType.YEARLY, ), CoverageConfigurationCreate( name="hdds_annual_absolute_model_ec_earth_cclm4_8_17", - # display_name_english=_DISPLAY_NAME_ENGLISH, - # display_name_italian=_DISPLAY_NAME_ITALIAN, - # description_english=_DESCRIPTION_ENGLISH, - # description_italian=_DESCRIPTION_ITALIAN, netcdf_main_dataset_name="hdds", wms_main_layer_name="hdds", thredds_url_pattern="EC-EARTH_CCLM4-8-17ymbc/clipped_noppcne/hdds_20oc_EC-EARTH_CCLM4-8-17_{scenario}_ts19762100_ls_VFVG.nc", - # unit_english="ºC", - # palette="default/seq-Blues-inv", - # color_scale_min=0, - # color_scale_max=7000, - # data_precision=_DATA_PRECISION, climatic_indicator_id=climatic_indicators["hdds-absolute-annual"], possible_values=[ ConfigurationParameterPossibleValueCreate( @@ -114,21 +61,6 @@ def generate_configurations( (CoreConfParamName.ARCHIVE.value, "forecast") ].id ), - # ConfigurationParameterPossibleValueCreate( - # configuration_parameter_value_id=conf_param_values[ - # (CoreConfParamName.CLIMATOLOGICAL_VARIABLE.value, "hdds") - # ].id - # ), - # ConfigurationParameterPossibleValueCreate( - # configuration_parameter_value_id=conf_param_values[ - # (CoreConfParamName.AGGREGATION_PERIOD.value, "annual") - # ].id - # ), - # ConfigurationParameterPossibleValueCreate( - # configuration_parameter_value_id=conf_param_values[ - # (CoreConfParamName.MEASURE.value, "absolute") - # ].id - # ), ConfigurationParameterPossibleValueCreate( configuration_parameter_value_id=conf_param_values[ ( @@ -161,18 +93,9 @@ def generate_configurations( ), CoverageConfigurationCreate( name="hdds_annual_absolute_model_ec_earth_racmo22e", - # display_name_english=_DISPLAY_NAME_ENGLISH, - # display_name_italian=_DISPLAY_NAME_ITALIAN, - # description_english=_DESCRIPTION_ENGLISH, - # description_italian=_DESCRIPTION_ITALIAN, netcdf_main_dataset_name="hdds", wms_main_layer_name="hdds", thredds_url_pattern="EC-EARTH_RACMO22Eymbc/clipped_noppcne/hdds_20oc_EC-EARTH_RACMO22E_{scenario}_ts19762100_ls_VFVG.nc", - # unit_english="ºC", - # palette="default/seq-Blues-inv", - # color_scale_min=0, - # color_scale_max=7000, - # data_precision=_DATA_PRECISION, climatic_indicator_id=climatic_indicators["hdds-absolute-annual"], possible_values=[ ConfigurationParameterPossibleValueCreate( @@ -180,21 +103,6 @@ def generate_configurations( (CoreConfParamName.ARCHIVE.value, "forecast") ].id ), - # ConfigurationParameterPossibleValueCreate( - # configuration_parameter_value_id=conf_param_values[ - # (CoreConfParamName.CLIMATOLOGICAL_VARIABLE.value, "hdds") - # ].id - # ), - # ConfigurationParameterPossibleValueCreate( - # configuration_parameter_value_id=conf_param_values[ - # (CoreConfParamName.AGGREGATION_PERIOD.value, "annual") - # ].id - # ), - # ConfigurationParameterPossibleValueCreate( - # configuration_parameter_value_id=conf_param_values[ - # (CoreConfParamName.MEASURE.value, "absolute") - # ].id - # ), ConfigurationParameterPossibleValueCreate( configuration_parameter_value_id=conf_param_values[ ( @@ -227,18 +135,9 @@ def generate_configurations( ), CoverageConfigurationCreate( name="hdds_annual_absolute_model_ec_earth_rca4", - # display_name_english=_DISPLAY_NAME_ENGLISH, - # display_name_italian=_DISPLAY_NAME_ITALIAN, - # description_english=_DESCRIPTION_ENGLISH, - # description_italian=_DESCRIPTION_ITALIAN, netcdf_main_dataset_name="hdds", wms_main_layer_name="hdds", thredds_url_pattern="EC-EARTH_RCA4ymbc/clipped_noppcne/hdds_20oc_EC-EARTH_RCA4_{scenario}_ts19762100_ls_VFVG.nc", - # unit_english="ºC", - # palette="default/seq-Blues-inv", - # color_scale_min=0, - # color_scale_max=7000, - # data_precision=_DATA_PRECISION, climatic_indicator_id=climatic_indicators["hdds-absolute-annual"], possible_values=[ ConfigurationParameterPossibleValueCreate( @@ -246,21 +145,6 @@ def generate_configurations( (CoreConfParamName.ARCHIVE.value, "forecast") ].id ), - # ConfigurationParameterPossibleValueCreate( - # configuration_parameter_value_id=conf_param_values[ - # (CoreConfParamName.CLIMATOLOGICAL_VARIABLE.value, "hdds") - # ].id - # ), - # ConfigurationParameterPossibleValueCreate( - # configuration_parameter_value_id=conf_param_values[ - # (CoreConfParamName.AGGREGATION_PERIOD.value, "annual") - # ].id - # ), - # ConfigurationParameterPossibleValueCreate( - # configuration_parameter_value_id=conf_param_values[ - # (CoreConfParamName.MEASURE.value, "absolute") - # ].id - # ), ConfigurationParameterPossibleValueCreate( configuration_parameter_value_id=conf_param_values[ (CoreConfParamName.CLIMATOLOGICAL_MODEL.value, "ec_earth_rca4") @@ -290,18 +174,9 @@ def generate_configurations( ), CoverageConfigurationCreate( name="hdds_annual_absolute_model_hadgem2_es_racmo22e", - # display_name_english=_DISPLAY_NAME_ENGLISH, - # display_name_italian=_DISPLAY_NAME_ITALIAN, - # description_english=_DESCRIPTION_ENGLISH, - # description_italian=_DESCRIPTION_ITALIAN, netcdf_main_dataset_name="hdds", wms_main_layer_name="hdds", thredds_url_pattern="HadGEM2-ES_RACMO22Eymbc/clipped_noppcne/hdds_20oc_HadGEM2-ES_RACMO22E_{scenario}_ts19762100_ls_VFVG.nc", - # unit_english="ºC", - # palette="default/seq-Blues-inv", - # color_scale_min=0, - # color_scale_max=7000, - # data_precision=_DATA_PRECISION, climatic_indicator_id=climatic_indicators["hdds-absolute-annual"], possible_values=[ ConfigurationParameterPossibleValueCreate( @@ -309,21 +184,6 @@ def generate_configurations( (CoreConfParamName.ARCHIVE.value, "forecast") ].id ), - # ConfigurationParameterPossibleValueCreate( - # configuration_parameter_value_id=conf_param_values[ - # (CoreConfParamName.CLIMATOLOGICAL_VARIABLE.value, "hdds") - # ].id - # ), - # ConfigurationParameterPossibleValueCreate( - # configuration_parameter_value_id=conf_param_values[ - # (CoreConfParamName.AGGREGATION_PERIOD.value, "annual") - # ].id - # ), - # ConfigurationParameterPossibleValueCreate( - # configuration_parameter_value_id=conf_param_values[ - # (CoreConfParamName.MEASURE.value, "absolute") - # ].id - # ), ConfigurationParameterPossibleValueCreate( configuration_parameter_value_id=conf_param_values[ ( @@ -356,18 +216,9 @@ def generate_configurations( ), CoverageConfigurationCreate( name="hdds_annual_absolute_model_mpi_esm_lr_remo2009", - # display_name_english=_DISPLAY_NAME_ENGLISH, - # display_name_italian=_DISPLAY_NAME_ITALIAN, - # description_english=_DESCRIPTION_ENGLISH, - # description_italian=_DESCRIPTION_ITALIAN, netcdf_main_dataset_name="hdds", wms_main_layer_name="hdds", thredds_url_pattern="MPI-ESM-LR_REMO2009ymbc/clipped_noppcne/hdds_20oc_MPI-ESM-LR_REMO2009_{scenario}_ts19762100_ls_VFVG.nc", - # unit_english="ºC", - # palette="default/seq-Blues-inv", - # color_scale_min=0, - # color_scale_max=7000, - # data_precision=_DATA_PRECISION, climatic_indicator_id=climatic_indicators["hdds-absolute-annual"], possible_values=[ ConfigurationParameterPossibleValueCreate( @@ -375,21 +226,6 @@ def generate_configurations( (CoreConfParamName.ARCHIVE.value, "forecast") ].id ), - # ConfigurationParameterPossibleValueCreate( - # configuration_parameter_value_id=conf_param_values[ - # (CoreConfParamName.CLIMATOLOGICAL_VARIABLE.value, "hdds") - # ].id - # ), - # ConfigurationParameterPossibleValueCreate( - # configuration_parameter_value_id=conf_param_values[ - # (CoreConfParamName.AGGREGATION_PERIOD.value, "annual") - # ].id - # ), - # ConfigurationParameterPossibleValueCreate( - # configuration_parameter_value_id=conf_param_values[ - # (CoreConfParamName.MEASURE.value, "absolute") - # ].id - # ), ConfigurationParameterPossibleValueCreate( configuration_parameter_value_id=conf_param_values[ ( @@ -422,18 +258,9 @@ def generate_configurations( ), CoverageConfigurationCreate( name="hdds_annual_absolute_model_ensemble_upper_uncertainty", - # display_name_english=_DISPLAY_NAME_ENGLISH, - # display_name_italian=_DISPLAY_NAME_ITALIAN, - # description_english=_DESCRIPTION_ENGLISH, - # description_italian=_DESCRIPTION_ITALIAN, netcdf_main_dataset_name="hdds_stdup", wms_main_layer_name="hdds_stdup", thredds_url_pattern="ensymbc/std/clipped/hdds_20oc_stdup_ts19762100_{scenario}_ls_VFVG.nc", - # unit_english="ºC", - # palette="default/seq-Blues-inv", - # color_scale_min=0, - # color_scale_max=7000, - # data_precision=_DATA_PRECISION, climatic_indicator_id=climatic_indicators["hdds-absolute-annual"], possible_values=[ ConfigurationParameterPossibleValueCreate( @@ -441,21 +268,6 @@ def generate_configurations( (CoreConfParamName.ARCHIVE.value, "forecast") ].id ), - # ConfigurationParameterPossibleValueCreate( - # configuration_parameter_value_id=conf_param_values[ - # (CoreConfParamName.CLIMATOLOGICAL_VARIABLE.value, "hdds") - # ].id - # ), - # ConfigurationParameterPossibleValueCreate( - # configuration_parameter_value_id=conf_param_values[ - # (CoreConfParamName.AGGREGATION_PERIOD.value, "annual") - # ].id - # ), - # ConfigurationParameterPossibleValueCreate( - # configuration_parameter_value_id=conf_param_values[ - # (CoreConfParamName.MEASURE.value, "absolute") - # ].id - # ), ConfigurationParameterPossibleValueCreate( configuration_parameter_value_id=conf_param_values[ (CoreConfParamName.CLIMATOLOGICAL_MODEL.value, "model_ensemble") @@ -490,18 +302,9 @@ def generate_configurations( ), CoverageConfigurationCreate( name="hdds_annual_absolute_model_ensemble_lower_uncertainty", - # display_name_english=_DISPLAY_NAME_ENGLISH, - # display_name_italian=_DISPLAY_NAME_ITALIAN, - # description_english=_DESCRIPTION_ENGLISH, - # description_italian=_DESCRIPTION_ITALIAN, netcdf_main_dataset_name="hdds_stddown", wms_main_layer_name="hdds_stddown", thredds_url_pattern="ensymbc/std/clipped/hdds_20oc_stddown_ts19762100_{scenario}_ls_VFVG.nc", - # unit_english="ºC", - # palette="default/seq-Blues-inv", - # color_scale_min=0, - # color_scale_max=7000, - # data_precision=_DATA_PRECISION, climatic_indicator_id=climatic_indicators["hdds-absolute-annual"], possible_values=[ ConfigurationParameterPossibleValueCreate( @@ -509,21 +312,6 @@ def generate_configurations( (CoreConfParamName.ARCHIVE.value, "forecast") ].id ), - # ConfigurationParameterPossibleValueCreate( - # configuration_parameter_value_id=conf_param_values[ - # (CoreConfParamName.CLIMATOLOGICAL_VARIABLE.value, "hdds") - # ].id - # ), - # ConfigurationParameterPossibleValueCreate( - # configuration_parameter_value_id=conf_param_values[ - # (CoreConfParamName.AGGREGATION_PERIOD.value, "annual") - # ].id - # ), - # ConfigurationParameterPossibleValueCreate( - # configuration_parameter_value_id=conf_param_values[ - # (CoreConfParamName.MEASURE.value, "absolute") - # ].id - # ), ConfigurationParameterPossibleValueCreate( configuration_parameter_value_id=conf_param_values[ (CoreConfParamName.CLIMATOLOGICAL_MODEL.value, "model_ensemble") @@ -556,22 +344,12 @@ def generate_configurations( ), ], ), - # --- CoverageConfigurationCreate( name="hdds_30yr_anomaly_annual_agree_model_ensemble", - # display_name_english=_DISPLAY_NAME_ENGLISH, - # display_name_italian=_DISPLAY_NAME_ITALIAN, - # description_english=_DESCRIPTION_ENGLISH, - # description_italian=_DESCRIPTION_ITALIAN, netcdf_main_dataset_name="hdds", wms_main_layer_name="hdds-uncertainty_group", wms_secondary_layer_name="hdds", thredds_url_pattern="ensembletwbc/std/clipped/hdds_an_20oc_avgagree_{time_window}_{scenario}_ls_VFVG.nc", - # unit_english="ºC", - # palette="uncert-stippled/seq-YlOrRd-inv", - # color_scale_min=-2000, - # color_scale_max=0, - # data_precision=_DATA_PRECISION, climatic_indicator_id=climatic_indicators["hdds-anomaly-thirty_year"], possible_values=[ ConfigurationParameterPossibleValueCreate( @@ -579,21 +357,6 @@ def generate_configurations( (CoreConfParamName.ARCHIVE.value, "forecast") ].id ), - # ConfigurationParameterPossibleValueCreate( - # configuration_parameter_value_id=conf_param_values[ - # (CoreConfParamName.CLIMATOLOGICAL_VARIABLE.value, "hdds") - # ].id - # ), - # ConfigurationParameterPossibleValueCreate( - # configuration_parameter_value_id=conf_param_values[ - # (CoreConfParamName.AGGREGATION_PERIOD.value, "30yr") - # ].id - # ), - # ConfigurationParameterPossibleValueCreate( - # configuration_parameter_value_id=conf_param_values[ - # (CoreConfParamName.MEASURE.value, "anomaly") - # ].id - # ), ConfigurationParameterPossibleValueCreate( configuration_parameter_value_id=conf_param_values[ (CoreConfParamName.CLIMATOLOGICAL_MODEL.value, "model_ensemble") @@ -633,18 +396,9 @@ def generate_configurations( ), CoverageConfigurationCreate( name="hdds_30yr_anomaly_annual_model_ec_earth_cclm4_8_17", - # display_name_english=_DISPLAY_NAME_ENGLISH, - # display_name_italian=_DISPLAY_NAME_ITALIAN, - # description_english=_DESCRIPTION_ENGLISH, - # description_italian=_DESCRIPTION_ITALIAN, netcdf_main_dataset_name="hdds", wms_main_layer_name="hdds", thredds_url_pattern="indici5rcm/clipped_noppcne/hdds_an_20oc_EC-EARTH_CCLM4-8-17_{scenario}_{time_window}_ls_VFVG.nc", - # unit_english="ºC", - # palette="default/seq-YlOrRd-inv", - # color_scale_min=-2000, - # color_scale_max=0, - # data_precision=_DATA_PRECISION, climatic_indicator_id=climatic_indicators["hdds-anomaly-thirty_year"], possible_values=[ ConfigurationParameterPossibleValueCreate( @@ -652,21 +406,6 @@ def generate_configurations( (CoreConfParamName.ARCHIVE.value, "forecast") ].id ), - # ConfigurationParameterPossibleValueCreate( - # configuration_parameter_value_id=conf_param_values[ - # (CoreConfParamName.CLIMATOLOGICAL_VARIABLE.value, "hdds") - # ].id - # ), - # ConfigurationParameterPossibleValueCreate( - # configuration_parameter_value_id=conf_param_values[ - # (CoreConfParamName.AGGREGATION_PERIOD.value, "30yr") - # ].id - # ), - # ConfigurationParameterPossibleValueCreate( - # configuration_parameter_value_id=conf_param_values[ - # (CoreConfParamName.MEASURE.value, "anomaly") - # ].id - # ), ConfigurationParameterPossibleValueCreate( configuration_parameter_value_id=conf_param_values[ ( @@ -709,18 +448,9 @@ def generate_configurations( ), CoverageConfigurationCreate( name="hdds_30yr_anomaly_annual_model_ec_earth_racmo22e", - # display_name_english=_DISPLAY_NAME_ENGLISH, - # display_name_italian=_DISPLAY_NAME_ITALIAN, - # description_english=_DESCRIPTION_ENGLISH, - # description_italian=_DESCRIPTION_ITALIAN, netcdf_main_dataset_name="hdds", wms_main_layer_name="hdds", thredds_url_pattern="indici5rcm/clipped_noppcne/hdds_an_20oc_EC-EARTH_RACMO22E_{scenario}_{time_window}_ls_VFVG.nc", - # unit_english="ºC", - # palette="default/seq-YlOrRd-inv", - # color_scale_min=-2000, - # color_scale_max=0, - # data_precision=_DATA_PRECISION, climatic_indicator_id=climatic_indicators["hdds-anomaly-thirty_year"], possible_values=[ ConfigurationParameterPossibleValueCreate( @@ -728,21 +458,6 @@ def generate_configurations( (CoreConfParamName.ARCHIVE.value, "forecast") ].id ), - # ConfigurationParameterPossibleValueCreate( - # configuration_parameter_value_id=conf_param_values[ - # (CoreConfParamName.CLIMATOLOGICAL_VARIABLE.value, "hdds") - # ].id - # ), - # ConfigurationParameterPossibleValueCreate( - # configuration_parameter_value_id=conf_param_values[ - # (CoreConfParamName.AGGREGATION_PERIOD.value, "30yr") - # ].id - # ), - # ConfigurationParameterPossibleValueCreate( - # configuration_parameter_value_id=conf_param_values[ - # (CoreConfParamName.MEASURE.value, "anomaly") - # ].id - # ), ConfigurationParameterPossibleValueCreate( configuration_parameter_value_id=conf_param_values[ ( @@ -785,18 +500,9 @@ def generate_configurations( ), CoverageConfigurationCreate( name="hdds_30yr_anomaly_annual_model_ec_earth_rca4", - # display_name_english=_DISPLAY_NAME_ENGLISH, - # display_name_italian=_DISPLAY_NAME_ITALIAN, - # description_english=_DESCRIPTION_ENGLISH, - # description_italian=_DESCRIPTION_ITALIAN, netcdf_main_dataset_name="hdds", wms_main_layer_name="hdds", thredds_url_pattern="indici5rcm/clipped_noppcne/hdds_an_20oc_EC-EARTH_RCA4_{scenario}_{time_window}_ls_VFVG.nc", - # unit_english="ºC", - # palette="default/seq-YlOrRd-inv", - # color_scale_min=-2000, - # color_scale_max=0, - # data_precision=_DATA_PRECISION, climatic_indicator_id=climatic_indicators["hdds-anomaly-thirty_year"], possible_values=[ ConfigurationParameterPossibleValueCreate( @@ -804,21 +510,6 @@ def generate_configurations( (CoreConfParamName.ARCHIVE.value, "forecast") ].id ), - # ConfigurationParameterPossibleValueCreate( - # configuration_parameter_value_id=conf_param_values[ - # (CoreConfParamName.CLIMATOLOGICAL_VARIABLE.value, "hdds") - # ].id - # ), - # ConfigurationParameterPossibleValueCreate( - # configuration_parameter_value_id=conf_param_values[ - # (CoreConfParamName.AGGREGATION_PERIOD.value, "30yr") - # ].id - # ), - # ConfigurationParameterPossibleValueCreate( - # configuration_parameter_value_id=conf_param_values[ - # (CoreConfParamName.MEASURE.value, "anomaly") - # ].id - # ), ConfigurationParameterPossibleValueCreate( configuration_parameter_value_id=conf_param_values[ (CoreConfParamName.CLIMATOLOGICAL_MODEL.value, "ec_earth_rca4") @@ -858,18 +549,9 @@ def generate_configurations( ), CoverageConfigurationCreate( name="hdds_30yr_anomaly_annual_model_hadgem2_es_racmo22e", - # display_name_english=_DISPLAY_NAME_ENGLISH, - # display_name_italian=_DISPLAY_NAME_ITALIAN, - # description_english=_DESCRIPTION_ENGLISH, - # description_italian=_DESCRIPTION_ITALIAN, netcdf_main_dataset_name="hdds", wms_main_layer_name="hdds", thredds_url_pattern="indici5rcm/clipped_noppcne/hdds_an_20oc_HadGEM2-ES_RACMO22E_{scenario}_{time_window}_ls_VFVG.nc", - # unit_english="ºC", - # palette="default/seq-YlOrRd-inv", - # color_scale_min=-2000, - # color_scale_max=0, - # data_precision=_DATA_PRECISION, climatic_indicator_id=climatic_indicators["hdds-anomaly-thirty_year"], possible_values=[ ConfigurationParameterPossibleValueCreate( @@ -877,21 +559,6 @@ def generate_configurations( (CoreConfParamName.ARCHIVE.value, "forecast") ].id ), - # ConfigurationParameterPossibleValueCreate( - # configuration_parameter_value_id=conf_param_values[ - # (CoreConfParamName.CLIMATOLOGICAL_VARIABLE.value, "hdds") - # ].id - # ), - # ConfigurationParameterPossibleValueCreate( - # configuration_parameter_value_id=conf_param_values[ - # (CoreConfParamName.AGGREGATION_PERIOD.value, "30yr") - # ].id - # ), - # ConfigurationParameterPossibleValueCreate( - # configuration_parameter_value_id=conf_param_values[ - # (CoreConfParamName.MEASURE.value, "anomaly") - # ].id - # ), ConfigurationParameterPossibleValueCreate( configuration_parameter_value_id=conf_param_values[ ( @@ -934,18 +601,9 @@ def generate_configurations( ), CoverageConfigurationCreate( name="hdds_30yr_anomaly_annual_model_mpi_esm_lr_remo2009", - # display_name_english=_DISPLAY_NAME_ENGLISH, - # display_name_italian=_DISPLAY_NAME_ITALIAN, - # description_english=_DESCRIPTION_ENGLISH, - # description_italian=_DESCRIPTION_ITALIAN, netcdf_main_dataset_name="hdds", wms_main_layer_name="hdds", thredds_url_pattern="indici5rcm/clipped_noppcne/hdds_an_20oc_MPI-ESM-LR_REMO2009_{scenario}_{time_window}_ls_VFVG.nc", - # unit_english="ºC", - # palette="default/seq-YlOrRd-inv", - # color_scale_min=-2000, - # color_scale_max=0, - # data_precision=_DATA_PRECISION, climatic_indicator_id=climatic_indicators["hdds-anomaly-thirty_year"], possible_values=[ ConfigurationParameterPossibleValueCreate( @@ -953,21 +611,6 @@ def generate_configurations( (CoreConfParamName.ARCHIVE.value, "forecast") ].id ), - # ConfigurationParameterPossibleValueCreate( - # configuration_parameter_value_id=conf_param_values[ - # (CoreConfParamName.CLIMATOLOGICAL_VARIABLE.value, "hdds") - # ].id - # ), - # ConfigurationParameterPossibleValueCreate( - # configuration_parameter_value_id=conf_param_values[ - # (CoreConfParamName.AGGREGATION_PERIOD.value, "30yr") - # ].id - # ), - # ConfigurationParameterPossibleValueCreate( - # configuration_parameter_value_id=conf_param_values[ - # (CoreConfParamName.MEASURE.value, "anomaly") - # ].id - # ), ConfigurationParameterPossibleValueCreate( configuration_parameter_value_id=conf_param_values[ ( diff --git a/arpav_ppcv/bootstrapper/coverage_configurations/forecast/hwdi.py b/arpav_ppcv/bootstrapper/coverage_configurations/forecast/hwdi.py index 5dad7858..b177a43e 100644 --- a/arpav_ppcv/bootstrapper/coverage_configurations/forecast/hwdi.py +++ b/arpav_ppcv/bootstrapper/coverage_configurations/forecast/hwdi.py @@ -4,18 +4,6 @@ ConfigurationParameterPossibleValueCreate, ) -# _DISPLAY_NAME_ENGLISH = "Duration of heat waves" -# _DISPLAY_NAME_ITALIAN = "Durata delle ondate di calore" -# _DESCRIPTION_ENGLISH = ( -# "Sequences of 5 consecutive days in which the temperature is 5°C higher than the " -# "reference average for that day of the year" -# ) -# _DESCRIPTION_ITALIAN = ( -# "Sequenze di 5 giorni consecutivi in cui la temperatura è maggiore di 5°C rispetto " -# "alla media di riferimento per quel giorno dell'anno" -# ) -# _DATA_PRECISION = 0 - def generate_configurations( conf_param_values, @@ -24,20 +12,10 @@ def generate_configurations( return [ CoverageConfigurationCreate( name="hwdi_30yr_anomaly_seasonal_agree_model_ensemble", - # display_name_english=_DISPLAY_NAME_ENGLISH, - # display_name_italian=_DISPLAY_NAME_ITALIAN, - # description_english=_DESCRIPTION_ENGLISH, - # description_italian=_DESCRIPTION_ITALIAN, netcdf_main_dataset_name="heat_wave_duration_index_wrt_mean_of_reference_period", wms_main_layer_name="heat_wave_duration_index_wrt_mean_of_reference_period-uncertainty_group", wms_secondary_layer_name="heat_wave_duration_index_wrt_mean_of_reference_period", thredds_url_pattern="ensembletwbc/std/clipped/heat_waves_anom_avgagree_55_{time_window}_{scenario}_{year_period}_VFVGTAA.nc", - # unit_english="days", - # unit_italian="gg", - # palette="uncert-stippled/seq-YlOrRd", - # color_scale_min=0, - # color_scale_max=50, - # data_precision=_DATA_PRECISION, climatic_indicator_id=climatic_indicators["hwdi-anomaly-thirty_year"], possible_values=[ ConfigurationParameterPossibleValueCreate( @@ -45,21 +23,6 @@ def generate_configurations( (CoreConfParamName.ARCHIVE.value, "forecast") ].id ), - # ConfigurationParameterPossibleValueCreate( - # configuration_parameter_value_id=conf_param_values[ - # (CoreConfParamName.CLIMATOLOGICAL_VARIABLE.value, "hwdi") - # ].id - # ), - # ConfigurationParameterPossibleValueCreate( - # configuration_parameter_value_id=conf_param_values[ - # (CoreConfParamName.AGGREGATION_PERIOD.value, "30yr") - # ].id - # ), - # ConfigurationParameterPossibleValueCreate( - # configuration_parameter_value_id=conf_param_values[ - # (CoreConfParamName.MEASURE.value, "anomaly") - # ].id - # ), ConfigurationParameterPossibleValueCreate( configuration_parameter_value_id=conf_param_values[ (CoreConfParamName.CLIMATOLOGICAL_MODEL.value, "model_ensemble") @@ -99,19 +62,9 @@ def generate_configurations( ), CoverageConfigurationCreate( name="hwdi_30yr_anomaly_seasonal_model_ec_earth_cclm4_8_17", - # display_name_english=_DISPLAY_NAME_ENGLISH, - # display_name_italian=_DISPLAY_NAME_ITALIAN, - # description_english=_DESCRIPTION_ENGLISH, - # description_italian=_DESCRIPTION_ITALIAN, netcdf_main_dataset_name="heat_wave_duration_index_wrt_mean_of_reference_period", wms_main_layer_name="heat_wave_duration_index_wrt_mean_of_reference_period", thredds_url_pattern="indici5rcm/clipped/heat_waves_anom_EC-EARTH_CCLM4-8-17_{scenario}_{year_period}_55_{time_window}_VFVGTAA.nc", - # unit_english="days", - # unit_italian="gg", - # palette="default/seq-YlOrRd", - # color_scale_min=0, - # color_scale_max=50, - # data_precision=_DATA_PRECISION, climatic_indicator_id=climatic_indicators["hwdi-anomaly-thirty_year"], possible_values=[ ConfigurationParameterPossibleValueCreate( @@ -119,21 +72,6 @@ def generate_configurations( (CoreConfParamName.ARCHIVE.value, "forecast") ].id ), - # ConfigurationParameterPossibleValueCreate( - # configuration_parameter_value_id=conf_param_values[ - # (CoreConfParamName.CLIMATOLOGICAL_VARIABLE.value, "hwdi") - # ].id - # ), - # ConfigurationParameterPossibleValueCreate( - # configuration_parameter_value_id=conf_param_values[ - # (CoreConfParamName.AGGREGATION_PERIOD.value, "30yr") - # ].id - # ), - # ConfigurationParameterPossibleValueCreate( - # configuration_parameter_value_id=conf_param_values[ - # (CoreConfParamName.MEASURE.value, "anomaly") - # ].id - # ), ConfigurationParameterPossibleValueCreate( configuration_parameter_value_id=conf_param_values[ ( @@ -176,19 +114,9 @@ def generate_configurations( ), CoverageConfigurationCreate( name="hwdi_30yr_anomaly_seasonal_model_ec_earth_racmo22e", - # display_name_english=_DISPLAY_NAME_ENGLISH, - # display_name_italian=_DISPLAY_NAME_ITALIAN, - # description_english=_DESCRIPTION_ENGLISH, - # description_italian=_DESCRIPTION_ITALIAN, netcdf_main_dataset_name="heat_wave_duration_index_wrt_mean_of_reference_period", wms_main_layer_name="heat_wave_duration_index_wrt_mean_of_reference_period", thredds_url_pattern="indici5rcm/clipped/heat_waves_anom_EC-EARTH_RACMO22E_{scenario}_{year_period}_55_{time_window}_VFVGTAA.nc", - # unit_english="days", - # unit_italian="gg", - # palette="default/seq-YlOrRd", - # color_scale_min=0, - # color_scale_max=50, - # data_precision=_DATA_PRECISION, climatic_indicator_id=climatic_indicators["hwdi-anomaly-thirty_year"], possible_values=[ ConfigurationParameterPossibleValueCreate( @@ -196,21 +124,6 @@ def generate_configurations( (CoreConfParamName.ARCHIVE.value, "forecast") ].id ), - # ConfigurationParameterPossibleValueCreate( - # configuration_parameter_value_id=conf_param_values[ - # (CoreConfParamName.CLIMATOLOGICAL_VARIABLE.value, "hwdi") - # ].id - # ), - # ConfigurationParameterPossibleValueCreate( - # configuration_parameter_value_id=conf_param_values[ - # (CoreConfParamName.AGGREGATION_PERIOD.value, "30yr") - # ].id - # ), - # ConfigurationParameterPossibleValueCreate( - # configuration_parameter_value_id=conf_param_values[ - # (CoreConfParamName.MEASURE.value, "anomaly") - # ].id - # ), ConfigurationParameterPossibleValueCreate( configuration_parameter_value_id=conf_param_values[ ( @@ -253,19 +166,9 @@ def generate_configurations( ), CoverageConfigurationCreate( name="hwdi_30yr_anomaly_seasonal_model_ec_earth_rca4", - # display_name_english=_DISPLAY_NAME_ENGLISH, - # display_name_italian=_DISPLAY_NAME_ITALIAN, - # description_english=_DESCRIPTION_ENGLISH, - # description_italian=_DESCRIPTION_ITALIAN, netcdf_main_dataset_name="heat_wave_duration_index_wrt_mean_of_reference_period", wms_main_layer_name="heat_wave_duration_index_wrt_mean_of_reference_period", thredds_url_pattern="indici5rcm/clipped/heat_waves_anom_EC-EARTH_RCA4_{scenario}_{year_period}_55_{time_window}_VFVGTAA.nc", - # unit_english="days", - # unit_italian="gg", - # palette="default/seq-YlOrRd", - # color_scale_min=0, - # color_scale_max=50, - # data_precision=_DATA_PRECISION, climatic_indicator_id=climatic_indicators["hwdi-anomaly-thirty_year"], possible_values=[ ConfigurationParameterPossibleValueCreate( @@ -273,21 +176,6 @@ def generate_configurations( (CoreConfParamName.ARCHIVE.value, "forecast") ].id ), - # ConfigurationParameterPossibleValueCreate( - # configuration_parameter_value_id=conf_param_values[ - # (CoreConfParamName.CLIMATOLOGICAL_VARIABLE.value, "hwdi") - # ].id - # ), - # ConfigurationParameterPossibleValueCreate( - # configuration_parameter_value_id=conf_param_values[ - # (CoreConfParamName.AGGREGATION_PERIOD.value, "30yr") - # ].id - # ), - # ConfigurationParameterPossibleValueCreate( - # configuration_parameter_value_id=conf_param_values[ - # (CoreConfParamName.MEASURE.value, "anomaly") - # ].id - # ), ConfigurationParameterPossibleValueCreate( configuration_parameter_value_id=conf_param_values[ (CoreConfParamName.CLIMATOLOGICAL_MODEL.value, "ec_earth_rca4") @@ -327,19 +215,9 @@ def generate_configurations( ), CoverageConfigurationCreate( name="hwdi_30yr_anomaly_seasonal_model_hadgem2_es_racmo22e", - # display_name_english=_DISPLAY_NAME_ENGLISH, - # display_name_italian=_DISPLAY_NAME_ITALIAN, - # description_english=_DESCRIPTION_ENGLISH, - # description_italian=_DESCRIPTION_ITALIAN, netcdf_main_dataset_name="heat_wave_duration_index_wrt_mean_of_reference_period", wms_main_layer_name="heat_wave_duration_index_wrt_mean_of_reference_period", thredds_url_pattern="indici5rcm/clipped/heat_waves_anom_HadGEM2-ES_RACMO22E_{scenario}_{year_period}_55_{time_window}_VFVGTAA.nc", - # unit_english="days", - # unit_italian="gg", - # palette="default/seq-YlOrRd", - # color_scale_min=0, - # color_scale_max=50, - # data_precision=_DATA_PRECISION, climatic_indicator_id=climatic_indicators["hwdi-anomaly-thirty_year"], possible_values=[ ConfigurationParameterPossibleValueCreate( @@ -347,21 +225,6 @@ def generate_configurations( (CoreConfParamName.ARCHIVE.value, "forecast") ].id ), - # ConfigurationParameterPossibleValueCreate( - # configuration_parameter_value_id=conf_param_values[ - # (CoreConfParamName.CLIMATOLOGICAL_VARIABLE.value, "hwdi") - # ].id - # ), - # ConfigurationParameterPossibleValueCreate( - # configuration_parameter_value_id=conf_param_values[ - # (CoreConfParamName.AGGREGATION_PERIOD.value, "30yr") - # ].id - # ), - # ConfigurationParameterPossibleValueCreate( - # configuration_parameter_value_id=conf_param_values[ - # (CoreConfParamName.MEASURE.value, "anomaly") - # ].id - # ), ConfigurationParameterPossibleValueCreate( configuration_parameter_value_id=conf_param_values[ ( @@ -404,19 +267,9 @@ def generate_configurations( ), CoverageConfigurationCreate( name="hwdi_30yr_anomaly_seasonal_model_mpi_esm_lr_remo2009", - # display_name_english=_DISPLAY_NAME_ENGLISH, - # display_name_italian=_DISPLAY_NAME_ITALIAN, - # description_english=_DESCRIPTION_ENGLISH, - # description_italian=_DESCRIPTION_ITALIAN, netcdf_main_dataset_name="heat_wave_duration_index_wrt_mean_of_reference_period", wms_main_layer_name="heat_wave_duration_index_wrt_mean_of_reference_period", thredds_url_pattern="indici5rcm/clipped/heat_waves_anom_MPI-ESM-LR_REMO2009_{scenario}_{year_period}_55_{time_window}_VFVGTAA.nc", - # unit_english="days", - # unit_italian="gg", - # palette="default/seq-YlOrRd", - # color_scale_min=0, - # color_scale_max=50, - # data_precision=_DATA_PRECISION, climatic_indicator_id=climatic_indicators["hwdi-anomaly-thirty_year"], possible_values=[ ConfigurationParameterPossibleValueCreate( @@ -424,21 +277,6 @@ def generate_configurations( (CoreConfParamName.ARCHIVE.value, "forecast") ].id ), - # ConfigurationParameterPossibleValueCreate( - # configuration_parameter_value_id=conf_param_values[ - # (CoreConfParamName.CLIMATOLOGICAL_VARIABLE.value, "hwdi") - # ].id - # ), - # ConfigurationParameterPossibleValueCreate( - # configuration_parameter_value_id=conf_param_values[ - # (CoreConfParamName.AGGREGATION_PERIOD.value, "30yr") - # ].id - # ), - # ConfigurationParameterPossibleValueCreate( - # configuration_parameter_value_id=conf_param_values[ - # (CoreConfParamName.MEASURE.value, "anomaly") - # ].id - # ), ConfigurationParameterPossibleValueCreate( configuration_parameter_value_id=conf_param_values[ ( diff --git a/arpav_ppcv/bootstrapper/coverage_configurations/forecast/pr.py b/arpav_ppcv/bootstrapper/coverage_configurations/forecast/pr.py index ce6b25b1..b056ab79 100644 --- a/arpav_ppcv/bootstrapper/coverage_configurations/forecast/pr.py +++ b/arpav_ppcv/bootstrapper/coverage_configurations/forecast/pr.py @@ -1,39 +1,20 @@ -from ....schemas.base import ( - CoreConfParamName, - ObservationAggregationType, -) +from ....schemas.base import CoreConfParamName from ....schemas.coverages import ( CoverageConfigurationCreate, ConfigurationParameterPossibleValueCreate, ) -# _DISPLAY_NAME_ENGLISH = "Precipiation" -# _DISPLAY_NAME_ITALIAN = "Precipitazione" -# _DESCRIPTION_ENGLISH = "Daily precipitation near the ground" -# _DESCRIPTION_ITALIAN = "Precipitazioni giornaliere in prossimità del suolo" -# _DATA_PRECISION = 0 - def generate_configurations( conf_param_values, - variables, climatic_indicators: dict[str, int], ) -> list[CoverageConfigurationCreate]: return [ CoverageConfigurationCreate( name="pr_seasonal_anomaly_model_ensemble", - # display_name_english=_DISPLAY_NAME_ENGLISH, - # display_name_italian=_DISPLAY_NAME_ITALIAN, - # description_english=_DESCRIPTION_ENGLISH, - # description_italian=_DESCRIPTION_ITALIAN, netcdf_main_dataset_name="pr", wms_main_layer_name="pr", thredds_url_pattern="ens5ym/clipped/pr_anom_pp_ts_{scenario}_{year_period}_VFVGTAA.nc", - # unit_english="%", - # palette="default/div-BrBG", - # color_scale_min=-40, - # color_scale_max=40, - # data_precision=_DATA_PRECISION, climatic_indicator_id=climatic_indicators["pr-anomaly-annual"], possible_values=[ ConfigurationParameterPossibleValueCreate( @@ -41,21 +22,6 @@ def generate_configurations( (CoreConfParamName.ARCHIVE.value, "forecast") ].id ), - # ConfigurationParameterPossibleValueCreate( - # configuration_parameter_value_id=conf_param_values[ - # (CoreConfParamName.CLIMATOLOGICAL_VARIABLE.value, "pr") - # ].id - # ), - # ConfigurationParameterPossibleValueCreate( - # configuration_parameter_value_id=conf_param_values[ - # (CoreConfParamName.AGGREGATION_PERIOD.value, "annual") - # ].id - # ), - # ConfigurationParameterPossibleValueCreate( - # configuration_parameter_value_id=conf_param_values[ - # (CoreConfParamName.MEASURE.value, "anomaly") - # ].id - # ), ConfigurationParameterPossibleValueCreate( configuration_parameter_value_id=conf_param_values[ (CoreConfParamName.CLIMATOLOGICAL_MODEL.value, "model_ensemble") @@ -100,18 +66,9 @@ def generate_configurations( ), CoverageConfigurationCreate( name="pr_seasonal_anomaly_model_ec_earth_cclm4_8_17", - # display_name_english=_DISPLAY_NAME_ENGLISH, - # display_name_italian=_DISPLAY_NAME_ITALIAN, - # description_english=_DESCRIPTION_ENGLISH, - # description_italian=_DESCRIPTION_ITALIAN, netcdf_main_dataset_name="pr", wms_main_layer_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_english="%", - # palette="default/div-BrBG", - # color_scale_min=-40, - # color_scale_max=40, - # data_precision=_DATA_PRECISION, climatic_indicator_id=climatic_indicators["pr-anomaly-annual"], possible_values=[ ConfigurationParameterPossibleValueCreate( @@ -119,21 +76,6 @@ def generate_configurations( (CoreConfParamName.ARCHIVE.value, "forecast") ].id ), - # ConfigurationParameterPossibleValueCreate( - # configuration_parameter_value_id=conf_param_values[ - # (CoreConfParamName.CLIMATOLOGICAL_VARIABLE.value, "pr") - # ].id - # ), - # ConfigurationParameterPossibleValueCreate( - # configuration_parameter_value_id=conf_param_values[ - # (CoreConfParamName.AGGREGATION_PERIOD.value, "annual") - # ].id - # ), - # ConfigurationParameterPossibleValueCreate( - # configuration_parameter_value_id=conf_param_values[ - # (CoreConfParamName.MEASURE.value, "anomaly") - # ].id - # ), ConfigurationParameterPossibleValueCreate( configuration_parameter_value_id=conf_param_values[ ( @@ -181,18 +123,9 @@ def generate_configurations( ), CoverageConfigurationCreate( name="pr_seasonal_anomaly_model_ec_earth_racmo22e", - # display_name_english=_DISPLAY_NAME_ENGLISH, - # display_name_italian=_DISPLAY_NAME_ITALIAN, - # description_english=_DESCRIPTION_ENGLISH, - # description_italian=_DESCRIPTION_ITALIAN, netcdf_main_dataset_name="pr", wms_main_layer_name="pr", thredds_url_pattern="EC-EARTH_RACMO22Eym/clipped/pr_EC-EARTH_RACMO22E_{scenario}_{year_period}_anomaly_pp_percentage_VFVGTAA.nc", - # unit_english="%", - # palette="default/div-BrBG", - # color_scale_min=-40, - # color_scale_max=40, - # data_precision=_DATA_PRECISION, climatic_indicator_id=climatic_indicators["pr-anomaly-annual"], possible_values=[ ConfigurationParameterPossibleValueCreate( @@ -200,21 +133,6 @@ def generate_configurations( (CoreConfParamName.ARCHIVE.value, "forecast") ].id ), - # ConfigurationParameterPossibleValueCreate( - # configuration_parameter_value_id=conf_param_values[ - # (CoreConfParamName.CLIMATOLOGICAL_VARIABLE.value, "pr") - # ].id - # ), - # ConfigurationParameterPossibleValueCreate( - # configuration_parameter_value_id=conf_param_values[ - # (CoreConfParamName.AGGREGATION_PERIOD.value, "annual") - # ].id - # ), - # ConfigurationParameterPossibleValueCreate( - # configuration_parameter_value_id=conf_param_values[ - # (CoreConfParamName.MEASURE.value, "anomaly") - # ].id - # ), ConfigurationParameterPossibleValueCreate( configuration_parameter_value_id=conf_param_values[ ( @@ -262,18 +180,9 @@ def generate_configurations( ), CoverageConfigurationCreate( name="pr_seasonal_anomaly_model_ec_earth_rca4", - # display_name_english=_DISPLAY_NAME_ENGLISH, - # display_name_italian=_DISPLAY_NAME_ITALIAN, - # description_english=_DESCRIPTION_ENGLISH, - # description_italian=_DESCRIPTION_ITALIAN, netcdf_main_dataset_name="pr", wms_main_layer_name="pr", thredds_url_pattern="EC-EARTH_RCA4ym/clipped/pr_EC-EARTH_RCA4_{scenario}_{year_period}_anomaly_pp_percentage_VFVGTAA.nc", - # unit_english="%", - # palette="default/div-BrBG", - # color_scale_min=-40, - # color_scale_max=40, - # data_precision=_DATA_PRECISION, climatic_indicator_id=climatic_indicators["pr-anomaly-annual"], possible_values=[ ConfigurationParameterPossibleValueCreate( @@ -281,21 +190,6 @@ def generate_configurations( (CoreConfParamName.ARCHIVE.value, "forecast") ].id ), - # ConfigurationParameterPossibleValueCreate( - # configuration_parameter_value_id=conf_param_values[ - # (CoreConfParamName.CLIMATOLOGICAL_VARIABLE.value, "pr") - # ].id - # ), - # ConfigurationParameterPossibleValueCreate( - # configuration_parameter_value_id=conf_param_values[ - # (CoreConfParamName.AGGREGATION_PERIOD.value, "annual") - # ].id - # ), - # ConfigurationParameterPossibleValueCreate( - # configuration_parameter_value_id=conf_param_values[ - # (CoreConfParamName.MEASURE.value, "anomaly") - # ].id - # ), ConfigurationParameterPossibleValueCreate( configuration_parameter_value_id=conf_param_values[ (CoreConfParamName.CLIMATOLOGICAL_MODEL.value, "ec_earth_rca4") @@ -340,18 +234,9 @@ def generate_configurations( ), CoverageConfigurationCreate( name="pr_seasonal_anomaly_model_hadgem2_es_racmo22e", - # display_name_english=_DISPLAY_NAME_ENGLISH, - # display_name_italian=_DISPLAY_NAME_ITALIAN, - # description_english=_DESCRIPTION_ENGLISH, - # description_italian=_DESCRIPTION_ITALIAN, netcdf_main_dataset_name="pr", wms_main_layer_name="pr", thredds_url_pattern="HadGEM2-ES_RACMO22Eym/clipped/pr_HadGEM2-ES_RACMO22E_{scenario}_{year_period}_anomaly_pp_percentage_VFVGTAA.nc", - # unit_english="%", - # palette="default/div-BrBG", - # color_scale_min=-40, - # color_scale_max=40, - # data_precision=_DATA_PRECISION, climatic_indicator_id=climatic_indicators["pr-anomaly-annual"], possible_values=[ ConfigurationParameterPossibleValueCreate( @@ -359,21 +244,6 @@ def generate_configurations( (CoreConfParamName.ARCHIVE.value, "forecast") ].id ), - # ConfigurationParameterPossibleValueCreate( - # configuration_parameter_value_id=conf_param_values[ - # (CoreConfParamName.CLIMATOLOGICAL_VARIABLE.value, "pr") - # ].id - # ), - # ConfigurationParameterPossibleValueCreate( - # configuration_parameter_value_id=conf_param_values[ - # (CoreConfParamName.AGGREGATION_PERIOD.value, "annual") - # ].id - # ), - # ConfigurationParameterPossibleValueCreate( - # configuration_parameter_value_id=conf_param_values[ - # (CoreConfParamName.MEASURE.value, "anomaly") - # ].id - # ), ConfigurationParameterPossibleValueCreate( configuration_parameter_value_id=conf_param_values[ ( @@ -421,18 +291,9 @@ def generate_configurations( ), CoverageConfigurationCreate( name="pr_seasonal_anomaly_model_mpi_esm_lr_remo2009", - # display_name_english=_DISPLAY_NAME_ENGLISH, - # display_name_italian=_DISPLAY_NAME_ITALIAN, - # description_english=_DESCRIPTION_ENGLISH, - # description_italian=_DESCRIPTION_ITALIAN, netcdf_main_dataset_name="pr", wms_main_layer_name="pr", thredds_url_pattern="MPI-ESM-LR_REMO2009ym/clipped/pr_MPI-ESM-LR_REMO2009_{scenario}_{year_period}_anomaly_pp_percentage_VFVGTAA.nc", - # unit_english="%", - # palette="default/div-BrBG", - # color_scale_min=-40, - # color_scale_max=40, - # data_precision=_DATA_PRECISION, climatic_indicator_id=climatic_indicators["pr-anomaly-annual"], possible_values=[ ConfigurationParameterPossibleValueCreate( @@ -440,21 +301,6 @@ def generate_configurations( (CoreConfParamName.ARCHIVE.value, "forecast") ].id ), - # ConfigurationParameterPossibleValueCreate( - # configuration_parameter_value_id=conf_param_values[ - # (CoreConfParamName.CLIMATOLOGICAL_VARIABLE.value, "pr") - # ].id - # ), - # ConfigurationParameterPossibleValueCreate( - # configuration_parameter_value_id=conf_param_values[ - # (CoreConfParamName.AGGREGATION_PERIOD.value, "annual") - # ].id - # ), - # ConfigurationParameterPossibleValueCreate( - # configuration_parameter_value_id=conf_param_values[ - # (CoreConfParamName.MEASURE.value, "anomaly") - # ].id - # ), ConfigurationParameterPossibleValueCreate( configuration_parameter_value_id=conf_param_values[ ( @@ -502,18 +348,9 @@ def generate_configurations( ), CoverageConfigurationCreate( name="pr_seasonal_anomaly_model_ensemble_upper_uncertainty", - # display_name_english=_DISPLAY_NAME_ENGLISH, - # display_name_italian=_DISPLAY_NAME_ITALIAN, - # description_english=_DESCRIPTION_ENGLISH, - # description_italian=_DESCRIPTION_ITALIAN, netcdf_main_dataset_name="pr_stdup", wms_main_layer_name="pr_stdup", thredds_url_pattern="ens5ym/std/clipped/pr_anom_stdup_pp_ts_{scenario}_{year_period}_VFVGTAA.nc", - # unit_english="%", - # palette="default/seq-YlOrRd", - # color_scale_min=0, - # color_scale_max=0, - # data_precision=_DATA_PRECISION, climatic_indicator_id=climatic_indicators["pr-anomaly-annual"], possible_values=[ ConfigurationParameterPossibleValueCreate( @@ -521,21 +358,6 @@ def generate_configurations( (CoreConfParamName.ARCHIVE.value, "forecast") ].id ), - # ConfigurationParameterPossibleValueCreate( - # configuration_parameter_value_id=conf_param_values[ - # (CoreConfParamName.CLIMATOLOGICAL_VARIABLE.value, "pr") - # ].id - # ), - # ConfigurationParameterPossibleValueCreate( - # configuration_parameter_value_id=conf_param_values[ - # (CoreConfParamName.AGGREGATION_PERIOD.value, "annual") - # ].id - # ), - # ConfigurationParameterPossibleValueCreate( - # configuration_parameter_value_id=conf_param_values[ - # (CoreConfParamName.MEASURE.value, "anomaly") - # ].id - # ), ConfigurationParameterPossibleValueCreate( configuration_parameter_value_id=conf_param_values[ (CoreConfParamName.CLIMATOLOGICAL_MODEL.value, "model_ensemble") @@ -585,18 +407,9 @@ def generate_configurations( ), CoverageConfigurationCreate( name="pr_seasonal_anomaly_model_ensemble_lower_uncertainty", - # display_name_english=_DISPLAY_NAME_ENGLISH, - # display_name_italian=_DISPLAY_NAME_ITALIAN, - # description_english=_DESCRIPTION_ENGLISH, - # description_italian=_DESCRIPTION_ITALIAN, netcdf_main_dataset_name="pr_stddown", wms_main_layer_name="pr_stddown", thredds_url_pattern="ens5ym/std/clipped/pr_anom_stddown_pp_ts_{scenario}_{year_period}_VFVGTAA.nc", - # unit_english="%", - # palette="default/seq-YlOrRd", - # color_scale_min=0, - # color_scale_max=0, - # data_precision=_DATA_PRECISION, climatic_indicator_id=climatic_indicators["pr-anomaly-annual"], possible_values=[ ConfigurationParameterPossibleValueCreate( @@ -604,21 +417,6 @@ def generate_configurations( (CoreConfParamName.ARCHIVE.value, "forecast") ].id ), - # ConfigurationParameterPossibleValueCreate( - # configuration_parameter_value_id=conf_param_values[ - # (CoreConfParamName.CLIMATOLOGICAL_VARIABLE.value, "pr") - # ].id - # ), - # ConfigurationParameterPossibleValueCreate( - # configuration_parameter_value_id=conf_param_values[ - # (CoreConfParamName.AGGREGATION_PERIOD.value, "annual") - # ].id - # ), - # ConfigurationParameterPossibleValueCreate( - # configuration_parameter_value_id=conf_param_values[ - # (CoreConfParamName.MEASURE.value, "anomaly") - # ].id - # ), ConfigurationParameterPossibleValueCreate( configuration_parameter_value_id=conf_param_values[ (CoreConfParamName.CLIMATOLOGICAL_MODEL.value, "model_ensemble") @@ -668,18 +466,9 @@ def generate_configurations( ), CoverageConfigurationCreate( name="pr_seasonal_absolute_model_ensemble", - # display_name_english=_DISPLAY_NAME_ENGLISH, - # display_name_italian=_DISPLAY_NAME_ITALIAN, - # description_english=_DESCRIPTION_ENGLISH, - # description_italian=_DESCRIPTION_ITALIAN, netcdf_main_dataset_name="pr", wms_main_layer_name="pr", thredds_url_pattern="ensymbc/clipped/pr_avg_{scenario}_{year_period}_ts19762100_ls_VFVGTAA.nc", - # unit_english="mm", - # palette="default/seq-BuYl-inv", - # color_scale_min=0, - # color_scale_max=800, - # data_precision=_DATA_PRECISION, climatic_indicator_id=climatic_indicators["pr-absolute-annual"], possible_values=[ ConfigurationParameterPossibleValueCreate( @@ -687,21 +476,6 @@ def generate_configurations( (CoreConfParamName.ARCHIVE.value, "forecast") ].id ), - # ConfigurationParameterPossibleValueCreate( - # configuration_parameter_value_id=conf_param_values[ - # (CoreConfParamName.CLIMATOLOGICAL_VARIABLE.value, "pr") - # ].id - # ), - # ConfigurationParameterPossibleValueCreate( - # configuration_parameter_value_id=conf_param_values[ - # (CoreConfParamName.AGGREGATION_PERIOD.value, "annual") - # ].id - # ), - # ConfigurationParameterPossibleValueCreate( - # configuration_parameter_value_id=conf_param_values[ - # (CoreConfParamName.MEASURE.value, "absolute") - # ].id - # ), ConfigurationParameterPossibleValueCreate( configuration_parameter_value_id=conf_param_values[ (CoreConfParamName.CLIMATOLOGICAL_MODEL.value, "model_ensemble") @@ -743,25 +517,12 @@ def generate_configurations( ].id ), ], - observation_variable_id=( - v.id if (v := variables.get("PRCPTOT")) is not None else None - ), - observation_variable_aggregation_type=ObservationAggregationType.SEASONAL, ), CoverageConfigurationCreate( name="pr_annual_absolute_model_ensemble", - # display_name_english=_DISPLAY_NAME_ENGLISH, - # display_name_italian=_DISPLAY_NAME_ITALIAN, - # description_english=_DESCRIPTION_ENGLISH, - # description_italian=_DESCRIPTION_ITALIAN, netcdf_main_dataset_name="pr", wms_main_layer_name="pr", thredds_url_pattern="ensymbc/clipped/pr_avg_{scenario}_ts19762100_ls_VFVGTAA.nc", - # unit_english="mm", - # palette="default/seq-BuYl-inv", - # color_scale_min=0, - # color_scale_max=3200, - # data_precision=_DATA_PRECISION, climatic_indicator_id=climatic_indicators["pr-absolute-annual"], possible_values=[ ConfigurationParameterPossibleValueCreate( @@ -769,21 +530,6 @@ def generate_configurations( (CoreConfParamName.ARCHIVE.value, "forecast") ].id ), - # ConfigurationParameterPossibleValueCreate( - # configuration_parameter_value_id=conf_param_values[ - # (CoreConfParamName.CLIMATOLOGICAL_VARIABLE.value, "pr") - # ].id - # ), - # ConfigurationParameterPossibleValueCreate( - # configuration_parameter_value_id=conf_param_values[ - # (CoreConfParamName.AGGREGATION_PERIOD.value, "annual") - # ].id - # ), - # ConfigurationParameterPossibleValueCreate( - # configuration_parameter_value_id=conf_param_values[ - # (CoreConfParamName.MEASURE.value, "absolute") - # ].id - # ), ConfigurationParameterPossibleValueCreate( configuration_parameter_value_id=conf_param_values[ (CoreConfParamName.CLIMATOLOGICAL_MODEL.value, "model_ensemble") @@ -810,25 +556,12 @@ def generate_configurations( ].id ), ], - observation_variable_id=( - v.id if (v := variables.get("PRCPTOT")) is not None else None - ), - observation_variable_aggregation_type=ObservationAggregationType.YEARLY, ), CoverageConfigurationCreate( name="pr_seasonal_absolute_model_ec_earth_cclm4_8_17", - # display_name_english=_DISPLAY_NAME_ENGLISH, - # display_name_italian=_DISPLAY_NAME_ITALIAN, - # description_english=_DESCRIPTION_ENGLISH, - # description_italian=_DESCRIPTION_ITALIAN, netcdf_main_dataset_name="pr", wms_main_layer_name="pr", thredds_url_pattern="EC-EARTH_CCLM4-8-17ymbc/clipped/pr_EC-EARTH_CCLM4-8-17_{scenario}_{year_period}_ts_ls_VFVGTAA.nc", - # unit_english="%", - # palette="default/seq-BuYl-inv", - # color_scale_min=0, - # color_scale_max=800, - # data_precision=_DATA_PRECISION, climatic_indicator_id=climatic_indicators["pr-absolute-annual"], possible_values=[ ConfigurationParameterPossibleValueCreate( @@ -836,21 +569,6 @@ def generate_configurations( (CoreConfParamName.ARCHIVE.value, "forecast") ].id ), - # ConfigurationParameterPossibleValueCreate( - # configuration_parameter_value_id=conf_param_values[ - # (CoreConfParamName.CLIMATOLOGICAL_VARIABLE.value, "pr") - # ].id - # ), - # ConfigurationParameterPossibleValueCreate( - # configuration_parameter_value_id=conf_param_values[ - # (CoreConfParamName.AGGREGATION_PERIOD.value, "annual") - # ].id - # ), - # ConfigurationParameterPossibleValueCreate( - # configuration_parameter_value_id=conf_param_values[ - # (CoreConfParamName.MEASURE.value, "absolute") - # ].id - # ), ConfigurationParameterPossibleValueCreate( configuration_parameter_value_id=conf_param_values[ ( @@ -895,25 +613,12 @@ def generate_configurations( ].id ), ], - observation_variable_id=( - v.id if (v := variables.get("PRCPTOT")) is not None else None - ), - observation_variable_aggregation_type=ObservationAggregationType.SEASONAL, ), CoverageConfigurationCreate( name="pr_annual_absolute_model_ec_earth_cclm4_8_17", - # display_name_english=_DISPLAY_NAME_ENGLISH, - # display_name_italian=_DISPLAY_NAME_ITALIAN, - # description_english=_DESCRIPTION_ENGLISH, - # description_italian=_DESCRIPTION_ITALIAN, wms_main_layer_name="pr", netcdf_main_dataset_name="pr", thredds_url_pattern="EC-EARTH_CCLM4-8-17ymbc/clipped/pr_EC-EARTH_CCLM4-8-17_{scenario}_ts_ls_VFVGTAA.nc", - # unit_english="%", - # palette="default/seq-BuYl-inv", - # color_scale_min=0, - # color_scale_max=800, - # data_precision=_DATA_PRECISION, climatic_indicator_id=climatic_indicators["pr-absolute-annual"], possible_values=[ ConfigurationParameterPossibleValueCreate( @@ -921,21 +626,6 @@ def generate_configurations( (CoreConfParamName.ARCHIVE.value, "forecast") ].id ), - # ConfigurationParameterPossibleValueCreate( - # configuration_parameter_value_id=conf_param_values[ - # (CoreConfParamName.CLIMATOLOGICAL_VARIABLE.value, "pr") - # ].id - # ), - # ConfigurationParameterPossibleValueCreate( - # configuration_parameter_value_id=conf_param_values[ - # (CoreConfParamName.AGGREGATION_PERIOD.value, "annual") - # ].id - # ), - # ConfigurationParameterPossibleValueCreate( - # configuration_parameter_value_id=conf_param_values[ - # (CoreConfParamName.MEASURE.value, "absolute") - # ].id - # ), ConfigurationParameterPossibleValueCreate( configuration_parameter_value_id=conf_param_values[ ( @@ -965,25 +655,12 @@ def generate_configurations( ].id ), ], - observation_variable_id=( - v.id if (v := variables.get("PRCPTOT")) is not None else None - ), - observation_variable_aggregation_type=ObservationAggregationType.YEARLY, ), CoverageConfigurationCreate( name="pr_seasonal_absolute_model_ec_earth_racmo22e", - # display_name_english=_DISPLAY_NAME_ENGLISH, - # display_name_italian=_DISPLAY_NAME_ITALIAN, - # description_english=_DESCRIPTION_ENGLISH, - # description_italian=_DESCRIPTION_ITALIAN, netcdf_main_dataset_name="pr", wms_main_layer_name="pr", thredds_url_pattern="EC-EARTH_RACMO22Eymbc/clipped/pr_EC-EARTH_RACMO22E_{scenario}_{year_period}_ts_ls_VFVGTAA.nc", - # unit_english="%", - # palette="default/seq-BuYl-inv", - # color_scale_min=0, - # color_scale_max=800, - # data_precision=_DATA_PRECISION, climatic_indicator_id=climatic_indicators["pr-absolute-annual"], possible_values=[ ConfigurationParameterPossibleValueCreate( @@ -991,21 +668,6 @@ def generate_configurations( (CoreConfParamName.ARCHIVE.value, "forecast") ].id ), - # ConfigurationParameterPossibleValueCreate( - # configuration_parameter_value_id=conf_param_values[ - # (CoreConfParamName.CLIMATOLOGICAL_VARIABLE.value, "pr") - # ].id - # ), - # ConfigurationParameterPossibleValueCreate( - # configuration_parameter_value_id=conf_param_values[ - # (CoreConfParamName.AGGREGATION_PERIOD.value, "annual") - # ].id - # ), - # ConfigurationParameterPossibleValueCreate( - # configuration_parameter_value_id=conf_param_values[ - # (CoreConfParamName.MEASURE.value, "absolute") - # ].id - # ), ConfigurationParameterPossibleValueCreate( configuration_parameter_value_id=conf_param_values[ ( @@ -1050,25 +712,12 @@ def generate_configurations( ].id ), ], - observation_variable_id=( - v.id if (v := variables.get("PRCPTOT")) is not None else None - ), - observation_variable_aggregation_type=ObservationAggregationType.SEASONAL, ), CoverageConfigurationCreate( name="pr_annual_absolute_model_ec_earth_racmo22e", - # display_name_english=_DISPLAY_NAME_ENGLISH, - # display_name_italian=_DISPLAY_NAME_ITALIAN, - # description_english=_DESCRIPTION_ENGLISH, - # description_italian=_DESCRIPTION_ITALIAN, netcdf_main_dataset_name="pr", wms_main_layer_name="pr", thredds_url_pattern="EC-EARTH_RACMO22Eymbc/clipped/pr_EC-EARTH_RACMO22E_{scenario}_ts_ls_VFVGTAA.nc", - # unit_english="%", - # palette="default/seq-BuYl-inv", - # color_scale_min=0, - # color_scale_max=3200, - # data_precision=_DATA_PRECISION, climatic_indicator_id=climatic_indicators["pr-absolute-annual"], possible_values=[ ConfigurationParameterPossibleValueCreate( @@ -1076,21 +725,6 @@ def generate_configurations( (CoreConfParamName.ARCHIVE.value, "forecast") ].id ), - # ConfigurationParameterPossibleValueCreate( - # configuration_parameter_value_id=conf_param_values[ - # (CoreConfParamName.CLIMATOLOGICAL_VARIABLE.value, "pr") - # ].id - # ), - # ConfigurationParameterPossibleValueCreate( - # configuration_parameter_value_id=conf_param_values[ - # (CoreConfParamName.AGGREGATION_PERIOD.value, "annual") - # ].id - # ), - # ConfigurationParameterPossibleValueCreate( - # configuration_parameter_value_id=conf_param_values[ - # (CoreConfParamName.MEASURE.value, "absolute") - # ].id - # ), ConfigurationParameterPossibleValueCreate( configuration_parameter_value_id=conf_param_values[ ( @@ -1120,25 +754,12 @@ def generate_configurations( ].id ), ], - observation_variable_id=( - v.id if (v := variables.get("PRCPTOT")) is not None else None - ), - observation_variable_aggregation_type=ObservationAggregationType.YEARLY, ), CoverageConfigurationCreate( name="pr_seasonal_absolute_model_ec_earth_rca4", - # display_name_english=_DISPLAY_NAME_ENGLISH, - # display_name_italian=_DISPLAY_NAME_ITALIAN, - # description_english=_DESCRIPTION_ENGLISH, - # description_italian=_DESCRIPTION_ITALIAN, netcdf_main_dataset_name="pr", wms_main_layer_name="pr", thredds_url_pattern="EC-EARTH_RCA4ymbc/clipped/pr_EC-EARTH_RCA4_{scenario}_{year_period}_ts_ls_VFVGTAA.nc", - # unit_english="%", - # palette="default/seq-BuYl-inv", - # color_scale_min=0, - # color_scale_max=800, - # data_precision=_DATA_PRECISION, climatic_indicator_id=climatic_indicators["pr-absolute-annual"], possible_values=[ ConfigurationParameterPossibleValueCreate( @@ -1146,21 +767,6 @@ def generate_configurations( (CoreConfParamName.ARCHIVE.value, "forecast") ].id ), - # ConfigurationParameterPossibleValueCreate( - # configuration_parameter_value_id=conf_param_values[ - # (CoreConfParamName.CLIMATOLOGICAL_VARIABLE.value, "pr") - # ].id - # ), - # ConfigurationParameterPossibleValueCreate( - # configuration_parameter_value_id=conf_param_values[ - # (CoreConfParamName.AGGREGATION_PERIOD.value, "annual") - # ].id - # ), - # ConfigurationParameterPossibleValueCreate( - # configuration_parameter_value_id=conf_param_values[ - # (CoreConfParamName.MEASURE.value, "absolute") - # ].id - # ), ConfigurationParameterPossibleValueCreate( configuration_parameter_value_id=conf_param_values[ (CoreConfParamName.CLIMATOLOGICAL_MODEL.value, "ec_earth_rca4") @@ -1202,25 +808,12 @@ def generate_configurations( ].id ), ], - observation_variable_id=( - v.id if (v := variables.get("PRCPTOT")) is not None else None - ), - observation_variable_aggregation_type=ObservationAggregationType.SEASONAL, ), CoverageConfigurationCreate( name="pr_annual_absolute_model_ec_earth_rca4", - # display_name_english=_DISPLAY_NAME_ENGLISH, - # display_name_italian=_DISPLAY_NAME_ITALIAN, - # description_english=_DESCRIPTION_ENGLISH, - # description_italian=_DESCRIPTION_ITALIAN, netcdf_main_dataset_name="pr", wms_main_layer_name="pr", thredds_url_pattern="EC-EARTH_RCA4ymbc/clipped/pr_EC-EARTH_RCA4_{scenario}_ts_ls_VFVGTAA.nc", - # unit_english="%", - # palette="default/seq-BuYl-inv", - # color_scale_min=0, - # color_scale_max=3200, - # data_precision=_DATA_PRECISION, climatic_indicator_id=climatic_indicators["pr-absolute-annual"], possible_values=[ ConfigurationParameterPossibleValueCreate( @@ -1228,21 +821,6 @@ def generate_configurations( (CoreConfParamName.ARCHIVE.value, "forecast") ].id ), - # ConfigurationParameterPossibleValueCreate( - # configuration_parameter_value_id=conf_param_values[ - # (CoreConfParamName.CLIMATOLOGICAL_VARIABLE.value, "pr") - # ].id - # ), - # ConfigurationParameterPossibleValueCreate( - # configuration_parameter_value_id=conf_param_values[ - # (CoreConfParamName.AGGREGATION_PERIOD.value, "annual") - # ].id - # ), - # ConfigurationParameterPossibleValueCreate( - # configuration_parameter_value_id=conf_param_values[ - # (CoreConfParamName.MEASURE.value, "absolute") - # ].id - # ), ConfigurationParameterPossibleValueCreate( configuration_parameter_value_id=conf_param_values[ (CoreConfParamName.CLIMATOLOGICAL_MODEL.value, "ec_earth_rca4") @@ -1269,25 +847,12 @@ def generate_configurations( ].id ), ], - observation_variable_id=( - v.id if (v := variables.get("PRCPTOT")) is not None else None - ), - observation_variable_aggregation_type=ObservationAggregationType.YEARLY, ), CoverageConfigurationCreate( name="pr_seasonal_absolute_model_hadgem2_es_racmo22e", - # display_name_english=_DISPLAY_NAME_ENGLISH, - # display_name_italian=_DISPLAY_NAME_ITALIAN, - # description_english=_DESCRIPTION_ENGLISH, - # description_italian=_DESCRIPTION_ITALIAN, netcdf_main_dataset_name="pr", wms_main_layer_name="pr", thredds_url_pattern="HadGEM2-ES_RACMO22Eymbc/clipped/pr_HadGEM2-ES_RACMO22E_{scenario}_{year_period}_ts_ls_VFVGTAA.nc", - # unit_english="%", - # palette="default/seq-BuYl-inv", - # color_scale_min=0, - # color_scale_max=800, - # data_precision=_DATA_PRECISION, climatic_indicator_id=climatic_indicators["pr-absolute-annual"], possible_values=[ ConfigurationParameterPossibleValueCreate( @@ -1295,21 +860,6 @@ def generate_configurations( (CoreConfParamName.ARCHIVE.value, "forecast") ].id ), - # ConfigurationParameterPossibleValueCreate( - # configuration_parameter_value_id=conf_param_values[ - # (CoreConfParamName.CLIMATOLOGICAL_VARIABLE.value, "pr") - # ].id - # ), - # ConfigurationParameterPossibleValueCreate( - # configuration_parameter_value_id=conf_param_values[ - # (CoreConfParamName.AGGREGATION_PERIOD.value, "annual") - # ].id - # ), - # ConfigurationParameterPossibleValueCreate( - # configuration_parameter_value_id=conf_param_values[ - # (CoreConfParamName.MEASURE.value, "absolute") - # ].id - # ), ConfigurationParameterPossibleValueCreate( configuration_parameter_value_id=conf_param_values[ ( @@ -1354,25 +904,12 @@ def generate_configurations( ].id ), ], - observation_variable_id=( - v.id if (v := variables.get("PRCPTOT")) is not None else None - ), - observation_variable_aggregation_type=ObservationAggregationType.SEASONAL, ), CoverageConfigurationCreate( name="pr_annual_absolute_model_hadgem2_es_racmo22e", - # display_name_english=_DISPLAY_NAME_ENGLISH, - # display_name_italian=_DISPLAY_NAME_ITALIAN, - # description_english=_DESCRIPTION_ENGLISH, - # description_italian=_DESCRIPTION_ITALIAN, netcdf_main_dataset_name="pr", wms_main_layer_name="pr", thredds_url_pattern="HadGEM2-ES_RACMO22Eymbc/clipped/pr_HadGEM2-ES_RACMO22E_{scenario}_ts_ls_VFVGTAA.nc", - # unit_english="%", - # palette="default/seq-BuYl-inv", - # color_scale_min=0, - # color_scale_max=3200, - # data_precision=_DATA_PRECISION, climatic_indicator_id=climatic_indicators["pr-absolute-annual"], possible_values=[ ConfigurationParameterPossibleValueCreate( @@ -1380,21 +917,6 @@ def generate_configurations( (CoreConfParamName.ARCHIVE.value, "forecast") ].id ), - # ConfigurationParameterPossibleValueCreate( - # configuration_parameter_value_id=conf_param_values[ - # (CoreConfParamName.CLIMATOLOGICAL_VARIABLE.value, "pr") - # ].id - # ), - # ConfigurationParameterPossibleValueCreate( - # configuration_parameter_value_id=conf_param_values[ - # (CoreConfParamName.AGGREGATION_PERIOD.value, "annual") - # ].id - # ), - # ConfigurationParameterPossibleValueCreate( - # configuration_parameter_value_id=conf_param_values[ - # (CoreConfParamName.MEASURE.value, "absolute") - # ].id - # ), ConfigurationParameterPossibleValueCreate( configuration_parameter_value_id=conf_param_values[ ( @@ -1424,25 +946,12 @@ def generate_configurations( ].id ), ], - observation_variable_id=( - v.id if (v := variables.get("PRCPTOT")) is not None else None - ), - observation_variable_aggregation_type=ObservationAggregationType.YEARLY, ), CoverageConfigurationCreate( name="pr_seasonal_absolute_model_mpi_esm_lr_remo2009", - # display_name_english=_DISPLAY_NAME_ENGLISH, - # display_name_italian=_DISPLAY_NAME_ITALIAN, - # description_english=_DESCRIPTION_ENGLISH, - # description_italian=_DESCRIPTION_ITALIAN, netcdf_main_dataset_name="pr", wms_main_layer_name="pr", thredds_url_pattern="MPI-ESM-LR_REMO2009ymbc/clipped/pr_MPI-ESM-LR_REMO2009_{scenario}_{year_period}_ts_ls_VFVGTAA.nc", - # unit_english="%", - # palette="default/seq-BuYl-inv", - # color_scale_min=0, - # color_scale_max=800, - # data_precision=_DATA_PRECISION, climatic_indicator_id=climatic_indicators["pr-absolute-annual"], possible_values=[ ConfigurationParameterPossibleValueCreate( @@ -1450,21 +959,6 @@ def generate_configurations( (CoreConfParamName.ARCHIVE.value, "forecast") ].id ), - # ConfigurationParameterPossibleValueCreate( - # configuration_parameter_value_id=conf_param_values[ - # (CoreConfParamName.CLIMATOLOGICAL_VARIABLE.value, "pr") - # ].id - # ), - # ConfigurationParameterPossibleValueCreate( - # configuration_parameter_value_id=conf_param_values[ - # (CoreConfParamName.AGGREGATION_PERIOD.value, "annual") - # ].id - # ), - # ConfigurationParameterPossibleValueCreate( - # configuration_parameter_value_id=conf_param_values[ - # (CoreConfParamName.MEASURE.value, "absolute") - # ].id - # ), ConfigurationParameterPossibleValueCreate( configuration_parameter_value_id=conf_param_values[ ( @@ -1509,25 +1003,12 @@ def generate_configurations( ].id ), ], - observation_variable_id=( - v.id if (v := variables.get("PRCPTOT")) is not None else None - ), - observation_variable_aggregation_type=ObservationAggregationType.SEASONAL, ), CoverageConfigurationCreate( name="pr_annual_absolute_model_mpi_esm_lr_remo2009", - # display_name_english=_DISPLAY_NAME_ENGLISH, - # display_name_italian=_DISPLAY_NAME_ITALIAN, - # description_english=_DESCRIPTION_ENGLISH, - # description_italian=_DESCRIPTION_ITALIAN, netcdf_main_dataset_name="pr", wms_main_layer_name="pr", thredds_url_pattern="MPI-ESM-LR_REMO2009ymbc/clipped/pr_MPI-ESM-LR_REMO2009_{scenario}_ts_ls_VFVGTAA.nc", - # unit_english="%", - # palette="default/seq-BuYl-inv", - # color_scale_min=0, - # color_scale_max=3200, - # data_precision=_DATA_PRECISION, climatic_indicator_id=climatic_indicators["pr-absolute-annual"], possible_values=[ ConfigurationParameterPossibleValueCreate( @@ -1535,21 +1016,6 @@ def generate_configurations( (CoreConfParamName.ARCHIVE.value, "forecast") ].id ), - # ConfigurationParameterPossibleValueCreate( - # configuration_parameter_value_id=conf_param_values[ - # (CoreConfParamName.CLIMATOLOGICAL_VARIABLE.value, "pr") - # ].id - # ), - # ConfigurationParameterPossibleValueCreate( - # configuration_parameter_value_id=conf_param_values[ - # (CoreConfParamName.AGGREGATION_PERIOD.value, "annual") - # ].id - # ), - # ConfigurationParameterPossibleValueCreate( - # configuration_parameter_value_id=conf_param_values[ - # (CoreConfParamName.MEASURE.value, "absolute") - # ].id - # ), ConfigurationParameterPossibleValueCreate( configuration_parameter_value_id=conf_param_values[ ( @@ -1579,25 +1045,12 @@ def generate_configurations( ].id ), ], - observation_variable_id=( - v.id if (v := variables.get("PRCPTOT")) is not None else None - ), - observation_variable_aggregation_type=ObservationAggregationType.YEARLY, ), CoverageConfigurationCreate( name="pr_seasonal_absolute_model_ensemble_upper_uncertainty", - # display_name_english=_DISPLAY_NAME_ENGLISH, - # display_name_italian=_DISPLAY_NAME_ITALIAN, - # description_english=_DESCRIPTION_ENGLISH, - # description_italian=_DESCRIPTION_ITALIAN, netcdf_main_dataset_name="pr_stdup", wms_main_layer_name="pr_stdup", thredds_url_pattern="ensymbc/std/clipped/pr_stdup_{scenario}_{year_period}_ts19762100_ls_VFVGTAA.nc", - # unit_english="mm", - # palette="default/seq-BuYl-inv", - # color_scale_min=0, - # color_scale_max=800, - # data_precision=_DATA_PRECISION, climatic_indicator_id=climatic_indicators["pr-absolute-annual"], possible_values=[ ConfigurationParameterPossibleValueCreate( @@ -1605,21 +1058,6 @@ def generate_configurations( (CoreConfParamName.ARCHIVE.value, "forecast") ].id ), - # ConfigurationParameterPossibleValueCreate( - # configuration_parameter_value_id=conf_param_values[ - # (CoreConfParamName.CLIMATOLOGICAL_VARIABLE.value, "pr") - # ].id - # ), - # ConfigurationParameterPossibleValueCreate( - # configuration_parameter_value_id=conf_param_values[ - # (CoreConfParamName.AGGREGATION_PERIOD.value, "annual") - # ].id - # ), - # ConfigurationParameterPossibleValueCreate( - # configuration_parameter_value_id=conf_param_values[ - # (CoreConfParamName.MEASURE.value, "absolute") - # ].id - # ), ConfigurationParameterPossibleValueCreate( configuration_parameter_value_id=conf_param_values[ (CoreConfParamName.CLIMATOLOGICAL_MODEL.value, "model_ensemble") @@ -1669,18 +1107,9 @@ def generate_configurations( ), CoverageConfigurationCreate( name="pr_seasonal_absolute_model_ensemble_lower_uncertainty", - # display_name_english=_DISPLAY_NAME_ENGLISH, - # display_name_italian=_DISPLAY_NAME_ITALIAN, - # description_english=_DESCRIPTION_ENGLISH, - # description_italian=_DESCRIPTION_ITALIAN, netcdf_main_dataset_name="pr_stddown", wms_main_layer_name="pr_stddown", thredds_url_pattern="ensymbc/std/clipped/pr_stddown_{scenario}_{year_period}_ts19762100_ls_VFVGTAA.nc", - # unit_english="mm", - # palette="default/seq-BuYl-inv", - # color_scale_min=0, - # color_scale_max=800, - # data_precision=_DATA_PRECISION, climatic_indicator_id=climatic_indicators["pr-absolute-annual"], possible_values=[ ConfigurationParameterPossibleValueCreate( @@ -1688,21 +1117,6 @@ def generate_configurations( (CoreConfParamName.ARCHIVE.value, "forecast") ].id ), - # ConfigurationParameterPossibleValueCreate( - # configuration_parameter_value_id=conf_param_values[ - # (CoreConfParamName.CLIMATOLOGICAL_VARIABLE.value, "pr") - # ].id - # ), - # ConfigurationParameterPossibleValueCreate( - # configuration_parameter_value_id=conf_param_values[ - # (CoreConfParamName.AGGREGATION_PERIOD.value, "annual") - # ].id - # ), - # ConfigurationParameterPossibleValueCreate( - # configuration_parameter_value_id=conf_param_values[ - # (CoreConfParamName.MEASURE.value, "absolute") - # ].id - # ), ConfigurationParameterPossibleValueCreate( configuration_parameter_value_id=conf_param_values[ (CoreConfParamName.CLIMATOLOGICAL_MODEL.value, "model_ensemble") @@ -1752,18 +1166,9 @@ def generate_configurations( ), CoverageConfigurationCreate( name="pr_annual_absolute_model_ensemble_upper_uncertainty", - # display_name_english=_DISPLAY_NAME_ENGLISH, - # display_name_italian=_DISPLAY_NAME_ITALIAN, - # description_english=_DESCRIPTION_ENGLISH, - # description_italian=_DESCRIPTION_ITALIAN, netcdf_main_dataset_name="pr_stdup", wms_main_layer_name="pr_stdup", thredds_url_pattern="ensymbc/std/clipped/pr_stdup_{scenario}_ts19762100_ls_VFVGTAA.nc", - # unit_english="mm", - # palette="default/seq-BuYl-inv", - # color_scale_min=0, - # color_scale_max=3200, - # data_precision=_DATA_PRECISION, climatic_indicator_id=climatic_indicators["pr-absolute-annual"], possible_values=[ ConfigurationParameterPossibleValueCreate( @@ -1771,21 +1176,6 @@ def generate_configurations( (CoreConfParamName.ARCHIVE.value, "forecast") ].id ), - # ConfigurationParameterPossibleValueCreate( - # configuration_parameter_value_id=conf_param_values[ - # (CoreConfParamName.CLIMATOLOGICAL_VARIABLE.value, "pr") - # ].id - # ), - # ConfigurationParameterPossibleValueCreate( - # configuration_parameter_value_id=conf_param_values[ - # (CoreConfParamName.AGGREGATION_PERIOD.value, "annual") - # ].id - # ), - # ConfigurationParameterPossibleValueCreate( - # configuration_parameter_value_id=conf_param_values[ - # (CoreConfParamName.MEASURE.value, "absolute") - # ].id - # ), ConfigurationParameterPossibleValueCreate( configuration_parameter_value_id=conf_param_values[ (CoreConfParamName.CLIMATOLOGICAL_MODEL.value, "model_ensemble") @@ -1820,18 +1210,9 @@ def generate_configurations( ), CoverageConfigurationCreate( name="pr_annual_absolute_model_ensemble_lower_uncertainty", - # display_name_english=_DISPLAY_NAME_ENGLISH, - # display_name_italian=_DISPLAY_NAME_ITALIAN, - # description_english=_DESCRIPTION_ENGLISH, - # description_italian=_DESCRIPTION_ITALIAN, netcdf_main_dataset_name="pr_stddown", wms_main_layer_name="pr_stddown", thredds_url_pattern="ensymbc/std/clipped/pr_stddown_{scenario}_ts19762100_ls_VFVGTAA.nc", - # unit_english="mm", - # palette="default/seq-BuYl-inv", - # color_scale_min=0, - # color_scale_max=3200, - # data_precision=_DATA_PRECISION, climatic_indicator_id=climatic_indicators["pr-absolute-annual"], possible_values=[ ConfigurationParameterPossibleValueCreate( @@ -1839,21 +1220,6 @@ def generate_configurations( (CoreConfParamName.ARCHIVE.value, "forecast") ].id ), - # ConfigurationParameterPossibleValueCreate( - # configuration_parameter_value_id=conf_param_values[ - # (CoreConfParamName.CLIMATOLOGICAL_VARIABLE.value, "pr") - # ].id - # ), - # ConfigurationParameterPossibleValueCreate( - # configuration_parameter_value_id=conf_param_values[ - # (CoreConfParamName.AGGREGATION_PERIOD.value, "annual") - # ].id - # ), - # ConfigurationParameterPossibleValueCreate( - # configuration_parameter_value_id=conf_param_values[ - # (CoreConfParamName.MEASURE.value, "absolute") - # ].id - # ), ConfigurationParameterPossibleValueCreate( configuration_parameter_value_id=conf_param_values[ (CoreConfParamName.CLIMATOLOGICAL_MODEL.value, "model_ensemble") @@ -1888,19 +1254,10 @@ def generate_configurations( ), CoverageConfigurationCreate( name="pr_30yr_anomaly_seasonal_agree_model_ensemble", - # display_name_english=_DISPLAY_NAME_ENGLISH, - # display_name_italian=_DISPLAY_NAME_ITALIAN, - # description_english=_DESCRIPTION_ENGLISH, - # description_italian=_DESCRIPTION_ITALIAN, netcdf_main_dataset_name="pr", wms_main_layer_name="pr-uncertainty_group", wms_secondary_layer_name="pr", thredds_url_pattern="ensembletwbc/std/clipped/pr_avgagree_percentage_{time_window}_{scenario}_{year_period}_VFVGTAA.nc", - # unit_english="%", - # palette="uncert-stippled/div-BrBG", - # color_scale_min=-40, - # color_scale_max=40, - # data_precision=_DATA_PRECISION, climatic_indicator_id=climatic_indicators["pr-anomaly-thirty_year"], possible_values=[ ConfigurationParameterPossibleValueCreate( @@ -1908,21 +1265,6 @@ def generate_configurations( (CoreConfParamName.ARCHIVE.value, "forecast") ].id ), - # ConfigurationParameterPossibleValueCreate( - # configuration_parameter_value_id=conf_param_values[ - # (CoreConfParamName.CLIMATOLOGICAL_VARIABLE.value, "pr") - # ].id - # ), - # ConfigurationParameterPossibleValueCreate( - # configuration_parameter_value_id=conf_param_values[ - # (CoreConfParamName.AGGREGATION_PERIOD.value, "30yr") - # ].id - # ), - # ConfigurationParameterPossibleValueCreate( - # configuration_parameter_value_id=conf_param_values[ - # (CoreConfParamName.MEASURE.value, "anomaly") - # ].id - # ), ConfigurationParameterPossibleValueCreate( configuration_parameter_value_id=conf_param_values[ (CoreConfParamName.CLIMATOLOGICAL_MODEL.value, "model_ensemble") @@ -1977,18 +1319,9 @@ def generate_configurations( ), CoverageConfigurationCreate( name="pr_30yr_anomaly_seasonal_model_ec_earth_cclm4_8_17", - # display_name_english=_DISPLAY_NAME_ENGLISH, - # display_name_italian=_DISPLAY_NAME_ITALIAN, - # description_english=_DESCRIPTION_ENGLISH, - # description_italian=_DESCRIPTION_ITALIAN, netcdf_main_dataset_name="pr", wms_main_layer_name="pr", thredds_url_pattern="taspr5rcm/clipped/pr_EC-EARTH_CCLM4-8-17_{scenario}_seas_{time_window}_percentage_{year_period}_VFVGTAA.nc", - # unit_english="%", - # palette="default/div-BrBG", - # color_scale_min=-40, - # color_scale_max=40, - # data_precision=_DATA_PRECISION, climatic_indicator_id=climatic_indicators["pr-anomaly-thirty_year"], possible_values=[ ConfigurationParameterPossibleValueCreate( @@ -1996,21 +1329,6 @@ def generate_configurations( (CoreConfParamName.ARCHIVE.value, "forecast") ].id ), - # ConfigurationParameterPossibleValueCreate( - # configuration_parameter_value_id=conf_param_values[ - # (CoreConfParamName.CLIMATOLOGICAL_VARIABLE.value, "pr") - # ].id - # ), - # ConfigurationParameterPossibleValueCreate( - # configuration_parameter_value_id=conf_param_values[ - # (CoreConfParamName.AGGREGATION_PERIOD.value, "30yr") - # ].id - # ), - # ConfigurationParameterPossibleValueCreate( - # configuration_parameter_value_id=conf_param_values[ - # (CoreConfParamName.MEASURE.value, "anomaly") - # ].id - # ), ConfigurationParameterPossibleValueCreate( configuration_parameter_value_id=conf_param_values[ ( @@ -2068,18 +1386,9 @@ def generate_configurations( ), CoverageConfigurationCreate( name="pr_30yr_anomaly_seasonal_model_ec_earth_racmo22e", - # display_name_english=_DISPLAY_NAME_ENGLISH, - # display_name_italian=_DISPLAY_NAME_ITALIAN, - # description_english=_DESCRIPTION_ENGLISH, - # description_italian=_DESCRIPTION_ITALIAN, netcdf_main_dataset_name="pr", wms_main_layer_name="pr", thredds_url_pattern="taspr5rcm/clipped/pr_EC-EARTH_RACMO22E_{scenario}_seas_{time_window}_percentage_{year_period}_VFVGTAA.nc", - # unit_english="%", - # palette="default/div-BrBG", - # color_scale_min=-40, - # color_scale_max=40, - # data_precision=_DATA_PRECISION, climatic_indicator_id=climatic_indicators["pr-anomaly-thirty_year"], possible_values=[ ConfigurationParameterPossibleValueCreate( @@ -2087,21 +1396,6 @@ def generate_configurations( (CoreConfParamName.ARCHIVE.value, "forecast") ].id ), - # ConfigurationParameterPossibleValueCreate( - # configuration_parameter_value_id=conf_param_values[ - # (CoreConfParamName.CLIMATOLOGICAL_VARIABLE.value, "pr") - # ].id - # ), - # ConfigurationParameterPossibleValueCreate( - # configuration_parameter_value_id=conf_param_values[ - # (CoreConfParamName.AGGREGATION_PERIOD.value, "30yr") - # ].id - # ), - # ConfigurationParameterPossibleValueCreate( - # configuration_parameter_value_id=conf_param_values[ - # (CoreConfParamName.MEASURE.value, "anomaly") - # ].id - # ), ConfigurationParameterPossibleValueCreate( configuration_parameter_value_id=conf_param_values[ ( @@ -2159,18 +1453,9 @@ def generate_configurations( ), CoverageConfigurationCreate( name="pr_30yr_anomaly_seasonal_model_ec_earth_rca4", - # display_name_english=_DISPLAY_NAME_ENGLISH, - # display_name_italian=_DISPLAY_NAME_ITALIAN, - # description_english=_DESCRIPTION_ENGLISH, - # description_italian=_DESCRIPTION_ITALIAN, netcdf_main_dataset_name="pr", wms_main_layer_name="pr", thredds_url_pattern="taspr5rcm/clipped/pr_EC-EARTH_RCA4_{scenario}_seas_{time_window}_percentage_{year_period}_VFVGTAA.nc", - # unit_english="%", - # palette="default/div-BrBG", - # color_scale_min=-40, - # color_scale_max=40, - # data_precision=_DATA_PRECISION, climatic_indicator_id=climatic_indicators["pr-anomaly-thirty_year"], possible_values=[ ConfigurationParameterPossibleValueCreate( @@ -2178,21 +1463,6 @@ def generate_configurations( (CoreConfParamName.ARCHIVE.value, "forecast") ].id ), - # ConfigurationParameterPossibleValueCreate( - # configuration_parameter_value_id=conf_param_values[ - # (CoreConfParamName.CLIMATOLOGICAL_VARIABLE.value, "pr") - # ].id - # ), - # ConfigurationParameterPossibleValueCreate( - # configuration_parameter_value_id=conf_param_values[ - # (CoreConfParamName.AGGREGATION_PERIOD.value, "30yr") - # ].id - # ), - # ConfigurationParameterPossibleValueCreate( - # configuration_parameter_value_id=conf_param_values[ - # (CoreConfParamName.MEASURE.value, "anomaly") - # ].id - # ), ConfigurationParameterPossibleValueCreate( configuration_parameter_value_id=conf_param_values[ (CoreConfParamName.CLIMATOLOGICAL_MODEL.value, "ec_earth_rca4") @@ -2247,18 +1517,9 @@ def generate_configurations( ), CoverageConfigurationCreate( name="pr_30yr_anomaly_seasonal_model_hadgem2_es_racmo22e", - # display_name_english=_DISPLAY_NAME_ENGLISH, - # display_name_italian=_DISPLAY_NAME_ITALIAN, - # description_english=_DESCRIPTION_ENGLISH, - # description_italian=_DESCRIPTION_ITALIAN, netcdf_main_dataset_name="pr", wms_main_layer_name="pr", thredds_url_pattern="taspr5rcm/clipped/pr_HadGEM2-ES_RACMO22E_{scenario}_seas_{time_window}_percentage_{year_period}_VFVGTAA.nc", - # unit_english="%", - # palette="default/div-BrBG", - # color_scale_min=-40, - # color_scale_max=40, - # data_precision=_DATA_PRECISION, climatic_indicator_id=climatic_indicators["pr-anomaly-thirty_year"], possible_values=[ ConfigurationParameterPossibleValueCreate( @@ -2266,21 +1527,6 @@ def generate_configurations( (CoreConfParamName.ARCHIVE.value, "forecast") ].id ), - # ConfigurationParameterPossibleValueCreate( - # configuration_parameter_value_id=conf_param_values[ - # (CoreConfParamName.CLIMATOLOGICAL_VARIABLE.value, "pr") - # ].id - # ), - # ConfigurationParameterPossibleValueCreate( - # configuration_parameter_value_id=conf_param_values[ - # (CoreConfParamName.AGGREGATION_PERIOD.value, "30yr") - # ].id - # ), - # ConfigurationParameterPossibleValueCreate( - # configuration_parameter_value_id=conf_param_values[ - # (CoreConfParamName.MEASURE.value, "anomaly") - # ].id - # ), ConfigurationParameterPossibleValueCreate( configuration_parameter_value_id=conf_param_values[ ( @@ -2338,18 +1584,9 @@ def generate_configurations( ), CoverageConfigurationCreate( name="pr_30yr_anomaly_seasonal_model_mpi_esm_lr_remo2009", - # display_name_english=_DISPLAY_NAME_ENGLISH, - # display_name_italian=_DISPLAY_NAME_ITALIAN, - # description_english=_DESCRIPTION_ENGLISH, - # description_italian=_DESCRIPTION_ITALIAN, netcdf_main_dataset_name="pr", wms_main_layer_name="pr", thredds_url_pattern="taspr5rcm/clipped/pr_MPI-ESM-LR_REMO2009_{scenario}_seas_{time_window}_percentage_{year_period}_VFVGTAA.nc", - # unit_english="%", - # palette="default/div-BrBG", - # color_scale_min=-40, - # color_scale_max=40, - # data_precision=_DATA_PRECISION, climatic_indicator_id=climatic_indicators["pr-anomaly-thirty_year"], possible_values=[ ConfigurationParameterPossibleValueCreate( @@ -2357,21 +1594,6 @@ def generate_configurations( (CoreConfParamName.ARCHIVE.value, "forecast") ].id ), - # ConfigurationParameterPossibleValueCreate( - # configuration_parameter_value_id=conf_param_values[ - # (CoreConfParamName.CLIMATOLOGICAL_VARIABLE.value, "pr") - # ].id - # ), - # ConfigurationParameterPossibleValueCreate( - # configuration_parameter_value_id=conf_param_values[ - # (CoreConfParamName.AGGREGATION_PERIOD.value, "30yr") - # ].id - # ), - # ConfigurationParameterPossibleValueCreate( - # configuration_parameter_value_id=conf_param_values[ - # (CoreConfParamName.MEASURE.value, "anomaly") - # ].id - # ), ConfigurationParameterPossibleValueCreate( configuration_parameter_value_id=conf_param_values[ ( diff --git a/arpav_ppcv/bootstrapper/coverage_configurations/forecast/r95ptot.py b/arpav_ppcv/bootstrapper/coverage_configurations/forecast/r95ptot.py index 281d3f91..40634e48 100644 --- a/arpav_ppcv/bootstrapper/coverage_configurations/forecast/r95ptot.py +++ b/arpav_ppcv/bootstrapper/coverage_configurations/forecast/r95ptot.py @@ -4,17 +4,6 @@ ConfigurationParameterPossibleValueCreate, ) -# _DISPLAY_NAME_ENGLISH = "Extreme rainfall" -# _DISPLAY_NAME_ITALIAN = "Precipitazione estrema" -# _DESCRIPTION_ENGLISH = ( -# "Total cumulative precipitation above the 95th percentile of the reference period" -# ) -# _DESCRIPTION_ITALIAN = ( -# "Precipitazioni cumulative totali superiori al 95° percentile del periodo di " -# "riferimento" -# ) -# _DATA_PRECISION = 0 - def generate_configurations( conf_param_values, @@ -23,19 +12,10 @@ def generate_configurations( return [ CoverageConfigurationCreate( name="r95ptot_30yr_anomaly_seasonal_agree_model_ensemble", - # display_name_english=_DISPLAY_NAME_ENGLISH, - # display_name_italian=_DISPLAY_NAME_ITALIAN, - # description_english=_DESCRIPTION_ENGLISH, - # description_italian=_DESCRIPTION_ITALIAN, netcdf_main_dataset_name="r95ptot", wms_main_layer_name="r95ptot-uncertainty_group", wms_secondary_layer_name="r95ptot", thredds_url_pattern="ensembletwbc/std/clipped/pr_change_cumulative_check_avgagree_{time_window}_{scenario}_{year_period}_VFVGTAA.nc", - # unit_english="%", - # palette="uncert-stippled/div-BrBG", - # color_scale_min=-160, - # color_scale_max=160, - # data_precision=_DATA_PRECISION, climatic_indicator_id=climatic_indicators["r95ptot-anomaly-thirty_year"], possible_values=[ ConfigurationParameterPossibleValueCreate( @@ -43,21 +23,6 @@ def generate_configurations( (CoreConfParamName.ARCHIVE.value, "forecast") ].id ), - # ConfigurationParameterPossibleValueCreate( - # configuration_parameter_value_id=conf_param_values[ - # (CoreConfParamName.CLIMATOLOGICAL_VARIABLE.value, "r95ptot") - # ].id - # ), - # ConfigurationParameterPossibleValueCreate( - # configuration_parameter_value_id=conf_param_values[ - # (CoreConfParamName.AGGREGATION_PERIOD.value, "30yr") - # ].id - # ), - # ConfigurationParameterPossibleValueCreate( - # configuration_parameter_value_id=conf_param_values[ - # (CoreConfParamName.MEASURE.value, "anomaly") - # ].id - # ), ConfigurationParameterPossibleValueCreate( configuration_parameter_value_id=conf_param_values[ (CoreConfParamName.CLIMATOLOGICAL_MODEL.value, "model_ensemble") @@ -112,18 +77,9 @@ def generate_configurations( ), CoverageConfigurationCreate( name="r95ptot_30yr_anomaly_seasonal_model_ec_earth_cclm4_8_17", - # display_name_english=_DISPLAY_NAME_ENGLISH, - # display_name_italian=_DISPLAY_NAME_ITALIAN, - # description_english=_DESCRIPTION_ENGLISH, - # description_italian=_DESCRIPTION_ITALIAN, netcdf_main_dataset_name="r95ptot", wms_main_layer_name="r95ptot", thredds_url_pattern="indici5rcm/clipped/pr_change_cumulative_EC-EARTH_CCLM4-8-17_{year_period}_{scenario}_{time_window}_VFVGTAA.nc", - # unit_english="%", - # palette="default/div-BrBG", - # color_scale_min=-160, - # color_scale_max=160, - # data_precision=_DATA_PRECISION, climatic_indicator_id=climatic_indicators["r95ptot-anomaly-thirty_year"], possible_values=[ ConfigurationParameterPossibleValueCreate( @@ -131,21 +87,6 @@ def generate_configurations( (CoreConfParamName.ARCHIVE.value, "forecast") ].id ), - # ConfigurationParameterPossibleValueCreate( - # configuration_parameter_value_id=conf_param_values[ - # (CoreConfParamName.CLIMATOLOGICAL_VARIABLE.value, "r95ptot") - # ].id - # ), - # ConfigurationParameterPossibleValueCreate( - # configuration_parameter_value_id=conf_param_values[ - # (CoreConfParamName.AGGREGATION_PERIOD.value, "30yr") - # ].id - # ), - # ConfigurationParameterPossibleValueCreate( - # configuration_parameter_value_id=conf_param_values[ - # (CoreConfParamName.MEASURE.value, "anomaly") - # ].id - # ), ConfigurationParameterPossibleValueCreate( configuration_parameter_value_id=conf_param_values[ ( @@ -203,18 +144,9 @@ def generate_configurations( ), CoverageConfigurationCreate( name="r95ptot_30yr_anomaly_seasonal_model_ec_earth_racmo22e", - # display_name_english=_DISPLAY_NAME_ENGLISH, - # display_name_italian=_DISPLAY_NAME_ITALIAN, - # description_english=_DESCRIPTION_ENGLISH, - # description_italian=_DESCRIPTION_ITALIAN, netcdf_main_dataset_name="r95ptot", wms_main_layer_name="r95ptot", thredds_url_pattern="indici5rcm/clipped/pr_change_cumulative_EC-EARTH_RACMO22E_{year_period}_{scenario}_{time_window}_VFVGTAA.nc", - # unit_english="%", - # palette="default/div-BrBG", - # color_scale_min=-160, - # color_scale_max=160, - # data_precision=_DATA_PRECISION, climatic_indicator_id=climatic_indicators["r95ptot-anomaly-thirty_year"], possible_values=[ ConfigurationParameterPossibleValueCreate( @@ -222,21 +154,6 @@ def generate_configurations( (CoreConfParamName.ARCHIVE.value, "forecast") ].id ), - # ConfigurationParameterPossibleValueCreate( - # configuration_parameter_value_id=conf_param_values[ - # (CoreConfParamName.CLIMATOLOGICAL_VARIABLE.value, "r95ptot") - # ].id - # ), - # ConfigurationParameterPossibleValueCreate( - # configuration_parameter_value_id=conf_param_values[ - # (CoreConfParamName.AGGREGATION_PERIOD.value, "30yr") - # ].id - # ), - # ConfigurationParameterPossibleValueCreate( - # configuration_parameter_value_id=conf_param_values[ - # (CoreConfParamName.MEASURE.value, "anomaly") - # ].id - # ), ConfigurationParameterPossibleValueCreate( configuration_parameter_value_id=conf_param_values[ ( @@ -294,18 +211,9 @@ def generate_configurations( ), CoverageConfigurationCreate( name="r95ptot_30yr_anomaly_seasonal_model_ec_earth_rca4", - # display_name_english=_DISPLAY_NAME_ENGLISH, - # display_name_italian=_DISPLAY_NAME_ITALIAN, - # description_english=_DESCRIPTION_ENGLISH, - # description_italian=_DESCRIPTION_ITALIAN, netcdf_main_dataset_name="r95ptot", wms_main_layer_name="r95ptot", thredds_url_pattern="indici5rcm/clipped/pr_change_cumulative_EC-EARTH_RCA4_{year_period}_{scenario}_{time_window}_VFVGTAA.nc", - # unit_english="%", - # palette="default/div-BrBG", - # color_scale_min=-160, - # color_scale_max=160, - # data_precision=_DATA_PRECISION, climatic_indicator_id=climatic_indicators["r95ptot-anomaly-thirty_year"], possible_values=[ ConfigurationParameterPossibleValueCreate( @@ -313,21 +221,6 @@ def generate_configurations( (CoreConfParamName.ARCHIVE.value, "forecast") ].id ), - # ConfigurationParameterPossibleValueCreate( - # configuration_parameter_value_id=conf_param_values[ - # (CoreConfParamName.CLIMATOLOGICAL_VARIABLE.value, "r95ptot") - # ].id - # ), - # ConfigurationParameterPossibleValueCreate( - # configuration_parameter_value_id=conf_param_values[ - # (CoreConfParamName.AGGREGATION_PERIOD.value, "30yr") - # ].id - # ), - # ConfigurationParameterPossibleValueCreate( - # configuration_parameter_value_id=conf_param_values[ - # (CoreConfParamName.MEASURE.value, "anomaly") - # ].id - # ), ConfigurationParameterPossibleValueCreate( configuration_parameter_value_id=conf_param_values[ (CoreConfParamName.CLIMATOLOGICAL_MODEL.value, "ec_earth_rca4") @@ -382,18 +275,9 @@ def generate_configurations( ), CoverageConfigurationCreate( name="r95ptot_30yr_anomaly_seasonal_model_hadgem2_es_racmo22e", - # display_name_english=_DISPLAY_NAME_ENGLISH, - # display_name_italian=_DISPLAY_NAME_ITALIAN, - # description_english=_DESCRIPTION_ENGLISH, - # description_italian=_DESCRIPTION_ITALIAN, netcdf_main_dataset_name="r95ptot", wms_main_layer_name="r95ptot", thredds_url_pattern="indici5rcm/clipped/pr_change_cumulative_HadGEM2-ES_RACMO22E_{year_period}_{scenario}_{time_window}_VFVGTAA.nc", - # unit_english="%", - # palette="default/div-BrBG", - # color_scale_min=-160, - # color_scale_max=160, - # data_precision=_DATA_PRECISION, climatic_indicator_id=climatic_indicators["r95ptot-anomaly-thirty_year"], possible_values=[ ConfigurationParameterPossibleValueCreate( @@ -401,21 +285,6 @@ def generate_configurations( (CoreConfParamName.ARCHIVE.value, "forecast") ].id ), - # ConfigurationParameterPossibleValueCreate( - # configuration_parameter_value_id=conf_param_values[ - # (CoreConfParamName.CLIMATOLOGICAL_VARIABLE.value, "r95ptot") - # ].id - # ), - # ConfigurationParameterPossibleValueCreate( - # configuration_parameter_value_id=conf_param_values[ - # (CoreConfParamName.AGGREGATION_PERIOD.value, "30yr") - # ].id - # ), - # ConfigurationParameterPossibleValueCreate( - # configuration_parameter_value_id=conf_param_values[ - # (CoreConfParamName.MEASURE.value, "anomaly") - # ].id - # ), ConfigurationParameterPossibleValueCreate( configuration_parameter_value_id=conf_param_values[ ( @@ -473,18 +342,9 @@ def generate_configurations( ), CoverageConfigurationCreate( name="r95ptot_30yr_anomaly_seasonal_model_mpi_esm_lr_remo2009", - # display_name_english=_DISPLAY_NAME_ENGLISH, - # display_name_italian=_DISPLAY_NAME_ITALIAN, - # description_english=_DESCRIPTION_ENGLISH, - # description_italian=_DESCRIPTION_ITALIAN, netcdf_main_dataset_name="r95ptot", wms_main_layer_name="r95ptot", thredds_url_pattern="indici5rcm/clipped/pr_change_cumulative_MPI-ESM-LR_REMO2009_{year_period}_{scenario}_{time_window}_VFVGTAA.nc", - # unit_english="%", - # palette="default/div-BrBG", - # color_scale_min=-160, - # color_scale_max=160, - # data_precision=_DATA_PRECISION, climatic_indicator_id=climatic_indicators["r95ptot-anomaly-thirty_year"], possible_values=[ ConfigurationParameterPossibleValueCreate( @@ -492,21 +352,6 @@ def generate_configurations( (CoreConfParamName.ARCHIVE.value, "forecast") ].id ), - # ConfigurationParameterPossibleValueCreate( - # configuration_parameter_value_id=conf_param_values[ - # (CoreConfParamName.CLIMATOLOGICAL_VARIABLE.value, "r95ptot") - # ].id - # ), - # ConfigurationParameterPossibleValueCreate( - # configuration_parameter_value_id=conf_param_values[ - # (CoreConfParamName.AGGREGATION_PERIOD.value, "30yr") - # ].id - # ), - # ConfigurationParameterPossibleValueCreate( - # configuration_parameter_value_id=conf_param_values[ - # (CoreConfParamName.MEASURE.value, "anomaly") - # ].id - # ), ConfigurationParameterPossibleValueCreate( configuration_parameter_value_id=conf_param_values[ ( diff --git a/arpav_ppcv/bootstrapper/coverage_configurations/forecast/snwdays.py b/arpav_ppcv/bootstrapper/coverage_configurations/forecast/snwdays.py index 0ac4ef50..68df1d08 100644 --- a/arpav_ppcv/bootstrapper/coverage_configurations/forecast/snwdays.py +++ b/arpav_ppcv/bootstrapper/coverage_configurations/forecast/snwdays.py @@ -4,17 +4,6 @@ ConfigurationParameterPossibleValueCreate, ) -# _DISPLAY_NAME_ENGLISH = "Days with new snow" -# _DISPLAY_NAME_ITALIAN = "Giorni di gelo" -# _DESCRIPTION_ENGLISH = ( -# "Maximum number of consecutive dry days (daily precipitation less than 1 mm)" -# ) -# _DESCRIPTION_ITALIAN = ( -# "Numero massimo di giorni asciutti consecutivi (precipitazioni giornaliere " -# "inferiori a 1 mm)" -# ) -# _DATA_PRECISION = 0 - def generate_configurations( conf_param_values, @@ -23,19 +12,9 @@ def generate_configurations( return [ CoverageConfigurationCreate( name="snwdays_annual_absolute_model_ensemble", - # display_name_english=_DISPLAY_NAME_ENGLISH, - # display_name_italian=_DISPLAY_NAME_ITALIAN, - # description_english=_DESCRIPTION_ENGLISH, - # description_italian=_DESCRIPTION_ITALIAN, netcdf_main_dataset_name="snwdays", wms_main_layer_name="snwdays", thredds_url_pattern="ensymbc/clipped/snwdays_1mm_2oc_avg_ts19762100_{scenario}_ls_VFVG.nc", - # unit_english="days", - # unit_italian="gg", - # palette="default/seq-BuYl-inv", - # color_scale_min=0, - # color_scale_max=100, - # data_precision=_DATA_PRECISION, climatic_indicator_id=climatic_indicators["snwdays-absolute-annual"], possible_values=[ ConfigurationParameterPossibleValueCreate( @@ -43,21 +22,6 @@ def generate_configurations( (CoreConfParamName.ARCHIVE.value, "forecast") ].id ), - # ConfigurationParameterPossibleValueCreate( - # configuration_parameter_value_id=conf_param_values[ - # (CoreConfParamName.CLIMATOLOGICAL_VARIABLE.value, "snwdays") - # ].id - # ), - # ConfigurationParameterPossibleValueCreate( - # configuration_parameter_value_id=conf_param_values[ - # (CoreConfParamName.AGGREGATION_PERIOD.value, "annual") - # ].id - # ), - # ConfigurationParameterPossibleValueCreate( - # configuration_parameter_value_id=conf_param_values[ - # (CoreConfParamName.MEASURE.value, "absolute") - # ].id - # ), ConfigurationParameterPossibleValueCreate( configuration_parameter_value_id=conf_param_values[ (CoreConfParamName.CLIMATOLOGICAL_MODEL.value, "model_ensemble") @@ -87,19 +51,9 @@ def generate_configurations( ), CoverageConfigurationCreate( name="snwdays_annual_absolute_model_ec_earth_cclm4_8_17", - # display_name_english=_DISPLAY_NAME_ENGLISH, - # display_name_italian=_DISPLAY_NAME_ITALIAN, - # description_english=_DESCRIPTION_ENGLISH, - # description_italian=_DESCRIPTION_ITALIAN, netcdf_main_dataset_name="snwdays", wms_main_layer_name="snwdays", thredds_url_pattern="EC-EARTH_CCLM4-8-17ymbc/clipped/snwdays_1mm_2oc_EC-EARTH_CCLM4-8-17_{scenario}_ts19762100_ls_VFVG.nc", - # unit_english="days", - # unit_italian="gg", - # palette="default/seq-BuYl-inv", - # color_scale_min=0, - # color_scale_max=100, - # data_precision=_DATA_PRECISION, climatic_indicator_id=climatic_indicators["snwdays-absolute-annual"], possible_values=[ ConfigurationParameterPossibleValueCreate( @@ -107,21 +61,6 @@ def generate_configurations( (CoreConfParamName.ARCHIVE.value, "forecast") ].id ), - # ConfigurationParameterPossibleValueCreate( - # configuration_parameter_value_id=conf_param_values[ - # (CoreConfParamName.CLIMATOLOGICAL_VARIABLE.value, "snwdays") - # ].id - # ), - # ConfigurationParameterPossibleValueCreate( - # configuration_parameter_value_id=conf_param_values[ - # (CoreConfParamName.AGGREGATION_PERIOD.value, "annual") - # ].id - # ), - # ConfigurationParameterPossibleValueCreate( - # configuration_parameter_value_id=conf_param_values[ - # (CoreConfParamName.MEASURE.value, "absolute") - # ].id - # ), ConfigurationParameterPossibleValueCreate( configuration_parameter_value_id=conf_param_values[ ( @@ -154,19 +93,9 @@ def generate_configurations( ), CoverageConfigurationCreate( name="snwdays_annual_absolute_model_ec_earth_racmo22e", - # display_name_english=_DISPLAY_NAME_ENGLISH, - # display_name_italian=_DISPLAY_NAME_ITALIAN, - # description_english=_DESCRIPTION_ENGLISH, - # description_italian=_DESCRIPTION_ITALIAN, netcdf_main_dataset_name="snwdays", wms_main_layer_name="snwdays", thredds_url_pattern="EC-EARTH_RACMO22Eymbc/clipped/snwdays_1mm_2oc_EC-EARTH_RACMO22E_{scenario}_ts19762100_ls_VFVG.nc", - # unit_english="days", - # unit_italian="gg", - # palette="default/seq-BuYl-inv", - # color_scale_min=0, - # color_scale_max=100, - # data_precision=_DATA_PRECISION, climatic_indicator_id=climatic_indicators["snwdays-absolute-annual"], possible_values=[ ConfigurationParameterPossibleValueCreate( @@ -174,21 +103,6 @@ def generate_configurations( (CoreConfParamName.ARCHIVE.value, "forecast") ].id ), - # ConfigurationParameterPossibleValueCreate( - # configuration_parameter_value_id=conf_param_values[ - # (CoreConfParamName.CLIMATOLOGICAL_VARIABLE.value, "snwdays") - # ].id - # ), - # ConfigurationParameterPossibleValueCreate( - # configuration_parameter_value_id=conf_param_values[ - # (CoreConfParamName.AGGREGATION_PERIOD.value, "annual") - # ].id - # ), - # ConfigurationParameterPossibleValueCreate( - # configuration_parameter_value_id=conf_param_values[ - # (CoreConfParamName.MEASURE.value, "absolute") - # ].id - # ), ConfigurationParameterPossibleValueCreate( configuration_parameter_value_id=conf_param_values[ ( @@ -221,19 +135,9 @@ def generate_configurations( ), CoverageConfigurationCreate( name="snwdays_annual_absolute_model_ec_earth_rca4", - # display_name_english=_DISPLAY_NAME_ENGLISH, - # display_name_italian=_DISPLAY_NAME_ITALIAN, - # description_english=_DESCRIPTION_ENGLISH, - # description_italian=_DESCRIPTION_ITALIAN, netcdf_main_dataset_name="snwdays", wms_main_layer_name="snwdays", thredds_url_pattern="EC-EARTH_RCA4ymbc/clipped/snwdays_1mm_2oc_EC-EARTH_RCA4_{scenario}_ts19762100_ls_VFVG.nc", - # unit_english="days", - # unit_italian="gg", - # palette="default/seq-BuYl-inv", - # color_scale_min=0, - # color_scale_max=100, - # data_precision=_DATA_PRECISION, climatic_indicator_id=climatic_indicators["snwdays-absolute-annual"], possible_values=[ ConfigurationParameterPossibleValueCreate( @@ -241,21 +145,6 @@ def generate_configurations( (CoreConfParamName.ARCHIVE.value, "forecast") ].id ), - # ConfigurationParameterPossibleValueCreate( - # configuration_parameter_value_id=conf_param_values[ - # (CoreConfParamName.CLIMATOLOGICAL_VARIABLE.value, "snwdays") - # ].id - # ), - # ConfigurationParameterPossibleValueCreate( - # configuration_parameter_value_id=conf_param_values[ - # (CoreConfParamName.AGGREGATION_PERIOD.value, "annual") - # ].id - # ), - # ConfigurationParameterPossibleValueCreate( - # configuration_parameter_value_id=conf_param_values[ - # (CoreConfParamName.MEASURE.value, "absolute") - # ].id - # ), ConfigurationParameterPossibleValueCreate( configuration_parameter_value_id=conf_param_values[ (CoreConfParamName.CLIMATOLOGICAL_MODEL.value, "ec_earth_rca4") @@ -285,19 +174,9 @@ def generate_configurations( ), CoverageConfigurationCreate( name="snwdays_annual_absolute_model_hadgem2_es_racmo22e", - # display_name_english=_DISPLAY_NAME_ENGLISH, - # display_name_italian=_DISPLAY_NAME_ITALIAN, - # description_english=_DESCRIPTION_ENGLISH, - # description_italian=_DESCRIPTION_ITALIAN, netcdf_main_dataset_name="snwdays", wms_main_layer_name="snwdays", thredds_url_pattern="HadGEM2-ES_RACMO22Eymbc/clipped/snwdays_1mm_2oc_HadGEM2-ES_RACMO22E_{scenario}_ts19762100_ls_VFVG.nc", - # unit_english="days", - # unit_italian="gg", - # palette="default/seq-BuYl-inv", - # color_scale_min=0, - # color_scale_max=100, - # data_precision=_DATA_PRECISION, climatic_indicator_id=climatic_indicators["snwdays-absolute-annual"], possible_values=[ ConfigurationParameterPossibleValueCreate( @@ -305,21 +184,6 @@ def generate_configurations( (CoreConfParamName.ARCHIVE.value, "forecast") ].id ), - # ConfigurationParameterPossibleValueCreate( - # configuration_parameter_value_id=conf_param_values[ - # (CoreConfParamName.CLIMATOLOGICAL_VARIABLE.value, "snwdays") - # ].id - # ), - # ConfigurationParameterPossibleValueCreate( - # configuration_parameter_value_id=conf_param_values[ - # (CoreConfParamName.AGGREGATION_PERIOD.value, "annual") - # ].id - # ), - # ConfigurationParameterPossibleValueCreate( - # configuration_parameter_value_id=conf_param_values[ - # (CoreConfParamName.MEASURE.value, "absolute") - # ].id - # ), ConfigurationParameterPossibleValueCreate( configuration_parameter_value_id=conf_param_values[ ( @@ -352,19 +216,9 @@ def generate_configurations( ), CoverageConfigurationCreate( name="snwdays_annual_absolute_model_mpi_esm_lr_remo2009", - # display_name_english=_DISPLAY_NAME_ENGLISH, - # display_name_italian=_DISPLAY_NAME_ITALIAN, - # description_english=_DESCRIPTION_ENGLISH, - # description_italian=_DESCRIPTION_ITALIAN, netcdf_main_dataset_name="snwdays", wms_main_layer_name="snwdays", thredds_url_pattern="MPI-ESM-LR_REMO2009ymbc/clipped/snwdays_1mm_2oc_MPI-ESM-LR_REMO2009_{scenario}_ts19762100_ls_VFVG.nc", - # unit_english="days", - # unit_italian="gg", - # palette="default/seq-BuYl-inv", - # color_scale_min=0, - # color_scale_max=100, - # data_precision=_DATA_PRECISION, climatic_indicator_id=climatic_indicators["snwdays-absolute-annual"], possible_values=[ ConfigurationParameterPossibleValueCreate( @@ -372,21 +226,6 @@ def generate_configurations( (CoreConfParamName.ARCHIVE.value, "forecast") ].id ), - # ConfigurationParameterPossibleValueCreate( - # configuration_parameter_value_id=conf_param_values[ - # (CoreConfParamName.CLIMATOLOGICAL_VARIABLE.value, "snwdays") - # ].id - # ), - # ConfigurationParameterPossibleValueCreate( - # configuration_parameter_value_id=conf_param_values[ - # (CoreConfParamName.AGGREGATION_PERIOD.value, "annual") - # ].id - # ), - # ConfigurationParameterPossibleValueCreate( - # configuration_parameter_value_id=conf_param_values[ - # (CoreConfParamName.MEASURE.value, "absolute") - # ].id - # ), ConfigurationParameterPossibleValueCreate( configuration_parameter_value_id=conf_param_values[ ( @@ -419,19 +258,9 @@ def generate_configurations( ), CoverageConfigurationCreate( name="snwdays_annual_absolute_model_ensemble_upper_uncertainty", - # display_name_english=_DISPLAY_NAME_ENGLISH, - # display_name_italian=_DISPLAY_NAME_ITALIAN, - # description_english=_DESCRIPTION_ENGLISH, - # description_italian=_DESCRIPTION_ITALIAN, netcdf_main_dataset_name="snwdays_stdup", wms_main_layer_name="snwdays_stdup", thredds_url_pattern="ensymbc/std/clipped/snwdays_1mm_2oc_stdup_ts19762100_{scenario}_ls_VFVG.nc", - # unit_english="days", - # unit_italian="gg", - # palette="default/seq-BuYl-inv", - # color_scale_min=0, - # color_scale_max=100, - # data_precision=_DATA_PRECISION, climatic_indicator_id=climatic_indicators["snwdays-absolute-annual"], possible_values=[ ConfigurationParameterPossibleValueCreate( @@ -439,21 +268,6 @@ def generate_configurations( (CoreConfParamName.ARCHIVE.value, "forecast") ].id ), - # ConfigurationParameterPossibleValueCreate( - # configuration_parameter_value_id=conf_param_values[ - # (CoreConfParamName.CLIMATOLOGICAL_VARIABLE.value, "snwdays") - # ].id - # ), - # ConfigurationParameterPossibleValueCreate( - # configuration_parameter_value_id=conf_param_values[ - # (CoreConfParamName.AGGREGATION_PERIOD.value, "annual") - # ].id - # ), - # ConfigurationParameterPossibleValueCreate( - # configuration_parameter_value_id=conf_param_values[ - # (CoreConfParamName.MEASURE.value, "absolute") - # ].id - # ), ConfigurationParameterPossibleValueCreate( configuration_parameter_value_id=conf_param_values[ (CoreConfParamName.CLIMATOLOGICAL_MODEL.value, "model_ensemble") @@ -488,19 +302,9 @@ def generate_configurations( ), CoverageConfigurationCreate( name="snwdays_annual_absolute_model_ensemble_lower_uncertainty", - # display_name_english=_DISPLAY_NAME_ENGLISH, - # display_name_italian=_DISPLAY_NAME_ITALIAN, - # description_english=_DESCRIPTION_ENGLISH, - # description_italian=_DESCRIPTION_ITALIAN, netcdf_main_dataset_name="snwdays_stddown", wms_main_layer_name="snwdays_stddown", thredds_url_pattern="ensymbc/std/clipped/snwdays_1mm_2oc_stddown_ts19762100_{scenario}_ls_VFVG.nc", - # unit_english="days", - # unit_italian="gg", - # palette="default/seq-BuYl-inv", - # color_scale_min=0, - # color_scale_max=100, - # data_precision=_DATA_PRECISION, climatic_indicator_id=climatic_indicators["snwdays-absolute-annual"], possible_values=[ ConfigurationParameterPossibleValueCreate( @@ -508,21 +312,6 @@ def generate_configurations( (CoreConfParamName.ARCHIVE.value, "forecast") ].id ), - # ConfigurationParameterPossibleValueCreate( - # configuration_parameter_value_id=conf_param_values[ - # (CoreConfParamName.CLIMATOLOGICAL_VARIABLE.value, "snwdays") - # ].id - # ), - # ConfigurationParameterPossibleValueCreate( - # configuration_parameter_value_id=conf_param_values[ - # (CoreConfParamName.AGGREGATION_PERIOD.value, "annual") - # ].id - # ), - # ConfigurationParameterPossibleValueCreate( - # configuration_parameter_value_id=conf_param_values[ - # (CoreConfParamName.MEASURE.value, "absolute") - # ].id - # ), ConfigurationParameterPossibleValueCreate( configuration_parameter_value_id=conf_param_values[ (CoreConfParamName.CLIMATOLOGICAL_MODEL.value, "model_ensemble") @@ -555,23 +344,12 @@ def generate_configurations( ), ], ), - # --- CoverageConfigurationCreate( name="snwdays_30yr_anomaly_annual_agree_model_ensemble", - # display_name_english=_DISPLAY_NAME_ENGLISH, - # display_name_italian=_DISPLAY_NAME_ITALIAN, - # description_english=_DESCRIPTION_ENGLISH, - # description_italian=_DESCRIPTION_ITALIAN, netcdf_main_dataset_name="snwdays", wms_main_layer_name="snwdays-uncertainty_group", wms_secondary_layer_name="snwdays", thredds_url_pattern="ensembletwbc/std/clipped/snwdays_an_1mm_2oc_avgagree_{time_window}_{scenario}_ls_VFVG.nc", - # unit_english="days", - # unit_italian="gg", - # palette="uncert-stippled/seq-YlOrBr-inv", - # color_scale_min=-50, - # color_scale_max=0, - # data_precision=_DATA_PRECISION, climatic_indicator_id=climatic_indicators["snwdays-anomaly-thirty_year"], possible_values=[ ConfigurationParameterPossibleValueCreate( @@ -579,21 +357,6 @@ def generate_configurations( (CoreConfParamName.ARCHIVE.value, "forecast") ].id ), - # ConfigurationParameterPossibleValueCreate( - # configuration_parameter_value_id=conf_param_values[ - # (CoreConfParamName.CLIMATOLOGICAL_VARIABLE.value, "snwdays") - # ].id - # ), - # ConfigurationParameterPossibleValueCreate( - # configuration_parameter_value_id=conf_param_values[ - # (CoreConfParamName.AGGREGATION_PERIOD.value, "30yr") - # ].id - # ), - # ConfigurationParameterPossibleValueCreate( - # configuration_parameter_value_id=conf_param_values[ - # (CoreConfParamName.MEASURE.value, "anomaly") - # ].id - # ), ConfigurationParameterPossibleValueCreate( configuration_parameter_value_id=conf_param_values[ (CoreConfParamName.CLIMATOLOGICAL_MODEL.value, "model_ensemble") @@ -633,19 +396,9 @@ def generate_configurations( ), CoverageConfigurationCreate( name="snwdays_30yr_anomaly_annual_model_ec_earth_cclm4_8_17", - # display_name_english=_DISPLAY_NAME_ENGLISH, - # display_name_italian=_DISPLAY_NAME_ITALIAN, - # description_english=_DESCRIPTION_ENGLISH, - # description_italian=_DESCRIPTION_ITALIAN, netcdf_main_dataset_name="snwdays", wms_main_layer_name="snwdays", thredds_url_pattern="indici5rcm/clipped/snwdays_an_1mm_2oc_EC-EARTH_CCLM4-8-17_{scenario}_{time_window}_ls_VFVG.nc", - # unit_english="days", - # unit_italian="gg", - # palette="default/seq-YlOrBr-inv", - # color_scale_min=-50, - # color_scale_max=0, - # data_precision=_DATA_PRECISION, climatic_indicator_id=climatic_indicators["snwdays-anomaly-thirty_year"], possible_values=[ ConfigurationParameterPossibleValueCreate( @@ -653,21 +406,6 @@ def generate_configurations( (CoreConfParamName.ARCHIVE.value, "forecast") ].id ), - # ConfigurationParameterPossibleValueCreate( - # configuration_parameter_value_id=conf_param_values[ - # (CoreConfParamName.CLIMATOLOGICAL_VARIABLE.value, "snwdays") - # ].id - # ), - # ConfigurationParameterPossibleValueCreate( - # configuration_parameter_value_id=conf_param_values[ - # (CoreConfParamName.AGGREGATION_PERIOD.value, "30yr") - # ].id - # ), - # ConfigurationParameterPossibleValueCreate( - # configuration_parameter_value_id=conf_param_values[ - # (CoreConfParamName.MEASURE.value, "anomaly") - # ].id - # ), ConfigurationParameterPossibleValueCreate( configuration_parameter_value_id=conf_param_values[ ( @@ -710,19 +448,9 @@ def generate_configurations( ), CoverageConfigurationCreate( name="snwdays_30yr_anomaly_annual_model_ec_earth_racmo22e", - # display_name_english=_DISPLAY_NAME_ENGLISH, - # display_name_italian=_DISPLAY_NAME_ITALIAN, - # description_english=_DESCRIPTION_ENGLISH, - # description_italian=_DESCRIPTION_ITALIAN, netcdf_main_dataset_name="snwdays", wms_main_layer_name="snwdays", thredds_url_pattern="indici5rcm/clipped/snwdays_an_1mm_2oc_EC-EARTH_RACMO22E_{scenario}_{time_window}_ls_VFVG.nc", - # unit_english="days", - # unit_italian="gg", - # palette="default/seq-YlOrBr-inv", - # color_scale_min=-50, - # color_scale_max=0, - # data_precision=_DATA_PRECISION, climatic_indicator_id=climatic_indicators["snwdays-anomaly-thirty_year"], possible_values=[ ConfigurationParameterPossibleValueCreate( @@ -730,21 +458,6 @@ def generate_configurations( (CoreConfParamName.ARCHIVE.value, "forecast") ].id ), - # ConfigurationParameterPossibleValueCreate( - # configuration_parameter_value_id=conf_param_values[ - # (CoreConfParamName.CLIMATOLOGICAL_VARIABLE.value, "snwdays") - # ].id - # ), - # ConfigurationParameterPossibleValueCreate( - # configuration_parameter_value_id=conf_param_values[ - # (CoreConfParamName.AGGREGATION_PERIOD.value, "30yr") - # ].id - # ), - # ConfigurationParameterPossibleValueCreate( - # configuration_parameter_value_id=conf_param_values[ - # (CoreConfParamName.MEASURE.value, "anomaly") - # ].id - # ), ConfigurationParameterPossibleValueCreate( configuration_parameter_value_id=conf_param_values[ ( @@ -787,19 +500,9 @@ def generate_configurations( ), CoverageConfigurationCreate( name="snwdays_30yr_anomaly_annual_model_ec_earth_rca4", - # display_name_english=_DISPLAY_NAME_ENGLISH, - # display_name_italian=_DISPLAY_NAME_ITALIAN, - # description_english=_DESCRIPTION_ENGLISH, - # description_italian=_DESCRIPTION_ITALIAN, netcdf_main_dataset_name="snwdays", wms_main_layer_name="snwdays", thredds_url_pattern="indici5rcm/clipped/snwdays_an_1mm_2oc_EC-EARTH_RCA4_{scenario}_{time_window}_ls_VFVG.nc", - # unit_english="days", - # unit_italian="gg", - # palette="default/seq-YlOrBr-inv", - # color_scale_min=-50, - # color_scale_max=0, - # data_precision=_DATA_PRECISION, climatic_indicator_id=climatic_indicators["snwdays-anomaly-thirty_year"], possible_values=[ ConfigurationParameterPossibleValueCreate( @@ -807,21 +510,6 @@ def generate_configurations( (CoreConfParamName.ARCHIVE.value, "forecast") ].id ), - # ConfigurationParameterPossibleValueCreate( - # configuration_parameter_value_id=conf_param_values[ - # (CoreConfParamName.CLIMATOLOGICAL_VARIABLE.value, "snwdays") - # ].id - # ), - # ConfigurationParameterPossibleValueCreate( - # configuration_parameter_value_id=conf_param_values[ - # (CoreConfParamName.AGGREGATION_PERIOD.value, "30yr") - # ].id - # ), - # ConfigurationParameterPossibleValueCreate( - # configuration_parameter_value_id=conf_param_values[ - # (CoreConfParamName.MEASURE.value, "anomaly") - # ].id - # ), ConfigurationParameterPossibleValueCreate( configuration_parameter_value_id=conf_param_values[ (CoreConfParamName.CLIMATOLOGICAL_MODEL.value, "ec_earth_rca4") @@ -861,19 +549,9 @@ def generate_configurations( ), CoverageConfigurationCreate( name="snwdays_30yr_anomaly_annual_model_hadgem2_es_racmo22e", - # display_name_english=_DISPLAY_NAME_ENGLISH, - # display_name_italian=_DISPLAY_NAME_ITALIAN, - # description_english=_DESCRIPTION_ENGLISH, - # description_italian=_DESCRIPTION_ITALIAN, netcdf_main_dataset_name="snwdays", wms_main_layer_name="snwdays", thredds_url_pattern="indici5rcm/clipped/snwdays_an_1mm_2oc_HadGEM2-ES_RACMO22E_{scenario}_{time_window}_ls_VFVG.nc", - # unit_english="days", - # unit_italian="gg", - # palette="default/seq-YlOrBr-inv", - # color_scale_min=-50, - # color_scale_max=0, - # data_precision=_DATA_PRECISION, climatic_indicator_id=climatic_indicators["snwdays-anomaly-thirty_year"], possible_values=[ ConfigurationParameterPossibleValueCreate( @@ -881,21 +559,6 @@ def generate_configurations( (CoreConfParamName.ARCHIVE.value, "forecast") ].id ), - # ConfigurationParameterPossibleValueCreate( - # configuration_parameter_value_id=conf_param_values[ - # (CoreConfParamName.CLIMATOLOGICAL_VARIABLE.value, "snwdays") - # ].id - # ), - # ConfigurationParameterPossibleValueCreate( - # configuration_parameter_value_id=conf_param_values[ - # (CoreConfParamName.AGGREGATION_PERIOD.value, "30yr") - # ].id - # ), - # ConfigurationParameterPossibleValueCreate( - # configuration_parameter_value_id=conf_param_values[ - # (CoreConfParamName.MEASURE.value, "anomaly") - # ].id - # ), ConfigurationParameterPossibleValueCreate( configuration_parameter_value_id=conf_param_values[ ( @@ -938,19 +601,9 @@ def generate_configurations( ), CoverageConfigurationCreate( name="snwdays_30yr_anomaly_annual_model_mpi_esm_lr_remo2009", - # display_name_english=_DISPLAY_NAME_ENGLISH, - # display_name_italian=_DISPLAY_NAME_ITALIAN, - # description_english=_DESCRIPTION_ENGLISH, - # description_italian=_DESCRIPTION_ITALIAN, netcdf_main_dataset_name="snwdays", wms_main_layer_name="snwdays", thredds_url_pattern="indici5rcm/clipped/snwdays_an_1mm_2oc_MPI-ESM-LR_REMO2009_{scenario}_{time_window}_ls_VFVG.nc", - # unit_english="days", - # unit_italian="gg", - # palette="default/seq-YlOrBr-inv", - # color_scale_min=-50, - # color_scale_max=0, - # data_precision=_DATA_PRECISION, climatic_indicator_id=climatic_indicators["snwdays-anomaly-thirty_year"], possible_values=[ ConfigurationParameterPossibleValueCreate( @@ -958,21 +611,6 @@ def generate_configurations( (CoreConfParamName.ARCHIVE.value, "forecast") ].id ), - # ConfigurationParameterPossibleValueCreate( - # configuration_parameter_value_id=conf_param_values[ - # (CoreConfParamName.CLIMATOLOGICAL_VARIABLE.value, "snwdays") - # ].id - # ), - # ConfigurationParameterPossibleValueCreate( - # configuration_parameter_value_id=conf_param_values[ - # (CoreConfParamName.AGGREGATION_PERIOD.value, "30yr") - # ].id - # ), - # ConfigurationParameterPossibleValueCreate( - # configuration_parameter_value_id=conf_param_values[ - # (CoreConfParamName.MEASURE.value, "anomaly") - # ].id - # ), ConfigurationParameterPossibleValueCreate( configuration_parameter_value_id=conf_param_values[ ( diff --git a/arpav_ppcv/bootstrapper/coverage_configurations/forecast/su30.py b/arpav_ppcv/bootstrapper/coverage_configurations/forecast/su30.py index af4f0534..d38eb7dd 100644 --- a/arpav_ppcv/bootstrapper/coverage_configurations/forecast/su30.py +++ b/arpav_ppcv/bootstrapper/coverage_configurations/forecast/su30.py @@ -1,40 +1,20 @@ -from ....schemas.base import ( - CoreConfParamName, - ObservationAggregationType, -) +from ....schemas.base import CoreConfParamName from ....schemas.coverages import ( CoverageConfigurationCreate, ConfigurationParameterPossibleValueCreate, ) -# _DISPLAY_NAME_ENGLISH = "Hot days" -# _DISPLAY_NAME_ITALIAN = "Giorni caldi" -# _DESCRIPTION_ENGLISH = "Number of days with maximum temperature greater than 30 °C" -# _DESCRIPTION_ITALIAN = "Numero di giorni con temperatura massima superiore a 30 °C" -# _DATA_PRECISION = 0 - def generate_configurations( conf_param_values, - variables, climatic_indicators: dict[str, int], ) -> list[CoverageConfigurationCreate]: return [ CoverageConfigurationCreate( name="su30_annual_absolute_model_ensemble", - # display_name_english=_DISPLAY_NAME_ENGLISH, - # display_name_italian=_DISPLAY_NAME_ITALIAN, - # description_english=_DESCRIPTION_ENGLISH, - # description_italian=_DESCRIPTION_ITALIAN, netcdf_main_dataset_name="su30", wms_main_layer_name="su30", thredds_url_pattern="ensymbc/clipped/ecasu_30_avg_{scenario}_ts19762100_ls_VFVG.nc", - # unit_english="days", - # unit_italian="gg", - # palette="default/seq-YlOrRd", - # color_scale_min=0, - # color_scale_max=100, - # data_precision=_DATA_PRECISION, climatic_indicator_id=climatic_indicators["su30-absolute-annual"], possible_values=[ ConfigurationParameterPossibleValueCreate( @@ -42,21 +22,6 @@ def generate_configurations( (CoreConfParamName.ARCHIVE.value, "forecast") ].id ), - # ConfigurationParameterPossibleValueCreate( - # configuration_parameter_value_id=conf_param_values[ - # (CoreConfParamName.CLIMATOLOGICAL_VARIABLE.value, "su30") - # ].id - # ), - # ConfigurationParameterPossibleValueCreate( - # configuration_parameter_value_id=conf_param_values[ - # (CoreConfParamName.AGGREGATION_PERIOD.value, "annual") - # ].id - # ), - # ConfigurationParameterPossibleValueCreate( - # configuration_parameter_value_id=conf_param_values[ - # (CoreConfParamName.MEASURE.value, "absolute") - # ].id - # ), ConfigurationParameterPossibleValueCreate( configuration_parameter_value_id=conf_param_values[ (CoreConfParamName.CLIMATOLOGICAL_MODEL.value, "model_ensemble") @@ -83,26 +48,12 @@ def generate_configurations( ].id ), ], - observation_variable_id=( - v.id if (v := variables.get("SU30")) is not None else None - ), - observation_variable_aggregation_type=ObservationAggregationType.SEASONAL, ), CoverageConfigurationCreate( name="su30_annual_absolute_model_ec_earth_cclm4_8_17", - # display_name_english=_DISPLAY_NAME_ENGLISH, - # display_name_italian=_DISPLAY_NAME_ITALIAN, - # description_english=_DESCRIPTION_ENGLISH, - # description_italian=_DESCRIPTION_ITALIAN, netcdf_main_dataset_name="su30", wms_main_layer_name="su30", thredds_url_pattern="EC-EARTH_CCLM4-8-17ymbc/clipped/ecasu_30_EC-EARTH_CCLM4-8-17_{scenario}_ts19762100_ls_VFVG.nc", - # unit_english="days", - # unit_italian="gg", - # palette="default/seq-YlOrRd", - # color_scale_min=0, - # color_scale_max=100, - # data_precision=_DATA_PRECISION, climatic_indicator_id=climatic_indicators["su30-absolute-annual"], possible_values=[ ConfigurationParameterPossibleValueCreate( @@ -110,21 +61,6 @@ def generate_configurations( (CoreConfParamName.ARCHIVE.value, "forecast") ].id ), - # ConfigurationParameterPossibleValueCreate( - # configuration_parameter_value_id=conf_param_values[ - # (CoreConfParamName.CLIMATOLOGICAL_VARIABLE.value, "su30") - # ].id - # ), - # ConfigurationParameterPossibleValueCreate( - # configuration_parameter_value_id=conf_param_values[ - # (CoreConfParamName.AGGREGATION_PERIOD.value, "annual") - # ].id - # ), - # ConfigurationParameterPossibleValueCreate( - # configuration_parameter_value_id=conf_param_values[ - # (CoreConfParamName.MEASURE.value, "absolute") - # ].id - # ), ConfigurationParameterPossibleValueCreate( configuration_parameter_value_id=conf_param_values[ ( @@ -154,26 +90,12 @@ def generate_configurations( ].id ), ], - observation_variable_id=( - v.id if (v := variables.get("SU30")) is not None else None - ), - observation_variable_aggregation_type=ObservationAggregationType.SEASONAL, ), CoverageConfigurationCreate( name="su30_annual_absolute_model_ec_earth_racmo22e", - # display_name_english=_DISPLAY_NAME_ENGLISH, - # display_name_italian=_DISPLAY_NAME_ITALIAN, - # description_english=_DESCRIPTION_ENGLISH, - # description_italian=_DESCRIPTION_ITALIAN, netcdf_main_dataset_name="su30", wms_main_layer_name="su30", thredds_url_pattern="EC-EARTH_RACMO22Eymbc/clipped/ecasu_30_EC-EARTH_RACMO22E_{scenario}_ts19762100_ls_VFVG.nc", - # unit_english="days", - # unit_italian="gg", - # palette="default/seq-YlOrRd", - # color_scale_min=0, - # color_scale_max=100, - # data_precision=_DATA_PRECISION, climatic_indicator_id=climatic_indicators["su30-absolute-annual"], possible_values=[ ConfigurationParameterPossibleValueCreate( @@ -181,21 +103,6 @@ def generate_configurations( (CoreConfParamName.ARCHIVE.value, "forecast") ].id ), - # ConfigurationParameterPossibleValueCreate( - # configuration_parameter_value_id=conf_param_values[ - # (CoreConfParamName.CLIMATOLOGICAL_VARIABLE.value, "su30") - # ].id - # ), - # ConfigurationParameterPossibleValueCreate( - # configuration_parameter_value_id=conf_param_values[ - # (CoreConfParamName.AGGREGATION_PERIOD.value, "annual") - # ].id - # ), - # ConfigurationParameterPossibleValueCreate( - # configuration_parameter_value_id=conf_param_values[ - # (CoreConfParamName.MEASURE.value, "absolute") - # ].id - # ), ConfigurationParameterPossibleValueCreate( configuration_parameter_value_id=conf_param_values[ ( @@ -225,26 +132,12 @@ def generate_configurations( ].id ), ], - observation_variable_id=( - v.id if (v := variables.get("SU30")) is not None else None - ), - observation_variable_aggregation_type=ObservationAggregationType.SEASONAL, ), CoverageConfigurationCreate( name="su30_annual_absolute_model_ec_earth_rca4", - # display_name_english=_DISPLAY_NAME_ENGLISH, - # display_name_italian=_DISPLAY_NAME_ITALIAN, - # description_english=_DESCRIPTION_ENGLISH, - # description_italian=_DESCRIPTION_ITALIAN, netcdf_main_dataset_name="su30", wms_main_layer_name="su30", thredds_url_pattern="EC-EARTH_RCA4ymbc/clipped/ecasu_30_EC-EARTH_RCA4_{scenario}_ts19762100_ls_VFVG.nc", - # unit_english="days", - # unit_italian="gg", - # palette="default/seq-YlOrRd", - # color_scale_min=0, - # color_scale_max=100, - # data_precision=_DATA_PRECISION, climatic_indicator_id=climatic_indicators["su30-absolute-annual"], possible_values=[ ConfigurationParameterPossibleValueCreate( @@ -252,21 +145,6 @@ def generate_configurations( (CoreConfParamName.ARCHIVE.value, "forecast") ].id ), - # ConfigurationParameterPossibleValueCreate( - # configuration_parameter_value_id=conf_param_values[ - # (CoreConfParamName.CLIMATOLOGICAL_VARIABLE.value, "su30") - # ].id - # ), - # ConfigurationParameterPossibleValueCreate( - # configuration_parameter_value_id=conf_param_values[ - # (CoreConfParamName.AGGREGATION_PERIOD.value, "annual") - # ].id - # ), - # ConfigurationParameterPossibleValueCreate( - # configuration_parameter_value_id=conf_param_values[ - # (CoreConfParamName.MEASURE.value, "absolute") - # ].id - # ), ConfigurationParameterPossibleValueCreate( configuration_parameter_value_id=conf_param_values[ (CoreConfParamName.CLIMATOLOGICAL_MODEL.value, "ec_earth_rca4") @@ -293,26 +171,12 @@ def generate_configurations( ].id ), ], - observation_variable_id=( - v.id if (v := variables.get("SU30")) is not None else None - ), - observation_variable_aggregation_type=ObservationAggregationType.SEASONAL, ), CoverageConfigurationCreate( name="su30_annual_absolute_model_hadgem2_es_racmo22e", - # display_name_english=_DISPLAY_NAME_ENGLISH, - # display_name_italian=_DISPLAY_NAME_ITALIAN, - # description_english=_DESCRIPTION_ENGLISH, - # description_italian=_DESCRIPTION_ITALIAN, netcdf_main_dataset_name="su30", wms_main_layer_name="su30", thredds_url_pattern="HadGEM2-ES_RACMO22Eymbc/clipped/ecasu_30_HadGEM2-ES_RACMO22E_{scenario}_ts19762100_ls_VFVG.nc", - # unit_english="days", - # unit_italian="gg", - # palette="default/seq-YlOrRd", - # color_scale_min=0, - # color_scale_max=100, - # data_precision=_DATA_PRECISION, climatic_indicator_id=climatic_indicators["su30-absolute-annual"], possible_values=[ ConfigurationParameterPossibleValueCreate( @@ -320,21 +184,6 @@ def generate_configurations( (CoreConfParamName.ARCHIVE.value, "forecast") ].id ), - # ConfigurationParameterPossibleValueCreate( - # configuration_parameter_value_id=conf_param_values[ - # (CoreConfParamName.CLIMATOLOGICAL_VARIABLE.value, "su30") - # ].id - # ), - # ConfigurationParameterPossibleValueCreate( - # configuration_parameter_value_id=conf_param_values[ - # (CoreConfParamName.AGGREGATION_PERIOD.value, "annual") - # ].id - # ), - # ConfigurationParameterPossibleValueCreate( - # configuration_parameter_value_id=conf_param_values[ - # (CoreConfParamName.MEASURE.value, "absolute") - # ].id - # ), ConfigurationParameterPossibleValueCreate( configuration_parameter_value_id=conf_param_values[ ( @@ -364,26 +213,12 @@ def generate_configurations( ].id ), ], - observation_variable_id=( - v.id if (v := variables.get("SU30")) is not None else None - ), - observation_variable_aggregation_type=ObservationAggregationType.SEASONAL, ), CoverageConfigurationCreate( name="su30_annual_absolute_model_mpi_esm_lr_remo2009", - # display_name_english=_DISPLAY_NAME_ENGLISH, - # display_name_italian=_DISPLAY_NAME_ITALIAN, - # description_english=_DESCRIPTION_ENGLISH, - # description_italian=_DESCRIPTION_ITALIAN, netcdf_main_dataset_name="su30", wms_main_layer_name="su30", thredds_url_pattern="MPI-ESM-LR_REMO2009ymbc/clipped/ecasu_30_MPI-ESM-LR_REMO2009_{scenario}_ts19762100_ls_VFVG.nc", - # unit_english="days", - # unit_italian="gg", - # palette="default/seq-YlOrRd", - # color_scale_min=0, - # color_scale_max=100, - # data_precision=_DATA_PRECISION, climatic_indicator_id=climatic_indicators["su30-absolute-annual"], possible_values=[ ConfigurationParameterPossibleValueCreate( @@ -391,21 +226,6 @@ def generate_configurations( (CoreConfParamName.ARCHIVE.value, "forecast") ].id ), - # ConfigurationParameterPossibleValueCreate( - # configuration_parameter_value_id=conf_param_values[ - # (CoreConfParamName.CLIMATOLOGICAL_VARIABLE.value, "su30") - # ].id - # ), - # ConfigurationParameterPossibleValueCreate( - # configuration_parameter_value_id=conf_param_values[ - # (CoreConfParamName.AGGREGATION_PERIOD.value, "annual") - # ].id - # ), - # ConfigurationParameterPossibleValueCreate( - # configuration_parameter_value_id=conf_param_values[ - # (CoreConfParamName.MEASURE.value, "absolute") - # ].id - # ), ConfigurationParameterPossibleValueCreate( configuration_parameter_value_id=conf_param_values[ ( @@ -435,26 +255,12 @@ def generate_configurations( ].id ), ], - observation_variable_id=( - v.id if (v := variables.get("SU30")) is not None else None - ), - observation_variable_aggregation_type=ObservationAggregationType.SEASONAL, ), CoverageConfigurationCreate( name="su30_annual_absolute_model_ensemble_upper_uncertainty", - # display_name_english=_DISPLAY_NAME_ENGLISH, - # display_name_italian=_DISPLAY_NAME_ITALIAN, - # description_english=_DESCRIPTION_ENGLISH, - # description_italian=_DESCRIPTION_ITALIAN, netcdf_main_dataset_name="su30_stdup", wms_main_layer_name="su30_stdup", thredds_url_pattern="ensymbc/std/clipped/ecasu_30_stdup_{scenario}_ts19762100_ls_VFVG.nc", - # unit_english="days", - # unit_italian="gg", - # palette="default/seq-YlOrRd", - # color_scale_min=0, - # color_scale_max=100, - # data_precision=_DATA_PRECISION, climatic_indicator_id=climatic_indicators["su30-absolute-annual"], possible_values=[ ConfigurationParameterPossibleValueCreate( @@ -462,21 +268,6 @@ def generate_configurations( (CoreConfParamName.ARCHIVE.value, "forecast") ].id ), - # ConfigurationParameterPossibleValueCreate( - # configuration_parameter_value_id=conf_param_values[ - # (CoreConfParamName.CLIMATOLOGICAL_VARIABLE.value, "su30") - # ].id - # ), - # ConfigurationParameterPossibleValueCreate( - # configuration_parameter_value_id=conf_param_values[ - # (CoreConfParamName.AGGREGATION_PERIOD.value, "annual") - # ].id - # ), - # ConfigurationParameterPossibleValueCreate( - # configuration_parameter_value_id=conf_param_values[ - # (CoreConfParamName.MEASURE.value, "absolute") - # ].id - # ), ConfigurationParameterPossibleValueCreate( configuration_parameter_value_id=conf_param_values[ (CoreConfParamName.CLIMATOLOGICAL_MODEL.value, "model_ensemble") @@ -511,19 +302,9 @@ def generate_configurations( ), CoverageConfigurationCreate( name="su30_annual_absolute_model_ensemble_lower_uncertainty", - # display_name_english=_DISPLAY_NAME_ENGLISH, - # display_name_italian=_DISPLAY_NAME_ITALIAN, - # description_english=_DESCRIPTION_ENGLISH, - # description_italian=_DESCRIPTION_ITALIAN, netcdf_main_dataset_name="su30_stddown", wms_main_layer_name="su30_stddown", thredds_url_pattern="ensymbc/std/clipped/ecasu_30_stddown_{scenario}_ts19762100_ls_VFVG.nc", - # unit_english="days", - # unit_italian="gg", - # palette="default/seq-YlOrRd", - # color_scale_min=0, - # color_scale_max=100, - # data_precision=_DATA_PRECISION, climatic_indicator_id=climatic_indicators["su30-absolute-annual"], possible_values=[ ConfigurationParameterPossibleValueCreate( @@ -531,21 +312,6 @@ def generate_configurations( (CoreConfParamName.ARCHIVE.value, "forecast") ].id ), - # ConfigurationParameterPossibleValueCreate( - # configuration_parameter_value_id=conf_param_values[ - # (CoreConfParamName.CLIMATOLOGICAL_VARIABLE.value, "su30") - # ].id - # ), - # ConfigurationParameterPossibleValueCreate( - # configuration_parameter_value_id=conf_param_values[ - # (CoreConfParamName.AGGREGATION_PERIOD.value, "annual") - # ].id - # ), - # ConfigurationParameterPossibleValueCreate( - # configuration_parameter_value_id=conf_param_values[ - # (CoreConfParamName.MEASURE.value, "absolute") - # ].id - # ), ConfigurationParameterPossibleValueCreate( configuration_parameter_value_id=conf_param_values[ (CoreConfParamName.CLIMATOLOGICAL_MODEL.value, "model_ensemble") @@ -580,20 +346,10 @@ def generate_configurations( ), CoverageConfigurationCreate( name="su30_30yr_anomaly_annual_agree_model_ensemble", - # display_name_english=_DISPLAY_NAME_ENGLISH, - # display_name_italian=_DISPLAY_NAME_ITALIAN, - # description_english=_DESCRIPTION_ENGLISH, - # description_italian=_DESCRIPTION_ITALIAN, netcdf_main_dataset_name="su30", wms_main_layer_name="su30-uncertainty_group", wms_secondary_layer_name="su30", thredds_url_pattern="ensembletwbc/std/clipped/ecasuan_30_avgagree_{time_window}_{scenario}_ls_VFVG.nc", - # unit_english="days", - # unit_italian="gg", - # palette="uncert-stippled/seq-YlOrRd", - # color_scale_min=-5, - # color_scale_max=75, - # data_precision=_DATA_PRECISION, climatic_indicator_id=climatic_indicators["su30-anomaly-thirty_year"], possible_values=[ ConfigurationParameterPossibleValueCreate( @@ -601,21 +357,6 @@ def generate_configurations( (CoreConfParamName.ARCHIVE.value, "forecast") ].id ), - # ConfigurationParameterPossibleValueCreate( - # configuration_parameter_value_id=conf_param_values[ - # (CoreConfParamName.CLIMATOLOGICAL_VARIABLE.value, "su30") - # ].id - # ), - # ConfigurationParameterPossibleValueCreate( - # configuration_parameter_value_id=conf_param_values[ - # (CoreConfParamName.AGGREGATION_PERIOD.value, "30yr") - # ].id - # ), - # ConfigurationParameterPossibleValueCreate( - # configuration_parameter_value_id=conf_param_values[ - # (CoreConfParamName.MEASURE.value, "anomaly") - # ].id - # ), ConfigurationParameterPossibleValueCreate( configuration_parameter_value_id=conf_param_values[ (CoreConfParamName.CLIMATOLOGICAL_MODEL.value, "model_ensemble") @@ -655,19 +396,9 @@ def generate_configurations( ), CoverageConfigurationCreate( name="su30_30yr_anomaly_annual_model_ec_earth_cclm4_8_17", - # display_name_english=_DISPLAY_NAME_ENGLISH, - # display_name_italian=_DISPLAY_NAME_ITALIAN, - # description_english=_DESCRIPTION_ENGLISH, - # description_italian=_DESCRIPTION_ITALIAN, netcdf_main_dataset_name="su30", wms_main_layer_name="su30", thredds_url_pattern="indici5rcm/clipped/ecasuan_30_EC-EARTH_CCLM4-8-17_{scenario}_{time_window}_ls_VFVG.nc", - # unit_english="days", - # unit_italian="gg", - # palette="default/seq-YlOrRd", - # color_scale_min=-5, - # color_scale_max=75, - # data_precision=_DATA_PRECISION, climatic_indicator_id=climatic_indicators["su30-anomaly-thirty_year"], possible_values=[ ConfigurationParameterPossibleValueCreate( @@ -675,21 +406,6 @@ def generate_configurations( (CoreConfParamName.ARCHIVE.value, "forecast") ].id ), - # ConfigurationParameterPossibleValueCreate( - # configuration_parameter_value_id=conf_param_values[ - # (CoreConfParamName.CLIMATOLOGICAL_VARIABLE.value, "su30") - # ].id - # ), - # ConfigurationParameterPossibleValueCreate( - # configuration_parameter_value_id=conf_param_values[ - # (CoreConfParamName.AGGREGATION_PERIOD.value, "30yr") - # ].id - # ), - # ConfigurationParameterPossibleValueCreate( - # configuration_parameter_value_id=conf_param_values[ - # (CoreConfParamName.MEASURE.value, "anomaly") - # ].id - # ), ConfigurationParameterPossibleValueCreate( configuration_parameter_value_id=conf_param_values[ ( @@ -732,19 +448,9 @@ def generate_configurations( ), CoverageConfigurationCreate( name="su30_30yr_anomaly_annual_model_ec_earth_racmo22e", - # display_name_english=_DISPLAY_NAME_ENGLISH, - # display_name_italian=_DISPLAY_NAME_ITALIAN, - # description_english=_DESCRIPTION_ENGLISH, - # description_italian=_DESCRIPTION_ITALIAN, netcdf_main_dataset_name="su30", wms_main_layer_name="su30", thredds_url_pattern="indici5rcm/clipped/ecasuan_30_EC-EARTH_RACMO22E_{scenario}_{time_window}_ls_VFVG.nc", - # unit_english="days", - # unit_italian="gg", - # palette="default/seq-YlOrRd", - # color_scale_min=-5, - # color_scale_max=75, - # data_precision=_DATA_PRECISION, climatic_indicator_id=climatic_indicators["su30-anomaly-thirty_year"], possible_values=[ ConfigurationParameterPossibleValueCreate( @@ -752,21 +458,6 @@ def generate_configurations( (CoreConfParamName.ARCHIVE.value, "forecast") ].id ), - # ConfigurationParameterPossibleValueCreate( - # configuration_parameter_value_id=conf_param_values[ - # (CoreConfParamName.CLIMATOLOGICAL_VARIABLE.value, "su30") - # ].id - # ), - # ConfigurationParameterPossibleValueCreate( - # configuration_parameter_value_id=conf_param_values[ - # (CoreConfParamName.AGGREGATION_PERIOD.value, "30yr") - # ].id - # ), - # ConfigurationParameterPossibleValueCreate( - # configuration_parameter_value_id=conf_param_values[ - # (CoreConfParamName.MEASURE.value, "anomaly") - # ].id - # ), ConfigurationParameterPossibleValueCreate( configuration_parameter_value_id=conf_param_values[ ( @@ -809,19 +500,9 @@ def generate_configurations( ), CoverageConfigurationCreate( name="su30_30yr_anomaly_annual_model_ec_earth_rca4", - # display_name_english=_DISPLAY_NAME_ENGLISH, - # display_name_italian=_DISPLAY_NAME_ITALIAN, - # description_english=_DESCRIPTION_ENGLISH, - # description_italian=_DESCRIPTION_ITALIAN, netcdf_main_dataset_name="su30", wms_main_layer_name="su30", thredds_url_pattern="indici5rcm/clipped/ecasuan_30_EC-EARTH_RCA4_{scenario}_{time_window}_ls_VFVG.nc", - # unit_english="days", - # unit_italian="gg", - # palette="default/seq-YlOrRd", - # color_scale_min=-5, - # color_scale_max=75, - # data_precision=_DATA_PRECISION, climatic_indicator_id=climatic_indicators["su30-anomaly-thirty_year"], possible_values=[ ConfigurationParameterPossibleValueCreate( @@ -829,21 +510,6 @@ def generate_configurations( (CoreConfParamName.ARCHIVE.value, "forecast") ].id ), - # ConfigurationParameterPossibleValueCreate( - # configuration_parameter_value_id=conf_param_values[ - # (CoreConfParamName.CLIMATOLOGICAL_VARIABLE.value, "su30") - # ].id - # ), - # ConfigurationParameterPossibleValueCreate( - # configuration_parameter_value_id=conf_param_values[ - # (CoreConfParamName.AGGREGATION_PERIOD.value, "30yr") - # ].id - # ), - # ConfigurationParameterPossibleValueCreate( - # configuration_parameter_value_id=conf_param_values[ - # (CoreConfParamName.MEASURE.value, "anomaly") - # ].id - # ), ConfigurationParameterPossibleValueCreate( configuration_parameter_value_id=conf_param_values[ (CoreConfParamName.CLIMATOLOGICAL_MODEL.value, "ec_earth_rca4") @@ -883,19 +549,9 @@ def generate_configurations( ), CoverageConfigurationCreate( name="su30_30yr_anomaly_annual_model_hadgem2_es_racmo22e", - # display_name_english=_DISPLAY_NAME_ENGLISH, - # display_name_italian=_DISPLAY_NAME_ITALIAN, - # description_english=_DESCRIPTION_ENGLISH, - # description_italian=_DESCRIPTION_ITALIAN, netcdf_main_dataset_name="su30", wms_main_layer_name="su30", thredds_url_pattern="indici5rcm/clipped/ecasuan_30_HadGEM2-ES_RACMO22E_{scenario}_{time_window}_ls_VFVG.nc", - # unit_english="days", - # unit_italian="gg", - # palette="default/seq-YlOrRd", - # color_scale_min=-5, - # color_scale_max=75, - # data_precision=_DATA_PRECISION, climatic_indicator_id=climatic_indicators["su30-anomaly-thirty_year"], possible_values=[ ConfigurationParameterPossibleValueCreate( @@ -903,21 +559,6 @@ def generate_configurations( (CoreConfParamName.ARCHIVE.value, "forecast") ].id ), - # ConfigurationParameterPossibleValueCreate( - # configuration_parameter_value_id=conf_param_values[ - # (CoreConfParamName.CLIMATOLOGICAL_VARIABLE.value, "su30") - # ].id - # ), - # ConfigurationParameterPossibleValueCreate( - # configuration_parameter_value_id=conf_param_values[ - # (CoreConfParamName.AGGREGATION_PERIOD.value, "30yr") - # ].id - # ), - # ConfigurationParameterPossibleValueCreate( - # configuration_parameter_value_id=conf_param_values[ - # (CoreConfParamName.MEASURE.value, "anomaly") - # ].id - # ), ConfigurationParameterPossibleValueCreate( configuration_parameter_value_id=conf_param_values[ ( @@ -960,19 +601,9 @@ def generate_configurations( ), CoverageConfigurationCreate( name="su30_30yr_anomaly_annual_model_mpi_esm_lr_remo2009", - # display_name_english=_DISPLAY_NAME_ENGLISH, - # display_name_italian=_DISPLAY_NAME_ITALIAN, - # description_english=_DESCRIPTION_ENGLISH, - # description_italian=_DESCRIPTION_ITALIAN, netcdf_main_dataset_name="su30", wms_main_layer_name="su30", thredds_url_pattern="indici5rcm/clipped/ecasuan_30_MPI-ESM-LR_REMO2009_{scenario}_{time_window}_ls_VFVG.nc", - # unit_english="days", - # unit_italian="gg", - # palette="default/seq-YlOrRd", - # color_scale_min=-5, - # color_scale_max=75, - # data_precision=_DATA_PRECISION, climatic_indicator_id=climatic_indicators["su30-anomaly-thirty_year"], possible_values=[ ConfigurationParameterPossibleValueCreate( @@ -980,21 +611,6 @@ def generate_configurations( (CoreConfParamName.ARCHIVE.value, "forecast") ].id ), - # ConfigurationParameterPossibleValueCreate( - # configuration_parameter_value_id=conf_param_values[ - # (CoreConfParamName.CLIMATOLOGICAL_VARIABLE.value, "su30") - # ].id - # ), - # ConfigurationParameterPossibleValueCreate( - # configuration_parameter_value_id=conf_param_values[ - # (CoreConfParamName.AGGREGATION_PERIOD.value, "30yr") - # ].id - # ), - # ConfigurationParameterPossibleValueCreate( - # configuration_parameter_value_id=conf_param_values[ - # (CoreConfParamName.MEASURE.value, "anomaly") - # ].id - # ), ConfigurationParameterPossibleValueCreate( configuration_parameter_value_id=conf_param_values[ ( diff --git a/arpav_ppcv/bootstrapper/coverage_configurations/forecast/tas.py b/arpav_ppcv/bootstrapper/coverage_configurations/forecast/tas.py index 1922f4b1..34508053 100644 --- a/arpav_ppcv/bootstrapper/coverage_configurations/forecast/tas.py +++ b/arpav_ppcv/bootstrapper/coverage_configurations/forecast/tas.py @@ -1,39 +1,20 @@ -from ....schemas.base import ( - CoreConfParamName, - ObservationAggregationType, -) +from ....schemas.base import CoreConfParamName from ....schemas.coverages import ( CoverageConfigurationCreate, ConfigurationParameterPossibleValueCreate, ) -# _DISPLAY_NAME_ENGLISH = "Average temperature" -# _DISPLAY_NAME_ITALIAN = "Temperatura media" -# _DESCRIPTION_ENGLISH = "Average daily air temperature near the ground" -# _DESCRIPTION_ITALIAN = "Temperatura media giornaliera dell'aria vicino al suolo" -# _DATA_PRECISION = 1 - def generate_configurations( conf_param_values, - variables, climatic_indicators: dict[str, int], ) -> list[CoverageConfigurationCreate]: return [ CoverageConfigurationCreate( name="tas_seasonal_anomaly_model_ensemble", - # display_name_english=_DISPLAY_NAME_ENGLISH, - # display_name_italian=_DISPLAY_NAME_ITALIAN, - # description_english=_DESCRIPTION_ENGLISH, - # description_italian=_DESCRIPTION_ITALIAN, netcdf_main_dataset_name="tas", wms_main_layer_name="tas", thredds_url_pattern="ens5ym/clipped/tas_anom_pp_ts_{scenario}_{year_period}_VFVGTAA.nc", - # unit_english="ºC", - # palette="default/seq-YlOrRd", - # color_scale_min=0, - # color_scale_max=6, - # data_precision=_DATA_PRECISION, climatic_indicator_id=climatic_indicators["tas-anomaly-annual"], possible_values=[ ConfigurationParameterPossibleValueCreate( @@ -41,21 +22,6 @@ def generate_configurations( (CoreConfParamName.ARCHIVE.value, "forecast") ].id ), - # ConfigurationParameterPossibleValueCreate( - # configuration_parameter_value_id=conf_param_values[ - # (CoreConfParamName.CLIMATOLOGICAL_VARIABLE.value, "tas") - # ].id - # ), - # ConfigurationParameterPossibleValueCreate( - # configuration_parameter_value_id=conf_param_values[ - # (CoreConfParamName.AGGREGATION_PERIOD.value, "annual") - # ].id - # ), - # ConfigurationParameterPossibleValueCreate( - # configuration_parameter_value_id=conf_param_values[ - # (CoreConfParamName.MEASURE.value, "anomaly") - # ].id - # ), ConfigurationParameterPossibleValueCreate( configuration_parameter_value_id=conf_param_values[ (CoreConfParamName.CLIMATOLOGICAL_MODEL.value, "model_ensemble") @@ -100,18 +66,9 @@ def generate_configurations( ), CoverageConfigurationCreate( name="tas_seasonal_anomaly_model_ec_earth_cclm4_8_17", - # display_name_english=_DISPLAY_NAME_ENGLISH, - # display_name_italian=_DISPLAY_NAME_ITALIAN, - # description_english=_DESCRIPTION_ENGLISH, - # description_italian=_DESCRIPTION_ITALIAN, netcdf_main_dataset_name="tas", wms_main_layer_name="tas", thredds_url_pattern="EC-EARTH_CCLM4-8-17ym/clipped/tas_EC-EARTH_CCLM4-8-17_{scenario}_{year_period}_anomaly_pp_VFVGTAA.nc", - # unit_english="ºC", - # palette="default/seq-YlOrRd", - # color_scale_min=0, - # color_scale_max=6, - # data_precision=_DATA_PRECISION, climatic_indicator_id=climatic_indicators["tas-anomaly-annual"], possible_values=[ ConfigurationParameterPossibleValueCreate( @@ -119,21 +76,6 @@ def generate_configurations( (CoreConfParamName.ARCHIVE.value, "forecast") ].id ), - # ConfigurationParameterPossibleValueCreate( - # configuration_parameter_value_id=conf_param_values[ - # (CoreConfParamName.CLIMATOLOGICAL_VARIABLE.value, "tas") - # ].id - # ), - # ConfigurationParameterPossibleValueCreate( - # configuration_parameter_value_id=conf_param_values[ - # (CoreConfParamName.AGGREGATION_PERIOD.value, "annual") - # ].id - # ), - # ConfigurationParameterPossibleValueCreate( - # configuration_parameter_value_id=conf_param_values[ - # (CoreConfParamName.MEASURE.value, "anomaly") - # ].id - # ), ConfigurationParameterPossibleValueCreate( configuration_parameter_value_id=conf_param_values[ ( @@ -181,18 +123,9 @@ def generate_configurations( ), CoverageConfigurationCreate( name="tas_seasonal_anomaly_model_ec_earth_racmo22e", - # display_name_english=_DISPLAY_NAME_ENGLISH, - # display_name_italian=_DISPLAY_NAME_ITALIAN, - # description_english=_DESCRIPTION_ENGLISH, - # description_italian=_DESCRIPTION_ITALIAN, netcdf_main_dataset_name="tas", wms_main_layer_name="tas", thredds_url_pattern="EC-EARTH_RACMO22Eym/clipped/tas_EC-EARTH_RACMO22E_{scenario}_{year_period}_anomaly_pp_VFVGTAA.nc", - # unit_english="ºC", - # palette="default/seq-YlOrRd", - # color_scale_min=0, - # color_scale_max=6, - # data_precision=_DATA_PRECISION, climatic_indicator_id=climatic_indicators["tas-anomaly-annual"], possible_values=[ ConfigurationParameterPossibleValueCreate( @@ -200,21 +133,6 @@ def generate_configurations( (CoreConfParamName.ARCHIVE.value, "forecast") ].id ), - # ConfigurationParameterPossibleValueCreate( - # configuration_parameter_value_id=conf_param_values[ - # (CoreConfParamName.CLIMATOLOGICAL_VARIABLE.value, "tas") - # ].id - # ), - # ConfigurationParameterPossibleValueCreate( - # configuration_parameter_value_id=conf_param_values[ - # (CoreConfParamName.AGGREGATION_PERIOD.value, "annual") - # ].id - # ), - # ConfigurationParameterPossibleValueCreate( - # configuration_parameter_value_id=conf_param_values[ - # (CoreConfParamName.MEASURE.value, "anomaly") - # ].id - # ), ConfigurationParameterPossibleValueCreate( configuration_parameter_value_id=conf_param_values[ ( @@ -262,18 +180,9 @@ def generate_configurations( ), CoverageConfigurationCreate( name="tas_seasonal_anomaly_model_ec_earth_rca4", - # display_name_english=_DISPLAY_NAME_ENGLISH, - # display_name_italian=_DISPLAY_NAME_ITALIAN, - # description_english=_DESCRIPTION_ENGLISH, - # description_italian=_DESCRIPTION_ITALIAN, netcdf_main_dataset_name="tas", wms_main_layer_name="tas", thredds_url_pattern="EC-EARTH_RCA4ym/clipped/tas_EC-EARTH_RCA4_{scenario}_{year_period}_anomaly_pp_VFVGTAA.nc", - # unit_english="ºC", - # palette="default/seq-YlOrRd", - # color_scale_min=0, - # color_scale_max=6, - # data_precision=_DATA_PRECISION, climatic_indicator_id=climatic_indicators["tas-anomaly-annual"], possible_values=[ ConfigurationParameterPossibleValueCreate( @@ -281,21 +190,6 @@ def generate_configurations( (CoreConfParamName.ARCHIVE.value, "forecast") ].id ), - # ConfigurationParameterPossibleValueCreate( - # configuration_parameter_value_id=conf_param_values[ - # (CoreConfParamName.CLIMATOLOGICAL_VARIABLE.value, "tas") - # ].id - # ), - # ConfigurationParameterPossibleValueCreate( - # configuration_parameter_value_id=conf_param_values[ - # (CoreConfParamName.AGGREGATION_PERIOD.value, "annual") - # ].id - # ), - # ConfigurationParameterPossibleValueCreate( - # configuration_parameter_value_id=conf_param_values[ - # (CoreConfParamName.MEASURE.value, "anomaly") - # ].id - # ), ConfigurationParameterPossibleValueCreate( configuration_parameter_value_id=conf_param_values[ (CoreConfParamName.CLIMATOLOGICAL_MODEL.value, "ec_earth_rca4") @@ -340,18 +234,9 @@ def generate_configurations( ), CoverageConfigurationCreate( name="tas_seasonal_anomaly_model_hadgem2_es_racmo22e", - # display_name_english=_DISPLAY_NAME_ENGLISH, - # display_name_italian=_DISPLAY_NAME_ITALIAN, - # description_english=_DESCRIPTION_ENGLISH, - # description_italian=_DESCRIPTION_ITALIAN, netcdf_main_dataset_name="tas", wms_main_layer_name="tas", thredds_url_pattern="HadGEM2-ES_RACMO22Eym/clipped/tas_HadGEM2-ES_RACMO22E_{scenario}_{year_period}_anomaly_pp_VFVGTAA.nc", - # unit_english="ºC", - # palette="default/seq-YlOrRd", - # color_scale_min=0, - # color_scale_max=6, - # data_precision=_DATA_PRECISION, climatic_indicator_id=climatic_indicators["tas-anomaly-annual"], possible_values=[ ConfigurationParameterPossibleValueCreate( @@ -359,21 +244,6 @@ def generate_configurations( (CoreConfParamName.ARCHIVE.value, "forecast") ].id ), - # ConfigurationParameterPossibleValueCreate( - # configuration_parameter_value_id=conf_param_values[ - # (CoreConfParamName.CLIMATOLOGICAL_VARIABLE.value, "tas") - # ].id - # ), - # ConfigurationParameterPossibleValueCreate( - # configuration_parameter_value_id=conf_param_values[ - # (CoreConfParamName.AGGREGATION_PERIOD.value, "annual") - # ].id - # ), - # ConfigurationParameterPossibleValueCreate( - # configuration_parameter_value_id=conf_param_values[ - # (CoreConfParamName.MEASURE.value, "anomaly") - # ].id - # ), ConfigurationParameterPossibleValueCreate( configuration_parameter_value_id=conf_param_values[ ( @@ -421,18 +291,9 @@ def generate_configurations( ), CoverageConfigurationCreate( name="tas_seasonal_anomaly_model_mpi_esm_lr_remo2009", - # display_name_english=_DISPLAY_NAME_ENGLISH, - # display_name_italian=_DISPLAY_NAME_ITALIAN, - # description_english=_DESCRIPTION_ENGLISH, - # description_italian=_DESCRIPTION_ITALIAN, netcdf_main_dataset_name="tas", wms_main_layer_name="tas", thredds_url_pattern="MPI-ESM-LR_REMO2009ym/clipped/tas_MPI-ESM-LR_REMO2009_{scenario}_{year_period}_anomaly_pp_VFVGTAA.nc", - # unit_english="ºC", - # palette="default/seq-YlOrRd", - # color_scale_min=0, - # color_scale_max=6, - # data_precision=_DATA_PRECISION, climatic_indicator_id=climatic_indicators["tas-anomaly-annual"], possible_values=[ ConfigurationParameterPossibleValueCreate( @@ -440,21 +301,6 @@ def generate_configurations( (CoreConfParamName.ARCHIVE.value, "forecast") ].id ), - # ConfigurationParameterPossibleValueCreate( - # configuration_parameter_value_id=conf_param_values[ - # (CoreConfParamName.CLIMATOLOGICAL_VARIABLE.value, "tas") - # ].id - # ), - # ConfigurationParameterPossibleValueCreate( - # configuration_parameter_value_id=conf_param_values[ - # (CoreConfParamName.AGGREGATION_PERIOD.value, "annual") - # ].id - # ), - # ConfigurationParameterPossibleValueCreate( - # configuration_parameter_value_id=conf_param_values[ - # (CoreConfParamName.MEASURE.value, "anomaly") - # ].id - # ), ConfigurationParameterPossibleValueCreate( configuration_parameter_value_id=conf_param_values[ ( @@ -502,18 +348,9 @@ def generate_configurations( ), CoverageConfigurationCreate( name="tas_seasonal_anomaly_model_ensemble_upper_uncertainty", - # display_name_english=_DISPLAY_NAME_ENGLISH, - # display_name_italian=_DISPLAY_NAME_ITALIAN, - # description_english=_DESCRIPTION_ENGLISH, - # description_italian=_DESCRIPTION_ITALIAN, netcdf_main_dataset_name="tas_stdup", wms_main_layer_name="tas_stdup", thredds_url_pattern="ens5ym/std/clipped/tas_anom_stdup_pp_ts_{scenario}_{year_period}_VFVGTAA.nc", - # unit_english="ºC", - # palette="default/seq-YlOrRd", - # color_scale_min=0, - # color_scale_max=0, - # data_precision=_DATA_PRECISION, climatic_indicator_id=climatic_indicators["tas-anomaly-annual"], possible_values=[ ConfigurationParameterPossibleValueCreate( @@ -521,21 +358,6 @@ def generate_configurations( (CoreConfParamName.ARCHIVE.value, "forecast") ].id ), - # ConfigurationParameterPossibleValueCreate( - # configuration_parameter_value_id=conf_param_values[ - # (CoreConfParamName.CLIMATOLOGICAL_VARIABLE.value, "tas") - # ].id - # ), - # ConfigurationParameterPossibleValueCreate( - # configuration_parameter_value_id=conf_param_values[ - # (CoreConfParamName.AGGREGATION_PERIOD.value, "annual") - # ].id - # ), - # ConfigurationParameterPossibleValueCreate( - # configuration_parameter_value_id=conf_param_values[ - # (CoreConfParamName.MEASURE.value, "anomaly") - # ].id - # ), ConfigurationParameterPossibleValueCreate( configuration_parameter_value_id=conf_param_values[ (CoreConfParamName.CLIMATOLOGICAL_MODEL.value, "model_ensemble") @@ -585,18 +407,9 @@ def generate_configurations( ), CoverageConfigurationCreate( name="tas_seasonal_anomaly_model_ensemble_lower_uncertainty", - # display_name_english=_DISPLAY_NAME_ENGLISH, - # display_name_italian=_DISPLAY_NAME_ITALIAN, - # description_english=_DESCRIPTION_ENGLISH, - # description_italian=_DESCRIPTION_ITALIAN, netcdf_main_dataset_name="tas_stddown", wms_main_layer_name="tas_stddown", thredds_url_pattern="ens5ym/std/clipped/tas_anom_stddown_pp_ts_{scenario}_{year_period}_VFVGTAA.nc", - # unit_english="ºC", - # palette="default/seq-YlOrRd", - # color_scale_min=0, - # color_scale_max=0, - # data_precision=_DATA_PRECISION, climatic_indicator_id=climatic_indicators["tas-anomaly-annual"], possible_values=[ ConfigurationParameterPossibleValueCreate( @@ -604,21 +417,6 @@ def generate_configurations( (CoreConfParamName.ARCHIVE.value, "forecast") ].id ), - # ConfigurationParameterPossibleValueCreate( - # configuration_parameter_value_id=conf_param_values[ - # (CoreConfParamName.CLIMATOLOGICAL_VARIABLE.value, "tas") - # ].id - # ), - # ConfigurationParameterPossibleValueCreate( - # configuration_parameter_value_id=conf_param_values[ - # (CoreConfParamName.AGGREGATION_PERIOD.value, "annual") - # ].id - # ), - # ConfigurationParameterPossibleValueCreate( - # configuration_parameter_value_id=conf_param_values[ - # (CoreConfParamName.MEASURE.value, "anomaly") - # ].id - # ), ConfigurationParameterPossibleValueCreate( configuration_parameter_value_id=conf_param_values[ (CoreConfParamName.CLIMATOLOGICAL_MODEL.value, "model_ensemble") @@ -668,18 +466,9 @@ def generate_configurations( ), CoverageConfigurationCreate( name="tas_seasonal_absolute_model_ensemble", - # display_name_english=_DISPLAY_NAME_ENGLISH, - # display_name_italian=_DISPLAY_NAME_ITALIAN, - # description_english=_DESCRIPTION_ENGLISH, - # description_italian=_DESCRIPTION_ITALIAN, netcdf_main_dataset_name="tas", wms_main_layer_name="tas", thredds_url_pattern="ensymbc/clipped/tas_avg_{scenario}_{year_period}_ts19762100_ls_VFVG.nc", - # unit_english="ºC", - # palette="default/seq-YlOrRd", - # color_scale_min=-3, - # color_scale_max=32, - # data_precision=_DATA_PRECISION, climatic_indicator_id=climatic_indicators["tas-absolute-annual"], possible_values=[ ConfigurationParameterPossibleValueCreate( @@ -687,21 +476,6 @@ def generate_configurations( (CoreConfParamName.ARCHIVE.value, "forecast") ].id ), - # ConfigurationParameterPossibleValueCreate( - # configuration_parameter_value_id=conf_param_values[ - # (CoreConfParamName.CLIMATOLOGICAL_VARIABLE.value, "tas") - # ].id - # ), - # ConfigurationParameterPossibleValueCreate( - # configuration_parameter_value_id=conf_param_values[ - # (CoreConfParamName.AGGREGATION_PERIOD.value, "annual") - # ].id - # ), - # ConfigurationParameterPossibleValueCreate( - # configuration_parameter_value_id=conf_param_values[ - # (CoreConfParamName.MEASURE.value, "absolute") - # ].id - # ), ConfigurationParameterPossibleValueCreate( configuration_parameter_value_id=conf_param_values[ (CoreConfParamName.CLIMATOLOGICAL_MODEL.value, "model_ensemble") @@ -743,25 +517,12 @@ def generate_configurations( ].id ), ], - observation_variable_id=( - v.id if (v := variables.get("TDd")) is not None else None - ), - observation_variable_aggregation_type=ObservationAggregationType.SEASONAL, ), CoverageConfigurationCreate( name="tas_annual_absolute_model_ensemble", - # display_name_english=_DISPLAY_NAME_ENGLISH, - # display_name_italian=_DISPLAY_NAME_ITALIAN, - # description_english=_DESCRIPTION_ENGLISH, - # description_italian=_DESCRIPTION_ITALIAN, netcdf_main_dataset_name="tas", wms_main_layer_name="tas", thredds_url_pattern="ensymbc/clipped/tas_avg_{scenario}_ts19762100_ls_VFVG.nc", - # unit_english="ºC", - # palette="default/seq-YlOrRd", - # color_scale_min=-3, - # color_scale_max=32, - # data_precision=_DATA_PRECISION, climatic_indicator_id=climatic_indicators["tas-absolute-annual"], possible_values=[ ConfigurationParameterPossibleValueCreate( @@ -769,21 +530,6 @@ def generate_configurations( (CoreConfParamName.ARCHIVE.value, "forecast") ].id ), - # ConfigurationParameterPossibleValueCreate( - # configuration_parameter_value_id=conf_param_values[ - # (CoreConfParamName.CLIMATOLOGICAL_VARIABLE.value, "tas") - # ].id - # ), - # ConfigurationParameterPossibleValueCreate( - # configuration_parameter_value_id=conf_param_values[ - # (CoreConfParamName.AGGREGATION_PERIOD.value, "annual") - # ].id - # ), - # ConfigurationParameterPossibleValueCreate( - # configuration_parameter_value_id=conf_param_values[ - # (CoreConfParamName.MEASURE.value, "absolute") - # ].id - # ), ConfigurationParameterPossibleValueCreate( configuration_parameter_value_id=conf_param_values[ (CoreConfParamName.CLIMATOLOGICAL_MODEL.value, "model_ensemble") @@ -810,25 +556,12 @@ def generate_configurations( ].id ), ], - observation_variable_id=( - v.id if (v := variables.get("TDd")) is not None else None - ), - observation_variable_aggregation_type=ObservationAggregationType.YEARLY, ), CoverageConfigurationCreate( name="tas_seasonal_absolute_model_ec_earth_cclm4_8_17", - # display_name_english=_DISPLAY_NAME_ENGLISH, - # display_name_italian=_DISPLAY_NAME_ITALIAN, - # description_english=_DESCRIPTION_ENGLISH, - # description_italian=_DESCRIPTION_ITALIAN, netcdf_main_dataset_name="tas", wms_main_layer_name="tas", thredds_url_pattern="EC-EARTH_CCLM4-8-17ymbc/clipped/tas_EC-EARTH_CCLM4-8-17_{scenario}_{year_period}_ts19762100_ls_VFVG.nc", - # unit_english="ºC", - # palette="default/seq-YlOrRd", - # color_scale_min=-3, - # color_scale_max=32, - # data_precision=_DATA_PRECISION, climatic_indicator_id=climatic_indicators["tas-absolute-annual"], possible_values=[ ConfigurationParameterPossibleValueCreate( @@ -836,21 +569,6 @@ def generate_configurations( (CoreConfParamName.ARCHIVE.value, "forecast") ].id ), - # ConfigurationParameterPossibleValueCreate( - # configuration_parameter_value_id=conf_param_values[ - # (CoreConfParamName.CLIMATOLOGICAL_VARIABLE.value, "tas") - # ].id - # ), - # ConfigurationParameterPossibleValueCreate( - # configuration_parameter_value_id=conf_param_values[ - # (CoreConfParamName.AGGREGATION_PERIOD.value, "annual") - # ].id - # ), - # ConfigurationParameterPossibleValueCreate( - # configuration_parameter_value_id=conf_param_values[ - # (CoreConfParamName.MEASURE.value, "absolute") - # ].id - # ), ConfigurationParameterPossibleValueCreate( configuration_parameter_value_id=conf_param_values[ ( @@ -895,25 +613,12 @@ def generate_configurations( ].id ), ], - observation_variable_id=( - v.id if (v := variables.get("TDd")) is not None else None - ), - observation_variable_aggregation_type=ObservationAggregationType.SEASONAL, ), CoverageConfigurationCreate( name="tas_annual_absolute_model_ec_earth_cclm4_8_17", - # display_name_english=_DISPLAY_NAME_ENGLISH, - # display_name_italian=_DISPLAY_NAME_ITALIAN, - # description_english=_DESCRIPTION_ENGLISH, - # description_italian=_DESCRIPTION_ITALIAN, netcdf_main_dataset_name="tas", wms_main_layer_name="tas", thredds_url_pattern="EC-EARTH_CCLM4-8-17ymbc/clipped/tas_EC-EARTH_CCLM4-8-17_{scenario}_ts19762100_ls_VFVG.nc", - # unit_english="ºC", - # palette="default/seq-YlOrRd", - # color_scale_min=-3, - # color_scale_max=32, - # data_precision=_DATA_PRECISION, climatic_indicator_id=climatic_indicators["tas-absolute-annual"], possible_values=[ ConfigurationParameterPossibleValueCreate( @@ -921,21 +626,6 @@ def generate_configurations( (CoreConfParamName.ARCHIVE.value, "forecast") ].id ), - # ConfigurationParameterPossibleValueCreate( - # configuration_parameter_value_id=conf_param_values[ - # (CoreConfParamName.CLIMATOLOGICAL_VARIABLE.value, "tas") - # ].id - # ), - # ConfigurationParameterPossibleValueCreate( - # configuration_parameter_value_id=conf_param_values[ - # (CoreConfParamName.AGGREGATION_PERIOD.value, "annual") - # ].id - # ), - # ConfigurationParameterPossibleValueCreate( - # configuration_parameter_value_id=conf_param_values[ - # (CoreConfParamName.MEASURE.value, "absolute") - # ].id - # ), ConfigurationParameterPossibleValueCreate( configuration_parameter_value_id=conf_param_values[ ( @@ -965,25 +655,12 @@ def generate_configurations( ].id ), ], - observation_variable_id=( - v.id if (v := variables.get("TDd")) is not None else None - ), - observation_variable_aggregation_type=ObservationAggregationType.YEARLY, ), CoverageConfigurationCreate( name="tas_seasonal_absolute_model_ec_earth_racmo22e", - # display_name_english=_DISPLAY_NAME_ENGLISH, - # display_name_italian=_DISPLAY_NAME_ITALIAN, - # description_english=_DESCRIPTION_ENGLISH, - # description_italian=_DESCRIPTION_ITALIAN, netcdf_main_dataset_name="tas", wms_main_layer_name="tas", thredds_url_pattern="EC-EARTH_RACMO22Eymbc/clipped/tas_EC-EARTH_RACMO22E_{scenario}_{year_period}_ts19762100_ls_VFVG.nc", - # unit_english="ºC", - # palette="default/seq-YlOrRd", - # color_scale_min=-3, - # color_scale_max=32, - # data_precision=_DATA_PRECISION, climatic_indicator_id=climatic_indicators["tas-absolute-annual"], possible_values=[ ConfigurationParameterPossibleValueCreate( @@ -991,21 +668,6 @@ def generate_configurations( (CoreConfParamName.ARCHIVE.value, "forecast") ].id ), - # ConfigurationParameterPossibleValueCreate( - # configuration_parameter_value_id=conf_param_values[ - # (CoreConfParamName.CLIMATOLOGICAL_VARIABLE.value, "tas") - # ].id - # ), - # ConfigurationParameterPossibleValueCreate( - # configuration_parameter_value_id=conf_param_values[ - # (CoreConfParamName.AGGREGATION_PERIOD.value, "annual") - # ].id - # ), - # ConfigurationParameterPossibleValueCreate( - # configuration_parameter_value_id=conf_param_values[ - # (CoreConfParamName.MEASURE.value, "absolute") - # ].id - # ), ConfigurationParameterPossibleValueCreate( configuration_parameter_value_id=conf_param_values[ ( @@ -1050,25 +712,12 @@ def generate_configurations( ].id ), ], - observation_variable_id=( - v.id if (v := variables.get("TDd")) is not None else None - ), - observation_variable_aggregation_type=ObservationAggregationType.SEASONAL, ), CoverageConfigurationCreate( name="tas_annual_absolute_model_ec_earth_racmo22e", - # display_name_english=_DISPLAY_NAME_ENGLISH, - # display_name_italian=_DISPLAY_NAME_ITALIAN, - # description_english=_DESCRIPTION_ENGLISH, - # description_italian=_DESCRIPTION_ITALIAN, netcdf_main_dataset_name="tas", wms_main_layer_name="tas", thredds_url_pattern="EC-EARTH_RACMO22Eymbc/clipped/tas_EC-EARTH_RACMO22E_{scenario}_ts19762100_ls_VFVG.nc", - # unit_english="ºC", - # palette="default/seq-YlOrRd", - # color_scale_min=-3, - # color_scale_max=32, - # data_precision=_DATA_PRECISION, climatic_indicator_id=climatic_indicators["tas-absolute-annual"], possible_values=[ ConfigurationParameterPossibleValueCreate( @@ -1076,21 +725,6 @@ def generate_configurations( (CoreConfParamName.ARCHIVE.value, "forecast") ].id ), - # ConfigurationParameterPossibleValueCreate( - # configuration_parameter_value_id=conf_param_values[ - # (CoreConfParamName.CLIMATOLOGICAL_VARIABLE.value, "tas") - # ].id - # ), - # ConfigurationParameterPossibleValueCreate( - # configuration_parameter_value_id=conf_param_values[ - # (CoreConfParamName.AGGREGATION_PERIOD.value, "annual") - # ].id - # ), - # ConfigurationParameterPossibleValueCreate( - # configuration_parameter_value_id=conf_param_values[ - # (CoreConfParamName.MEASURE.value, "absolute") - # ].id - # ), ConfigurationParameterPossibleValueCreate( configuration_parameter_value_id=conf_param_values[ ( @@ -1120,25 +754,12 @@ def generate_configurations( ].id ), ], - observation_variable_id=( - v.id if (v := variables.get("TDd")) is not None else None - ), - observation_variable_aggregation_type=ObservationAggregationType.YEARLY, ), CoverageConfigurationCreate( name="tas_seasonal_absolute_model_ec_earth_rca4", - # display_name_english=_DISPLAY_NAME_ENGLISH, - # display_name_italian=_DISPLAY_NAME_ITALIAN, - # description_english=_DESCRIPTION_ENGLISH, - # description_italian=_DESCRIPTION_ITALIAN, netcdf_main_dataset_name="tas", wms_main_layer_name="tas", thredds_url_pattern="EC-EARTH_RCA4ymbc/clipped/tas_EC-EARTH_RCA4_{scenario}_{year_period}_ts19762100_ls_VFVG.nc", - # unit_english="ºC", - # palette="default/seq-YlOrRd", - # color_scale_min=-3, - # color_scale_max=32, - # data_precision=_DATA_PRECISION, climatic_indicator_id=climatic_indicators["tas-absolute-annual"], possible_values=[ ConfigurationParameterPossibleValueCreate( @@ -1146,21 +767,6 @@ def generate_configurations( (CoreConfParamName.ARCHIVE.value, "forecast") ].id ), - # ConfigurationParameterPossibleValueCreate( - # configuration_parameter_value_id=conf_param_values[ - # (CoreConfParamName.CLIMATOLOGICAL_VARIABLE.value, "tas") - # ].id - # ), - # ConfigurationParameterPossibleValueCreate( - # configuration_parameter_value_id=conf_param_values[ - # (CoreConfParamName.AGGREGATION_PERIOD.value, "annual") - # ].id - # ), - # ConfigurationParameterPossibleValueCreate( - # configuration_parameter_value_id=conf_param_values[ - # (CoreConfParamName.MEASURE.value, "absolute") - # ].id - # ), ConfigurationParameterPossibleValueCreate( configuration_parameter_value_id=conf_param_values[ (CoreConfParamName.CLIMATOLOGICAL_MODEL.value, "ec_earth_rca4") @@ -1202,25 +808,12 @@ def generate_configurations( ].id ), ], - observation_variable_id=( - v.id if (v := variables.get("TDd")) is not None else None - ), - observation_variable_aggregation_type=ObservationAggregationType.SEASONAL, ), CoverageConfigurationCreate( name="tas_annual_absolute_model_ec_earth_rca4", - # display_name_english=_DISPLAY_NAME_ENGLISH, - # display_name_italian=_DISPLAY_NAME_ITALIAN, - # description_english=_DESCRIPTION_ENGLISH, - # description_italian=_DESCRIPTION_ITALIAN, netcdf_main_dataset_name="tas", wms_main_layer_name="tas", thredds_url_pattern="EC-EARTH_RCA4ymbc/clipped/tas_EC-EARTH_RCA4_{scenario}_ts19762100_ls_VFVG.nc", - # unit_english="ºC", - # palette="default/seq-YlOrRd", - # color_scale_min=-3, - # color_scale_max=32, - # data_precision=_DATA_PRECISION, climatic_indicator_id=climatic_indicators["tas-absolute-annual"], possible_values=[ ConfigurationParameterPossibleValueCreate( @@ -1228,21 +821,6 @@ def generate_configurations( (CoreConfParamName.ARCHIVE.value, "forecast") ].id ), - # ConfigurationParameterPossibleValueCreate( - # configuration_parameter_value_id=conf_param_values[ - # (CoreConfParamName.CLIMATOLOGICAL_VARIABLE.value, "tas") - # ].id - # ), - # ConfigurationParameterPossibleValueCreate( - # configuration_parameter_value_id=conf_param_values[ - # (CoreConfParamName.AGGREGATION_PERIOD.value, "annual") - # ].id - # ), - # ConfigurationParameterPossibleValueCreate( - # configuration_parameter_value_id=conf_param_values[ - # (CoreConfParamName.MEASURE.value, "absolute") - # ].id - # ), ConfigurationParameterPossibleValueCreate( configuration_parameter_value_id=conf_param_values[ (CoreConfParamName.CLIMATOLOGICAL_MODEL.value, "ec_earth_rca4") @@ -1269,25 +847,12 @@ def generate_configurations( ].id ), ], - observation_variable_id=( - v.id if (v := variables.get("TDd")) is not None else None - ), - observation_variable_aggregation_type=ObservationAggregationType.YEARLY, ), CoverageConfigurationCreate( name="tas_seasonal_absolute_model_hadgem2_es_racmo22e", - # display_name_english=_DISPLAY_NAME_ENGLISH, - # display_name_italian=_DISPLAY_NAME_ITALIAN, - # description_english=_DESCRIPTION_ENGLISH, - # description_italian=_DESCRIPTION_ITALIAN, netcdf_main_dataset_name="tas", wms_main_layer_name="tas", thredds_url_pattern="HadGEM2-ES_RACMO22Eymbc/clipped/tas_HadGEM2-ES_RACMO22E_{scenario}_{year_period}_ts19762100_ls_VFVG.nc", - # unit_english="ºC", - # palette="default/seq-YlOrRd", - # color_scale_min=-3, - # color_scale_max=32, - # data_precision=_DATA_PRECISION, climatic_indicator_id=climatic_indicators["tas-absolute-annual"], possible_values=[ ConfigurationParameterPossibleValueCreate( @@ -1295,21 +860,6 @@ def generate_configurations( (CoreConfParamName.ARCHIVE.value, "forecast") ].id ), - # ConfigurationParameterPossibleValueCreate( - # configuration_parameter_value_id=conf_param_values[ - # (CoreConfParamName.CLIMATOLOGICAL_VARIABLE.value, "tas") - # ].id - # ), - # ConfigurationParameterPossibleValueCreate( - # configuration_parameter_value_id=conf_param_values[ - # (CoreConfParamName.AGGREGATION_PERIOD.value, "annual") - # ].id - # ), - # ConfigurationParameterPossibleValueCreate( - # configuration_parameter_value_id=conf_param_values[ - # (CoreConfParamName.MEASURE.value, "absolute") - # ].id - # ), ConfigurationParameterPossibleValueCreate( configuration_parameter_value_id=conf_param_values[ ( @@ -1354,25 +904,12 @@ def generate_configurations( ].id ), ], - observation_variable_id=( - v.id if (v := variables.get("TDd")) is not None else None - ), - observation_variable_aggregation_type=ObservationAggregationType.SEASONAL, ), CoverageConfigurationCreate( name="tas_annual_absolute_model_hadgem2_es_racmo22e", - # display_name_english=_DISPLAY_NAME_ENGLISH, - # display_name_italian=_DISPLAY_NAME_ITALIAN, - # description_english=_DESCRIPTION_ENGLISH, - # description_italian=_DESCRIPTION_ITALIAN, netcdf_main_dataset_name="tas", wms_main_layer_name="tas", thredds_url_pattern="HadGEM2-ES_RACMO22Eymbc/clipped/tas_HadGEM2-ES_RACMO22E_{scenario}_ts19762100_ls_VFVG.nc", - # unit_english="ºC", - # palette="default/seq-YlOrRd", - # color_scale_min=-3, - # color_scale_max=32, - # data_precision=_DATA_PRECISION, climatic_indicator_id=climatic_indicators["tas-absolute-annual"], possible_values=[ ConfigurationParameterPossibleValueCreate( @@ -1380,21 +917,6 @@ def generate_configurations( (CoreConfParamName.ARCHIVE.value, "forecast") ].id ), - # ConfigurationParameterPossibleValueCreate( - # configuration_parameter_value_id=conf_param_values[ - # (CoreConfParamName.CLIMATOLOGICAL_VARIABLE.value, "tas") - # ].id - # ), - # ConfigurationParameterPossibleValueCreate( - # configuration_parameter_value_id=conf_param_values[ - # (CoreConfParamName.AGGREGATION_PERIOD.value, "annual") - # ].id - # ), - # ConfigurationParameterPossibleValueCreate( - # configuration_parameter_value_id=conf_param_values[ - # (CoreConfParamName.MEASURE.value, "absolute") - # ].id - # ), ConfigurationParameterPossibleValueCreate( configuration_parameter_value_id=conf_param_values[ ( @@ -1424,25 +946,12 @@ def generate_configurations( ].id ), ], - observation_variable_id=( - v.id if (v := variables.get("TDd")) is not None else None - ), - observation_variable_aggregation_type=ObservationAggregationType.YEARLY, ), CoverageConfigurationCreate( name="tas_seasonal_absolute_model_mpi_esm_lr_remo2009", - # display_name_english=_DISPLAY_NAME_ENGLISH, - # display_name_italian=_DISPLAY_NAME_ITALIAN, - # description_english=_DESCRIPTION_ENGLISH, - # description_italian=_DESCRIPTION_ITALIAN, netcdf_main_dataset_name="tas", wms_main_layer_name="tas", thredds_url_pattern="MPI-ESM-LR_REMO2009ymbc/clipped/tas_MPI-ESM-LR_REMO2009_{scenario}_{year_period}_ts19762100_ls_VFVG.nc", - # unit_english="ºC", - # palette="default/seq-YlOrRd", - # color_scale_min=-3, - # color_scale_max=32, - # data_precision=_DATA_PRECISION, climatic_indicator_id=climatic_indicators["tas-absolute-annual"], possible_values=[ ConfigurationParameterPossibleValueCreate( @@ -1450,21 +959,6 @@ def generate_configurations( (CoreConfParamName.ARCHIVE.value, "forecast") ].id ), - # ConfigurationParameterPossibleValueCreate( - # configuration_parameter_value_id=conf_param_values[ - # (CoreConfParamName.CLIMATOLOGICAL_VARIABLE.value, "tas") - # ].id - # ), - # ConfigurationParameterPossibleValueCreate( - # configuration_parameter_value_id=conf_param_values[ - # (CoreConfParamName.AGGREGATION_PERIOD.value, "annual") - # ].id - # ), - # ConfigurationParameterPossibleValueCreate( - # configuration_parameter_value_id=conf_param_values[ - # (CoreConfParamName.MEASURE.value, "absolute") - # ].id - # ), ConfigurationParameterPossibleValueCreate( configuration_parameter_value_id=conf_param_values[ ( @@ -1509,25 +1003,12 @@ def generate_configurations( ].id ), ], - observation_variable_id=( - v.id if (v := variables.get("TDd")) is not None else None - ), - observation_variable_aggregation_type=ObservationAggregationType.SEASONAL, ), CoverageConfigurationCreate( name="tas_annual_absolute_model_mpi_esm_lr_remo2009", - # display_name_english=_DISPLAY_NAME_ENGLISH, - # display_name_italian=_DISPLAY_NAME_ITALIAN, - # description_english=_DESCRIPTION_ENGLISH, - # description_italian=_DESCRIPTION_ITALIAN, netcdf_main_dataset_name="tas", wms_main_layer_name="tas", thredds_url_pattern="MPI-ESM-LR_REMO2009ymbc/clipped/tas_MPI-ESM-LR_REMO2009_{scenario}_ts19762100_ls_VFVG.nc", - # unit_english="ºC", - # palette="default/seq-YlOrRd", - # color_scale_min=-3, - # color_scale_max=32, - # data_precision=_DATA_PRECISION, climatic_indicator_id=climatic_indicators["tas-absolute-annual"], possible_values=[ ConfigurationParameterPossibleValueCreate( @@ -1535,21 +1016,6 @@ def generate_configurations( (CoreConfParamName.ARCHIVE.value, "forecast") ].id ), - # ConfigurationParameterPossibleValueCreate( - # configuration_parameter_value_id=conf_param_values[ - # (CoreConfParamName.CLIMATOLOGICAL_VARIABLE.value, "tas") - # ].id - # ), - # ConfigurationParameterPossibleValueCreate( - # configuration_parameter_value_id=conf_param_values[ - # (CoreConfParamName.AGGREGATION_PERIOD.value, "annual") - # ].id - # ), - # ConfigurationParameterPossibleValueCreate( - # configuration_parameter_value_id=conf_param_values[ - # (CoreConfParamName.MEASURE.value, "absolute") - # ].id - # ), ConfigurationParameterPossibleValueCreate( configuration_parameter_value_id=conf_param_values[ ( @@ -1579,25 +1045,12 @@ def generate_configurations( ].id ), ], - observation_variable_id=( - v.id if (v := variables.get("TDd")) is not None else None - ), - observation_variable_aggregation_type=ObservationAggregationType.YEARLY, ), CoverageConfigurationCreate( name="tas_seasonal_absolute_model_ensemble_upper_uncertainty", - # display_name_english=_DISPLAY_NAME_ENGLISH, - # display_name_italian=_DISPLAY_NAME_ITALIAN, - # description_english=_DESCRIPTION_ENGLISH, - # description_italian=_DESCRIPTION_ITALIAN, netcdf_main_dataset_name="tas_stdup", wms_main_layer_name="tas_stdup", thredds_url_pattern="ensymbc/std/clipped/tas_stdup_{scenario}_{year_period}_ts19762100_ls_VFVG.nc", - # unit_english="ºC", - # palette="default/seq-YlOrRd", - # color_scale_min=-3, - # color_scale_max=32, - # data_precision=_DATA_PRECISION, climatic_indicator_id=climatic_indicators["tas-absolute-annual"], possible_values=[ ConfigurationParameterPossibleValueCreate( @@ -1605,21 +1058,6 @@ def generate_configurations( (CoreConfParamName.ARCHIVE.value, "forecast") ].id ), - # ConfigurationParameterPossibleValueCreate( - # configuration_parameter_value_id=conf_param_values[ - # (CoreConfParamName.CLIMATOLOGICAL_VARIABLE.value, "tas") - # ].id - # ), - # ConfigurationParameterPossibleValueCreate( - # configuration_parameter_value_id=conf_param_values[ - # (CoreConfParamName.AGGREGATION_PERIOD.value, "annual") - # ].id - # ), - # ConfigurationParameterPossibleValueCreate( - # configuration_parameter_value_id=conf_param_values[ - # (CoreConfParamName.MEASURE.value, "absolute") - # ].id - # ), ConfigurationParameterPossibleValueCreate( configuration_parameter_value_id=conf_param_values[ (CoreConfParamName.CLIMATOLOGICAL_MODEL.value, "model_ensemble") @@ -1669,18 +1107,9 @@ def generate_configurations( ), CoverageConfigurationCreate( name="tas_seasonal_absolute_model_ensemble_lower_uncertainty", - # display_name_english=_DISPLAY_NAME_ENGLISH, - # display_name_italian=_DISPLAY_NAME_ITALIAN, - # description_english=_DESCRIPTION_ENGLISH, - # description_italian=_DESCRIPTION_ITALIAN, netcdf_main_dataset_name="tas_stddown", wms_main_layer_name="tas_stddown", thredds_url_pattern="ensymbc/std/clipped/tas_stddown_{scenario}_{year_period}_ts19762100_ls_VFVG.nc", - # unit_english="ºC", - # palette="default/seq-YlOrRd", - # color_scale_min=-3, - # color_scale_max=32, - # data_precision=_DATA_PRECISION, climatic_indicator_id=climatic_indicators["tas-absolute-annual"], possible_values=[ ConfigurationParameterPossibleValueCreate( @@ -1688,21 +1117,6 @@ def generate_configurations( (CoreConfParamName.ARCHIVE.value, "forecast") ].id ), - # ConfigurationParameterPossibleValueCreate( - # configuration_parameter_value_id=conf_param_values[ - # (CoreConfParamName.CLIMATOLOGICAL_VARIABLE.value, "tas") - # ].id - # ), - # ConfigurationParameterPossibleValueCreate( - # configuration_parameter_value_id=conf_param_values[ - # (CoreConfParamName.AGGREGATION_PERIOD.value, "annual") - # ].id - # ), - # ConfigurationParameterPossibleValueCreate( - # configuration_parameter_value_id=conf_param_values[ - # (CoreConfParamName.MEASURE.value, "absolute") - # ].id - # ), ConfigurationParameterPossibleValueCreate( configuration_parameter_value_id=conf_param_values[ (CoreConfParamName.CLIMATOLOGICAL_MODEL.value, "model_ensemble") @@ -1752,18 +1166,9 @@ def generate_configurations( ), CoverageConfigurationCreate( name="tas_annual_absolute_model_ensemble_upper_uncertainty", - # display_name_english=_DISPLAY_NAME_ENGLISH, - # display_name_italian=_DISPLAY_NAME_ITALIAN, - # description_english=_DESCRIPTION_ENGLISH, - # description_italian=_DESCRIPTION_ITALIAN, netcdf_main_dataset_name="tas_stdup", wms_main_layer_name="tas_stdup", thredds_url_pattern="ensymbc/std/clipped/tas_stdup_{scenario}_ts19762100_ls_VFVG.nc", - # unit_english="ºC", - # palette="default/seq-YlOrRd", - # color_scale_min=-3, - # color_scale_max=32, - # data_precision=_DATA_PRECISION, climatic_indicator_id=climatic_indicators["tas-absolute-annual"], possible_values=[ ConfigurationParameterPossibleValueCreate( @@ -1771,21 +1176,6 @@ def generate_configurations( (CoreConfParamName.ARCHIVE.value, "forecast") ].id ), - # ConfigurationParameterPossibleValueCreate( - # configuration_parameter_value_id=conf_param_values[ - # (CoreConfParamName.CLIMATOLOGICAL_VARIABLE.value, "tas") - # ].id - # ), - # ConfigurationParameterPossibleValueCreate( - # configuration_parameter_value_id=conf_param_values[ - # (CoreConfParamName.AGGREGATION_PERIOD.value, "annual") - # ].id - # ), - # ConfigurationParameterPossibleValueCreate( - # configuration_parameter_value_id=conf_param_values[ - # (CoreConfParamName.MEASURE.value, "absolute") - # ].id - # ), ConfigurationParameterPossibleValueCreate( configuration_parameter_value_id=conf_param_values[ (CoreConfParamName.CLIMATOLOGICAL_MODEL.value, "model_ensemble") @@ -1820,18 +1210,9 @@ def generate_configurations( ), CoverageConfigurationCreate( name="tas_annual_absolute_model_ensemble_lower_uncertainty", - # display_name_english=_DISPLAY_NAME_ENGLISH, - # display_name_italian=_DISPLAY_NAME_ITALIAN, - # description_english=_DESCRIPTION_ENGLISH, - # description_italian=_DESCRIPTION_ITALIAN, netcdf_main_dataset_name="tas_stddown", wms_main_layer_name="tas_stddown", thredds_url_pattern="ensymbc/std/clipped/tas_stddown_{scenario}_ts19762100_ls_VFVG.nc", - # unit_english="ºC", - # palette="default/seq-YlOrRd", - # color_scale_min=-3, - # color_scale_max=32, - # data_precision=_DATA_PRECISION, climatic_indicator_id=climatic_indicators["tas-absolute-annual"], possible_values=[ ConfigurationParameterPossibleValueCreate( @@ -1839,21 +1220,6 @@ def generate_configurations( (CoreConfParamName.ARCHIVE.value, "forecast") ].id ), - # ConfigurationParameterPossibleValueCreate( - # configuration_parameter_value_id=conf_param_values[ - # (CoreConfParamName.CLIMATOLOGICAL_VARIABLE.value, "tas") - # ].id - # ), - # ConfigurationParameterPossibleValueCreate( - # configuration_parameter_value_id=conf_param_values[ - # (CoreConfParamName.AGGREGATION_PERIOD.value, "annual") - # ].id - # ), - # ConfigurationParameterPossibleValueCreate( - # configuration_parameter_value_id=conf_param_values[ - # (CoreConfParamName.MEASURE.value, "absolute") - # ].id - # ), ConfigurationParameterPossibleValueCreate( configuration_parameter_value_id=conf_param_values[ (CoreConfParamName.CLIMATOLOGICAL_MODEL.value, "model_ensemble") @@ -1888,19 +1254,10 @@ def generate_configurations( ), CoverageConfigurationCreate( name="tas_30yr_anomaly_seasonal_agree_model_ensemble", - # display_name_english=_DISPLAY_NAME_ENGLISH, - # display_name_italian=_DISPLAY_NAME_ITALIAN, - # description_english=_DESCRIPTION_ENGLISH, - # description_italian=_DESCRIPTION_ITALIAN, netcdf_main_dataset_name="tas", wms_main_layer_name="tas-uncertainty_group", wms_secondary_layer_name="tas", thredds_url_pattern="ensembletwbc/std/clipped/tas_avgagree_anom_{time_window}_{scenario}_{year_period}_VFVGTAA.nc", - # unit_english="ºC", - # palette="uncert-stippled/seq-YlOrRd", - # color_scale_min=0, - # color_scale_max=6, - # data_precision=_DATA_PRECISION, climatic_indicator_id=climatic_indicators["tas-anomaly-thirty_year"], possible_values=[ ConfigurationParameterPossibleValueCreate( @@ -1908,21 +1265,6 @@ def generate_configurations( (CoreConfParamName.ARCHIVE.value, "forecast") ].id ), - # ConfigurationParameterPossibleValueCreate( - # configuration_parameter_value_id=conf_param_values[ - # (CoreConfParamName.CLIMATOLOGICAL_VARIABLE.value, "tas") - # ].id - # ), - # ConfigurationParameterPossibleValueCreate( - # configuration_parameter_value_id=conf_param_values[ - # (CoreConfParamName.AGGREGATION_PERIOD.value, "30yr") - # ].id - # ), - # ConfigurationParameterPossibleValueCreate( - # configuration_parameter_value_id=conf_param_values[ - # (CoreConfParamName.MEASURE.value, "anomaly") - # ].id - # ), ConfigurationParameterPossibleValueCreate( configuration_parameter_value_id=conf_param_values[ (CoreConfParamName.CLIMATOLOGICAL_MODEL.value, "model_ensemble") @@ -1977,18 +1319,9 @@ def generate_configurations( ), CoverageConfigurationCreate( name="tas_30yr_anomaly_seasonal_model_ec_earth_cclm4_8_17", - # display_name_english=_DISPLAY_NAME_ENGLISH, - # display_name_italian=_DISPLAY_NAME_ITALIAN, - # description_english=_DESCRIPTION_ENGLISH, - # description_italian=_DESCRIPTION_ITALIAN, netcdf_main_dataset_name="tas", wms_main_layer_name="tas", thredds_url_pattern="taspr5rcm/clipped/tas_EC-EARTH_CCLM4-8-17_{scenario}_seas_{time_window}{year_period}_VFVGTAA.nc", - # unit_english="ºC", - # palette="default/seq-YlOrRd", - # color_scale_min=0, - # color_scale_max=6, - # data_precision=_DATA_PRECISION, climatic_indicator_id=climatic_indicators["tas-anomaly-thirty_year"], possible_values=[ ConfigurationParameterPossibleValueCreate( @@ -1996,21 +1329,6 @@ def generate_configurations( (CoreConfParamName.ARCHIVE.value, "forecast") ].id ), - # ConfigurationParameterPossibleValueCreate( - # configuration_parameter_value_id=conf_param_values[ - # (CoreConfParamName.CLIMATOLOGICAL_VARIABLE.value, "tas") - # ].id - # ), - # ConfigurationParameterPossibleValueCreate( - # configuration_parameter_value_id=conf_param_values[ - # (CoreConfParamName.AGGREGATION_PERIOD.value, "30yr") - # ].id - # ), - # ConfigurationParameterPossibleValueCreate( - # configuration_parameter_value_id=conf_param_values[ - # (CoreConfParamName.MEASURE.value, "anomaly") - # ].id - # ), ConfigurationParameterPossibleValueCreate( configuration_parameter_value_id=conf_param_values[ ( @@ -2068,18 +1386,9 @@ def generate_configurations( ), CoverageConfigurationCreate( name="tas_30yr_anomaly_seasonal_model_ec_earth_racmo22e", - # display_name_english=_DISPLAY_NAME_ENGLISH, - # display_name_italian=_DISPLAY_NAME_ITALIAN, - # description_english=_DESCRIPTION_ENGLISH, - # description_italian=_DESCRIPTION_ITALIAN, netcdf_main_dataset_name="tas", wms_main_layer_name="tas", thredds_url_pattern="taspr5rcm/clipped/tas_EC-EARTH_RACMO22E_{scenario}_seas_{time_window}{year_period}_VFVGTAA.nc", - # unit_english="ºC", - # palette="default/seq-YlOrRd", - # color_scale_min=0, - # color_scale_max=6, - # data_precision=_DATA_PRECISION, climatic_indicator_id=climatic_indicators["tas-anomaly-thirty_year"], possible_values=[ ConfigurationParameterPossibleValueCreate( @@ -2087,21 +1396,6 @@ def generate_configurations( (CoreConfParamName.ARCHIVE.value, "forecast") ].id ), - # ConfigurationParameterPossibleValueCreate( - # configuration_parameter_value_id=conf_param_values[ - # (CoreConfParamName.CLIMATOLOGICAL_VARIABLE.value, "tas") - # ].id - # ), - # ConfigurationParameterPossibleValueCreate( - # configuration_parameter_value_id=conf_param_values[ - # (CoreConfParamName.AGGREGATION_PERIOD.value, "30yr") - # ].id - # ), - # ConfigurationParameterPossibleValueCreate( - # configuration_parameter_value_id=conf_param_values[ - # (CoreConfParamName.MEASURE.value, "anomaly") - # ].id - # ), ConfigurationParameterPossibleValueCreate( configuration_parameter_value_id=conf_param_values[ ( @@ -2159,18 +1453,9 @@ def generate_configurations( ), CoverageConfigurationCreate( name="tas_30yr_anomaly_seasonal_model_ec_earth_rca4", - # display_name_english=_DISPLAY_NAME_ENGLISH, - # display_name_italian=_DISPLAY_NAME_ITALIAN, - # description_english=_DESCRIPTION_ENGLISH, - # description_italian=_DESCRIPTION_ITALIAN, netcdf_main_dataset_name="tas", wms_main_layer_name="tas", thredds_url_pattern="taspr5rcm/clipped/tas_EC-EARTH_RCA4_{scenario}_seas_{time_window}{year_period}_VFVGTAA.nc", - # unit_english="ºC", - # palette="default/seq-YlOrRd", - # color_scale_min=0, - # color_scale_max=6, - # data_precision=_DATA_PRECISION, climatic_indicator_id=climatic_indicators["tas-anomaly-thirty_year"], possible_values=[ ConfigurationParameterPossibleValueCreate( @@ -2178,21 +1463,6 @@ def generate_configurations( (CoreConfParamName.ARCHIVE.value, "forecast") ].id ), - # ConfigurationParameterPossibleValueCreate( - # configuration_parameter_value_id=conf_param_values[ - # (CoreConfParamName.CLIMATOLOGICAL_VARIABLE.value, "tas") - # ].id - # ), - # ConfigurationParameterPossibleValueCreate( - # configuration_parameter_value_id=conf_param_values[ - # (CoreConfParamName.AGGREGATION_PERIOD.value, "30yr") - # ].id - # ), - # ConfigurationParameterPossibleValueCreate( - # configuration_parameter_value_id=conf_param_values[ - # (CoreConfParamName.MEASURE.value, "anomaly") - # ].id - # ), ConfigurationParameterPossibleValueCreate( configuration_parameter_value_id=conf_param_values[ (CoreConfParamName.CLIMATOLOGICAL_MODEL.value, "ec_earth_rca4") @@ -2247,18 +1517,9 @@ def generate_configurations( ), CoverageConfigurationCreate( name="tas_30yr_anomaly_seasonal_model_hadgem2_es_racmo22e", - # display_name_english=_DISPLAY_NAME_ENGLISH, - # display_name_italian=_DISPLAY_NAME_ITALIAN, - # description_english=_DESCRIPTION_ENGLISH, - # description_italian=_DESCRIPTION_ITALIAN, netcdf_main_dataset_name="tas", wms_main_layer_name="tas", thredds_url_pattern="taspr5rcm/clipped/tas_HadGEM2-ES_RACMO22E_{scenario}_seas_{time_window}{year_period}_VFVGTAA.nc", - # unit_english="ºC", - # palette="default/seq-YlOrRd", - # color_scale_min=0, - # color_scale_max=6, - # data_precision=_DATA_PRECISION, climatic_indicator_id=climatic_indicators["tas-anomaly-thirty_year"], possible_values=[ ConfigurationParameterPossibleValueCreate( @@ -2266,21 +1527,6 @@ def generate_configurations( (CoreConfParamName.ARCHIVE.value, "forecast") ].id ), - # ConfigurationParameterPossibleValueCreate( - # configuration_parameter_value_id=conf_param_values[ - # (CoreConfParamName.CLIMATOLOGICAL_VARIABLE.value, "tas") - # ].id - # ), - # ConfigurationParameterPossibleValueCreate( - # configuration_parameter_value_id=conf_param_values[ - # (CoreConfParamName.AGGREGATION_PERIOD.value, "30yr") - # ].id - # ), - # ConfigurationParameterPossibleValueCreate( - # configuration_parameter_value_id=conf_param_values[ - # (CoreConfParamName.MEASURE.value, "anomaly") - # ].id - # ), ConfigurationParameterPossibleValueCreate( configuration_parameter_value_id=conf_param_values[ ( @@ -2338,18 +1584,9 @@ def generate_configurations( ), CoverageConfigurationCreate( name="tas_30yr_anomaly_seasonal_model_mpi_esm_lr_remo2009", - # display_name_english=_DISPLAY_NAME_ENGLISH, - # display_name_italian=_DISPLAY_NAME_ITALIAN, - # description_english=_DESCRIPTION_ENGLISH, - # description_italian=_DESCRIPTION_ITALIAN, netcdf_main_dataset_name="tas", wms_main_layer_name="tas", thredds_url_pattern="taspr5rcm/clipped/tas_MPI-ESM-LR_REMO2009_{scenario}_seas_{time_window}{year_period}_VFVGTAA.nc", - # unit_english="ºC", - # palette="default/seq-YlOrRd", - # color_scale_min=0, - # color_scale_max=6, - # data_precision=_DATA_PRECISION, climatic_indicator_id=climatic_indicators["tas-anomaly-thirty_year"], possible_values=[ ConfigurationParameterPossibleValueCreate( @@ -2357,21 +1594,6 @@ def generate_configurations( (CoreConfParamName.ARCHIVE.value, "forecast") ].id ), - # ConfigurationParameterPossibleValueCreate( - # configuration_parameter_value_id=conf_param_values[ - # (CoreConfParamName.CLIMATOLOGICAL_VARIABLE.value, "tas") - # ].id - # ), - # ConfigurationParameterPossibleValueCreate( - # configuration_parameter_value_id=conf_param_values[ - # (CoreConfParamName.AGGREGATION_PERIOD.value, "30yr") - # ].id - # ), - # ConfigurationParameterPossibleValueCreate( - # configuration_parameter_value_id=conf_param_values[ - # (CoreConfParamName.MEASURE.value, "anomaly") - # ].id - # ), ConfigurationParameterPossibleValueCreate( configuration_parameter_value_id=conf_param_values[ ( @@ -2429,18 +1651,9 @@ def generate_configurations( ), CoverageConfigurationCreate( name="tas_barometro_climatico", - # display_name_english=_DISPLAY_NAME_ENGLISH, - # display_name_italian=_DISPLAY_NAME_ITALIAN, - # description_english=_DESCRIPTION_ENGLISH, - # description_italian=_DESCRIPTION_ITALIAN, netcdf_main_dataset_name="tas", wms_main_layer_name="tas", thredds_url_pattern="ensymbc/std/clipped/fldmean/tas_avg_{scenario}_ts19762100_ls_VFVG_fldmean.nc", - # unit_english="ºC", - # palette="default/seq-YlOrRd", - # color_scale_min=-3, - # color_scale_max=32, - # data_precision=_DATA_PRECISION, climatic_indicator_id=climatic_indicators["tas-absolute-annual"], possible_values=[ ConfigurationParameterPossibleValueCreate( @@ -2448,11 +1661,6 @@ def generate_configurations( (CoreConfParamName.ARCHIVE.value, "barometro_climatico") ].id ), - # ConfigurationParameterPossibleValueCreate( - # configuration_parameter_value_id=conf_param_values[ - # (CoreConfParamName.CLIMATOLOGICAL_VARIABLE.value, "tas") - # ].id - # ), ConfigurationParameterPossibleValueCreate( configuration_parameter_value_id=conf_param_values[ (CoreConfParamName.SCENARIO.value, "rcp26") @@ -2472,18 +1680,9 @@ def generate_configurations( ), CoverageConfigurationCreate( name="tas_barometro_climatico_lower_uncertainty", - # display_name_english=_DISPLAY_NAME_ENGLISH, - # display_name_italian=_DISPLAY_NAME_ITALIAN, - # description_english=_DESCRIPTION_ENGLISH, - # description_italian=_DESCRIPTION_ITALIAN, netcdf_main_dataset_name="tas_stddown", wms_main_layer_name="tas_stddown", thredds_url_pattern="ensymbc/std/clipped/fldmean/tas_stddown_{scenario}_ts19762100_ls_VFVG_fldmean.nc", - # unit_english="ºC", - # palette="default/seq-YlOrRd", - # color_scale_min=-3, - # color_scale_max=32, - # data_precision=_DATA_PRECISION, climatic_indicator_id=climatic_indicators["tas-absolute-annual"], possible_values=[ ConfigurationParameterPossibleValueCreate( @@ -2491,11 +1690,6 @@ def generate_configurations( (CoreConfParamName.ARCHIVE.value, "barometro_climatico") ].id ), - # ConfigurationParameterPossibleValueCreate( - # configuration_parameter_value_id=conf_param_values[ - # (CoreConfParamName.CLIMATOLOGICAL_VARIABLE.value, "tas") - # ].id - # ), ConfigurationParameterPossibleValueCreate( configuration_parameter_value_id=conf_param_values[ (CoreConfParamName.UNCERTAINTY_TYPE.value, "lower_bound") @@ -2520,18 +1714,9 @@ def generate_configurations( ), CoverageConfigurationCreate( name="tas_barometro_climatico_upper_uncertainty", - # display_name_english=_DISPLAY_NAME_ENGLISH, - # display_name_italian=_DISPLAY_NAME_ITALIAN, - # description_english=_DESCRIPTION_ENGLISH, - # description_italian=_DESCRIPTION_ITALIAN, netcdf_main_dataset_name="tas_stdup", wms_main_layer_name="tas_stdup", thredds_url_pattern="ensymbc/std/clipped/fldmean/tas_stdup_{scenario}_ts19762100_ls_VFVG_fldmean.nc", - # unit_english="ºC", - # palette="default/seq-YlOrRd", - # color_scale_min=-3, - # color_scale_max=32, - # data_precision=_DATA_PRECISION, climatic_indicator_id=climatic_indicators["tas-absolute-annual"], possible_values=[ ConfigurationParameterPossibleValueCreate( @@ -2539,11 +1724,6 @@ def generate_configurations( (CoreConfParamName.ARCHIVE.value, "barometro_climatico") ].id ), - # ConfigurationParameterPossibleValueCreate( - # configuration_parameter_value_id=conf_param_values[ - # (CoreConfParamName.CLIMATOLOGICAL_VARIABLE.value, "tas") - # ].id - # ), ConfigurationParameterPossibleValueCreate( configuration_parameter_value_id=conf_param_values[ (CoreConfParamName.UNCERTAINTY_TYPE.value, "upper_bound") diff --git a/arpav_ppcv/bootstrapper/coverage_configurations/forecast/tasmax.py b/arpav_ppcv/bootstrapper/coverage_configurations/forecast/tasmax.py index 627bb11b..efe03f00 100644 --- a/arpav_ppcv/bootstrapper/coverage_configurations/forecast/tasmax.py +++ b/arpav_ppcv/bootstrapper/coverage_configurations/forecast/tasmax.py @@ -1,39 +1,20 @@ -from ....schemas.base import ( - CoreConfParamName, - ObservationAggregationType, -) +from ....schemas.base import CoreConfParamName from ....schemas.coverages import ( CoverageConfigurationCreate, ConfigurationParameterPossibleValueCreate, ) -# _DISPLAY_NAME_ENGLISH = "Maximum temperature" -# _DISPLAY_NAME_ITALIAN = "Temperatura massima" -# _DESCRIPTION_ENGLISH = "Maximum daily air temperature near the ground" -# _DESCRIPTION_ITALIAN = "Temperatura massima giornaliera dell'aria vicino al suolo" -# _DATA_PRECISION = 1 - def generate_configurations( conf_param_values, - variables, climatic_indicators: dict[str, int], ) -> list[CoverageConfigurationCreate]: return [ CoverageConfigurationCreate( name="tasmax_seasonal_absolute_model_ensemble", - # display_name_english=_DISPLAY_NAME_ENGLISH, - # display_name_italian=_DISPLAY_NAME_ITALIAN, - # description_english=_DESCRIPTION_ENGLISH, - # description_italian=_DESCRIPTION_ITALIAN, netcdf_main_dataset_name="tasmax", wms_main_layer_name="tasmax", thredds_url_pattern="ensymbc/clipped/tasmax_avg_{scenario}_{year_period}_ts19762100_ls_VFVG.nc", - # # unit_english="ºC", - # # palette="default/seq-YlOrRd", - # # color_scale_min=-3, - # # color_scale_max=32, - # # data_precision=_DATA_PRECISION, climatic_indicator_id=climatic_indicators["tasmax-absolute-annual"], possible_values=[ ConfigurationParameterPossibleValueCreate( @@ -41,21 +22,6 @@ def generate_configurations( (CoreConfParamName.ARCHIVE.value, "forecast") ].id ), - # ConfigurationParameterPossibleValueCreate( - # configuration_parameter_value_id=conf_param_values[ - # (CoreConfParamName.CLIMATOLOGICAL_VARIABLE.value, "tasmax") - # ].id - # ), - # ConfigurationParameterPossibleValueCreate( - # configuration_parameter_value_id=conf_param_values[ - # (CoreConfParamName.AGGREGATION_PERIOD.value, "annual") - # ].id - # ), - # ConfigurationParameterPossibleValueCreate( - # configuration_parameter_value_id=conf_param_values[ - # (CoreConfParamName.MEASURE.value, "absolute") - # ].id - # ), ConfigurationParameterPossibleValueCreate( configuration_parameter_value_id=conf_param_values[ (CoreConfParamName.CLIMATOLOGICAL_MODEL.value, "model_ensemble") @@ -97,25 +63,12 @@ def generate_configurations( ].id ), ], - observation_variable_id=( - v.id if (v := variables.get("TXd")) is not None else None - ), - observation_variable_aggregation_type=ObservationAggregationType.SEASONAL, ), CoverageConfigurationCreate( name="tasmax_annual_absolute_model_ensemble", - # display_name_english=_DISPLAY_NAME_ENGLISH, - # display_name_italian=_DISPLAY_NAME_ITALIAN, - # description_english=_DESCRIPTION_ENGLISH, - # description_italian=_DESCRIPTION_ITALIAN, netcdf_main_dataset_name="tasmax", wms_main_layer_name="tasmax", thredds_url_pattern="ensymbc/clipped/tasmax_avg_{scenario}_ts19762100_ls_VFVG.nc", - # unit_english="ºC", - # palette="default/seq-YlOrRd", - # color_scale_min=-3, - # color_scale_max=32, - # data_precision=_DATA_PRECISION, climatic_indicator_id=climatic_indicators["tasmax-absolute-annual"], possible_values=[ ConfigurationParameterPossibleValueCreate( @@ -123,21 +76,6 @@ def generate_configurations( (CoreConfParamName.ARCHIVE.value, "forecast") ].id ), - # ConfigurationParameterPossibleValueCreate( - # configuration_parameter_value_id=conf_param_values[ - # (CoreConfParamName.CLIMATOLOGICAL_VARIABLE.value, "tasmax") - # ].id - # ), - # ConfigurationParameterPossibleValueCreate( - # configuration_parameter_value_id=conf_param_values[ - # (CoreConfParamName.AGGREGATION_PERIOD.value, "annual") - # ].id - # ), - # ConfigurationParameterPossibleValueCreate( - # configuration_parameter_value_id=conf_param_values[ - # (CoreConfParamName.MEASURE.value, "absolute") - # ].id - # ), ConfigurationParameterPossibleValueCreate( configuration_parameter_value_id=conf_param_values[ (CoreConfParamName.CLIMATOLOGICAL_MODEL.value, "model_ensemble") @@ -164,25 +102,12 @@ def generate_configurations( ].id ), ], - observation_variable_id=( - v.id if (v := variables.get("TXd")) is not None else None - ), - observation_variable_aggregation_type=ObservationAggregationType.YEARLY, ), CoverageConfigurationCreate( name="tasmax_seasonal_absolute_model_ec_earth_cclm4_8_17", - # display_name_english=_DISPLAY_NAME_ENGLISH, - # display_name_italian=_DISPLAY_NAME_ITALIAN, - # description_english=_DESCRIPTION_ENGLISH, - # description_italian=_DESCRIPTION_ITALIAN, netcdf_main_dataset_name="tasmax", wms_main_layer_name="tasmax", thredds_url_pattern="EC-EARTH_CCLM4-8-17ymbc/clipped/tasmax_EC-EARTH_CCLM4-8-17_{scenario}_{year_period}_ts19762100_ls_VFVG.nc", - # unit_english="ºC", - # palette="default/seq-YlOrRd", - # color_scale_min=-3, - # color_scale_max=32, - # data_precision=_DATA_PRECISION, climatic_indicator_id=climatic_indicators["tasmax-absolute-annual"], possible_values=[ ConfigurationParameterPossibleValueCreate( @@ -190,21 +115,6 @@ def generate_configurations( (CoreConfParamName.ARCHIVE.value, "forecast") ].id ), - # ConfigurationParameterPossibleValueCreate( - # configuration_parameter_value_id=conf_param_values[ - # (CoreConfParamName.CLIMATOLOGICAL_VARIABLE.value, "tasmax") - # ].id - # ), - # ConfigurationParameterPossibleValueCreate( - # configuration_parameter_value_id=conf_param_values[ - # (CoreConfParamName.AGGREGATION_PERIOD.value, "annual") - # ].id - # ), - # ConfigurationParameterPossibleValueCreate( - # configuration_parameter_value_id=conf_param_values[ - # (CoreConfParamName.MEASURE.value, "absolute") - # ].id - # ), ConfigurationParameterPossibleValueCreate( configuration_parameter_value_id=conf_param_values[ ( @@ -249,25 +159,12 @@ def generate_configurations( ].id ), ], - observation_variable_id=( - v.id if (v := variables.get("TXd")) is not None else None - ), - observation_variable_aggregation_type=ObservationAggregationType.SEASONAL, ), CoverageConfigurationCreate( name="tasmax_annual_absolute_model_ec_earth_cclm4_8_17", - # display_name_english=_DISPLAY_NAME_ENGLISH, - # display_name_italian=_DISPLAY_NAME_ITALIAN, - # description_english=_DESCRIPTION_ENGLISH, - # description_italian=_DESCRIPTION_ITALIAN, netcdf_main_dataset_name="tasmax", wms_main_layer_name="tasmax", thredds_url_pattern="EC-EARTH_CCLM4-8-17ymbc/clipped/tasmax_EC-EARTH_CCLM4-8-17_{scenario}_ts19762100_ls_VFVG.nc", - # unit_english="ºC", - # palette="default/seq-YlOrRd", - # color_scale_min=7, - # color_scale_max=37, - # data_precision=_DATA_PRECISION, climatic_indicator_id=climatic_indicators["tasmax-absolute-annual"], possible_values=[ ConfigurationParameterPossibleValueCreate( @@ -275,21 +172,6 @@ def generate_configurations( (CoreConfParamName.ARCHIVE.value, "forecast") ].id ), - # ConfigurationParameterPossibleValueCreate( - # configuration_parameter_value_id=conf_param_values[ - # (CoreConfParamName.CLIMATOLOGICAL_VARIABLE.value, "tasmax") - # ].id - # ), - # ConfigurationParameterPossibleValueCreate( - # configuration_parameter_value_id=conf_param_values[ - # (CoreConfParamName.AGGREGATION_PERIOD.value, "annual") - # ].id - # ), - # ConfigurationParameterPossibleValueCreate( - # configuration_parameter_value_id=conf_param_values[ - # (CoreConfParamName.MEASURE.value, "absolute") - # ].id - # ), ConfigurationParameterPossibleValueCreate( configuration_parameter_value_id=conf_param_values[ ( @@ -319,25 +201,12 @@ def generate_configurations( ].id ), ], - observation_variable_id=( - v.id if (v := variables.get("TXd")) is not None else None - ), - observation_variable_aggregation_type=ObservationAggregationType.YEARLY, ), CoverageConfigurationCreate( name="tasmax_seasonal_absolute_model_ec_earth_racmo22e", - # display_name_english=_DISPLAY_NAME_ENGLISH, - # display_name_italian=_DISPLAY_NAME_ITALIAN, - # description_english=_DESCRIPTION_ENGLISH, - # description_italian=_DESCRIPTION_ITALIAN, netcdf_main_dataset_name="tasmax", wms_main_layer_name="tasmax", thredds_url_pattern="EC-EARTH_RACMO22Eymbc/clipped/tasmax_EC-EARTH_RACMO22E_{scenario}_{year_period}_ts19762100_ls_VFVG.nc", - # unit_english="ºC", - # palette="default/seq-YlOrRd", - # color_scale_min=-3, - # color_scale_max=32, - # data_precision=_DATA_PRECISION, climatic_indicator_id=climatic_indicators["tasmax-absolute-annual"], possible_values=[ ConfigurationParameterPossibleValueCreate( @@ -345,21 +214,6 @@ def generate_configurations( (CoreConfParamName.ARCHIVE.value, "forecast") ].id ), - # ConfigurationParameterPossibleValueCreate( - # configuration_parameter_value_id=conf_param_values[ - # (CoreConfParamName.CLIMATOLOGICAL_VARIABLE.value, "tasmax") - # ].id - # ), - # ConfigurationParameterPossibleValueCreate( - # configuration_parameter_value_id=conf_param_values[ - # (CoreConfParamName.AGGREGATION_PERIOD.value, "annual") - # ].id - # ), - # ConfigurationParameterPossibleValueCreate( - # configuration_parameter_value_id=conf_param_values[ - # (CoreConfParamName.MEASURE.value, "absolute") - # ].id - # ), ConfigurationParameterPossibleValueCreate( configuration_parameter_value_id=conf_param_values[ ( @@ -404,25 +258,12 @@ def generate_configurations( ].id ), ], - observation_variable_id=( - v.id if (v := variables.get("TXd")) is not None else None - ), - observation_variable_aggregation_type=ObservationAggregationType.SEASONAL, ), CoverageConfigurationCreate( name="tasmax_annual_absolute_model_ec_earth_racmo22e", - # display_name_english=_DISPLAY_NAME_ENGLISH, - # display_name_italian=_DISPLAY_NAME_ITALIAN, - # description_english=_DESCRIPTION_ENGLISH, - # description_italian=_DESCRIPTION_ITALIAN, netcdf_main_dataset_name="tasmax", wms_main_layer_name="tasmax", thredds_url_pattern="EC-EARTH_RACMO22Eymbc/clipped/tasmax_EC-EARTH_RACMO22E_{scenario}_ts19762100_ls_VFVG.nc", - # unit_english="ºC", - # palette="default/seq-YlOrRd", - # color_scale_min=7, - # color_scale_max=37, - # data_precision=_DATA_PRECISION, climatic_indicator_id=climatic_indicators["tasmax-absolute-annual"], possible_values=[ ConfigurationParameterPossibleValueCreate( @@ -430,21 +271,6 @@ def generate_configurations( (CoreConfParamName.ARCHIVE.value, "forecast") ].id ), - # ConfigurationParameterPossibleValueCreate( - # configuration_parameter_value_id=conf_param_values[ - # (CoreConfParamName.CLIMATOLOGICAL_VARIABLE.value, "tasmax") - # ].id - # ), - # ConfigurationParameterPossibleValueCreate( - # configuration_parameter_value_id=conf_param_values[ - # (CoreConfParamName.AGGREGATION_PERIOD.value, "annual") - # ].id - # ), - # ConfigurationParameterPossibleValueCreate( - # configuration_parameter_value_id=conf_param_values[ - # (CoreConfParamName.MEASURE.value, "absolute") - # ].id - # ), ConfigurationParameterPossibleValueCreate( configuration_parameter_value_id=conf_param_values[ ( @@ -474,25 +300,12 @@ def generate_configurations( ].id ), ], - observation_variable_id=( - v.id if (v := variables.get("TXd")) is not None else None - ), - observation_variable_aggregation_type=ObservationAggregationType.YEARLY, ), CoverageConfigurationCreate( name="tasmax_seasonal_absolute_model_ec_earth_rca4", - # display_name_english=_DISPLAY_NAME_ENGLISH, - # display_name_italian=_DISPLAY_NAME_ITALIAN, - # description_english=_DESCRIPTION_ENGLISH, - # description_italian=_DESCRIPTION_ITALIAN, netcdf_main_dataset_name="tasmax", wms_main_layer_name="tasmax", thredds_url_pattern="EC-EARTH_RCA4ymbc/clipped/tasmax_EC-EARTH_RCA4_{scenario}_{year_period}_ts19762100_ls_VFVG.nc", - # unit_english="ºC", - # palette="default/seq-YlOrRd", - # color_scale_min=-3, - # color_scale_max=32, - # data_precision=_DATA_PRECISION, climatic_indicator_id=climatic_indicators["tasmax-absolute-annual"], possible_values=[ ConfigurationParameterPossibleValueCreate( @@ -500,21 +313,6 @@ def generate_configurations( (CoreConfParamName.ARCHIVE.value, "forecast") ].id ), - # ConfigurationParameterPossibleValueCreate( - # configuration_parameter_value_id=conf_param_values[ - # (CoreConfParamName.CLIMATOLOGICAL_VARIABLE.value, "tasmax") - # ].id - # ), - # ConfigurationParameterPossibleValueCreate( - # configuration_parameter_value_id=conf_param_values[ - # (CoreConfParamName.AGGREGATION_PERIOD.value, "annual") - # ].id - # ), - # ConfigurationParameterPossibleValueCreate( - # configuration_parameter_value_id=conf_param_values[ - # (CoreConfParamName.MEASURE.value, "absolute") - # ].id - # ), ConfigurationParameterPossibleValueCreate( configuration_parameter_value_id=conf_param_values[ (CoreConfParamName.CLIMATOLOGICAL_MODEL.value, "ec_earth_rca4") @@ -556,25 +354,12 @@ def generate_configurations( ].id ), ], - observation_variable_id=( - v.id if (v := variables.get("TXd")) is not None else None - ), - observation_variable_aggregation_type=ObservationAggregationType.SEASONAL, ), CoverageConfigurationCreate( name="tasmax_annual_absolute_model_ec_earth_rca4", - # display_name_english=_DISPLAY_NAME_ENGLISH, - # display_name_italian=_DISPLAY_NAME_ITALIAN, - # description_english=_DESCRIPTION_ENGLISH, - # description_italian=_DESCRIPTION_ITALIAN, netcdf_main_dataset_name="tasmax", wms_main_layer_name="tasmax", thredds_url_pattern="EC-EARTH_RCA4ymbc/clipped/tasmax_EC-EARTH_RCA4_{scenario}_ts19762100_ls_VFVG.nc", - # unit_english="ºC", - # palette="default/seq-YlOrRd", - # color_scale_min=7, - # color_scale_max=37, - # data_precision=_DATA_PRECISION, climatic_indicator_id=climatic_indicators["tasmax-absolute-annual"], possible_values=[ ConfigurationParameterPossibleValueCreate( @@ -582,21 +367,6 @@ def generate_configurations( (CoreConfParamName.ARCHIVE.value, "forecast") ].id ), - # ConfigurationParameterPossibleValueCreate( - # configuration_parameter_value_id=conf_param_values[ - # (CoreConfParamName.CLIMATOLOGICAL_VARIABLE.value, "tasmax") - # ].id - # ), - # ConfigurationParameterPossibleValueCreate( - # configuration_parameter_value_id=conf_param_values[ - # (CoreConfParamName.AGGREGATION_PERIOD.value, "annual") - # ].id - # ), - # ConfigurationParameterPossibleValueCreate( - # configuration_parameter_value_id=conf_param_values[ - # (CoreConfParamName.MEASURE.value, "absolute") - # ].id - # ), ConfigurationParameterPossibleValueCreate( configuration_parameter_value_id=conf_param_values[ (CoreConfParamName.CLIMATOLOGICAL_MODEL.value, "ec_earth_rca4") @@ -623,25 +393,12 @@ def generate_configurations( ].id ), ], - observation_variable_id=( - v.id if (v := variables.get("TXd")) is not None else None - ), - observation_variable_aggregation_type=ObservationAggregationType.YEARLY, ), CoverageConfigurationCreate( name="tasmax_seasonal_absolute_model_hadgem2_es_racmo22e", - # display_name_english=_DISPLAY_NAME_ENGLISH, - # display_name_italian=_DISPLAY_NAME_ITALIAN, - # description_english=_DESCRIPTION_ENGLISH, - # description_italian=_DESCRIPTION_ITALIAN, netcdf_main_dataset_name="tasmax", wms_main_layer_name="tasmax", thredds_url_pattern="HadGEM2-ES_RACMO22Eymbc/clipped/tasmax_HadGEM2-ES_RACMO22E_{scenario}_{year_period}_ts19762100_ls_VFVG.nc", - # unit_english="ºC", - # palette="default/seq-YlOrRd", - # color_scale_min=-3, - # color_scale_max=32, - # data_precision=_DATA_PRECISION, climatic_indicator_id=climatic_indicators["tasmax-absolute-annual"], possible_values=[ ConfigurationParameterPossibleValueCreate( @@ -649,21 +406,6 @@ def generate_configurations( (CoreConfParamName.ARCHIVE.value, "forecast") ].id ), - # ConfigurationParameterPossibleValueCreate( - # configuration_parameter_value_id=conf_param_values[ - # (CoreConfParamName.CLIMATOLOGICAL_VARIABLE.value, "tasmax") - # ].id - # ), - # ConfigurationParameterPossibleValueCreate( - # configuration_parameter_value_id=conf_param_values[ - # (CoreConfParamName.AGGREGATION_PERIOD.value, "annual") - # ].id - # ), - # ConfigurationParameterPossibleValueCreate( - # configuration_parameter_value_id=conf_param_values[ - # (CoreConfParamName.MEASURE.value, "absolute") - # ].id - # ), ConfigurationParameterPossibleValueCreate( configuration_parameter_value_id=conf_param_values[ ( @@ -708,25 +450,12 @@ def generate_configurations( ].id ), ], - observation_variable_id=( - v.id if (v := variables.get("TXd")) is not None else None - ), - observation_variable_aggregation_type=ObservationAggregationType.SEASONAL, ), CoverageConfigurationCreate( name="tasmax_annual_absolute_model_hadgem2_es_racmo22e", - # display_name_english=_DISPLAY_NAME_ENGLISH, - # display_name_italian=_DISPLAY_NAME_ITALIAN, - # description_english=_DESCRIPTION_ENGLISH, - # description_italian=_DESCRIPTION_ITALIAN, netcdf_main_dataset_name="tasmax", wms_main_layer_name="tasmax", thredds_url_pattern="HadGEM2-ES_RACMO22Eymbc/clipped/tasmax_HadGEM2-ES_RACMO22E_{scenario}_ts19762100_ls_VFVG.nc", - # unit_english="ºC", - # palette="default/seq-YlOrRd", - # color_scale_min=7, - # color_scale_max=37, - # data_precision=_DATA_PRECISION, climatic_indicator_id=climatic_indicators["tasmax-absolute-annual"], possible_values=[ ConfigurationParameterPossibleValueCreate( @@ -734,21 +463,6 @@ def generate_configurations( (CoreConfParamName.ARCHIVE.value, "forecast") ].id ), - # ConfigurationParameterPossibleValueCreate( - # configuration_parameter_value_id=conf_param_values[ - # (CoreConfParamName.CLIMATOLOGICAL_VARIABLE.value, "tasmax") - # ].id - # ), - # ConfigurationParameterPossibleValueCreate( - # configuration_parameter_value_id=conf_param_values[ - # (CoreConfParamName.AGGREGATION_PERIOD.value, "annual") - # ].id - # ), - # ConfigurationParameterPossibleValueCreate( - # configuration_parameter_value_id=conf_param_values[ - # (CoreConfParamName.MEASURE.value, "absolute") - # ].id - # ), ConfigurationParameterPossibleValueCreate( configuration_parameter_value_id=conf_param_values[ ( @@ -778,25 +492,12 @@ def generate_configurations( ].id ), ], - observation_variable_id=( - v.id if (v := variables.get("TXd")) is not None else None - ), - observation_variable_aggregation_type=ObservationAggregationType.YEARLY, ), CoverageConfigurationCreate( name="tasmax_seasonal_absolute_model_mpi_esm_lr_remo2009", - # display_name_english=_DISPLAY_NAME_ENGLISH, - # display_name_italian=_DISPLAY_NAME_ITALIAN, - # description_english=_DESCRIPTION_ENGLISH, - # description_italian=_DESCRIPTION_ITALIAN, netcdf_main_dataset_name="tasmax", wms_main_layer_name="tasmax", thredds_url_pattern="MPI-ESM-LR_REMO2009ymbc/clipped/tasmax_MPI-ESM-LR_REMO2009_{scenario}_{year_period}_ts19762100_ls_VFVG.nc", - # unit_english="ºC", - # palette="default/seq-YlOrRd", - # color_scale_min=-3, - # color_scale_max=32, - # data_precision=_DATA_PRECISION, climatic_indicator_id=climatic_indicators["tasmax-absolute-annual"], possible_values=[ ConfigurationParameterPossibleValueCreate( @@ -804,21 +505,6 @@ def generate_configurations( (CoreConfParamName.ARCHIVE.value, "forecast") ].id ), - # ConfigurationParameterPossibleValueCreate( - # configuration_parameter_value_id=conf_param_values[ - # (CoreConfParamName.CLIMATOLOGICAL_VARIABLE.value, "tasmax") - # ].id - # ), - # ConfigurationParameterPossibleValueCreate( - # configuration_parameter_value_id=conf_param_values[ - # (CoreConfParamName.AGGREGATION_PERIOD.value, "annual") - # ].id - # ), - # ConfigurationParameterPossibleValueCreate( - # configuration_parameter_value_id=conf_param_values[ - # (CoreConfParamName.MEASURE.value, "absolute") - # ].id - # ), ConfigurationParameterPossibleValueCreate( configuration_parameter_value_id=conf_param_values[ ( @@ -863,25 +549,12 @@ def generate_configurations( ].id ), ], - observation_variable_id=( - v.id if (v := variables.get("TXd")) is not None else None - ), - observation_variable_aggregation_type=ObservationAggregationType.SEASONAL, ), CoverageConfigurationCreate( name="tasmax_annual_absolute_model_mpi_esm_lr_remo2009", - # display_name_english=_DISPLAY_NAME_ENGLISH, - # display_name_italian=_DISPLAY_NAME_ITALIAN, - # description_english=_DESCRIPTION_ENGLISH, - # description_italian=_DESCRIPTION_ITALIAN, netcdf_main_dataset_name="tasmax", wms_main_layer_name="tasmax", thredds_url_pattern="MPI-ESM-LR_REMO2009ymbc/clipped/tasmax_MPI-ESM-LR_REMO2009_{scenario}_ts19762100_ls_VFVG.nc", - # unit_english="ºC", - # palette="default/seq-YlOrRd", - # color_scale_min=7, - # color_scale_max=37, - # data_precision=_DATA_PRECISION, climatic_indicator_id=climatic_indicators["tasmax-absolute-annual"], possible_values=[ ConfigurationParameterPossibleValueCreate( @@ -889,21 +562,6 @@ def generate_configurations( (CoreConfParamName.ARCHIVE.value, "forecast") ].id ), - # ConfigurationParameterPossibleValueCreate( - # configuration_parameter_value_id=conf_param_values[ - # (CoreConfParamName.CLIMATOLOGICAL_VARIABLE.value, "tasmax") - # ].id - # ), - # ConfigurationParameterPossibleValueCreate( - # configuration_parameter_value_id=conf_param_values[ - # (CoreConfParamName.AGGREGATION_PERIOD.value, "annual") - # ].id - # ), - # ConfigurationParameterPossibleValueCreate( - # configuration_parameter_value_id=conf_param_values[ - # (CoreConfParamName.MEASURE.value, "absolute") - # ].id - # ), ConfigurationParameterPossibleValueCreate( configuration_parameter_value_id=conf_param_values[ ( @@ -933,25 +591,12 @@ def generate_configurations( ].id ), ], - observation_variable_id=( - v.id if (v := variables.get("TXd")) is not None else None - ), - observation_variable_aggregation_type=ObservationAggregationType.YEARLY, ), CoverageConfigurationCreate( name="tasmax_seasonal_absolute_model_ensemble_upper_uncertainty", - # display_name_english=_DISPLAY_NAME_ENGLISH, - # display_name_italian=_DISPLAY_NAME_ITALIAN, - # description_english=_DESCRIPTION_ENGLISH, - # description_italian=_DESCRIPTION_ITALIAN, netcdf_main_dataset_name="tasmax_stdup", wms_main_layer_name="tasmax_stdup", thredds_url_pattern="ensymbc/std/clipped/tasmax_stdup_{scenario}_{year_period}_ts19762100_ls_VFVG.nc", - # unit_english="ºC", - # palette="default/seq-YlOrRd", - # color_scale_min=7, - # color_scale_max=37, - # data_precision=_DATA_PRECISION, climatic_indicator_id=climatic_indicators["tasmax-absolute-annual"], possible_values=[ ConfigurationParameterPossibleValueCreate( @@ -959,21 +604,6 @@ def generate_configurations( (CoreConfParamName.ARCHIVE.value, "forecast") ].id ), - # ConfigurationParameterPossibleValueCreate( - # configuration_parameter_value_id=conf_param_values[ - # (CoreConfParamName.CLIMATOLOGICAL_VARIABLE.value, "tasmax") - # ].id - # ), - # ConfigurationParameterPossibleValueCreate( - # configuration_parameter_value_id=conf_param_values[ - # (CoreConfParamName.AGGREGATION_PERIOD.value, "annual") - # ].id - # ), - # ConfigurationParameterPossibleValueCreate( - # configuration_parameter_value_id=conf_param_values[ - # (CoreConfParamName.MEASURE.value, "absolute") - # ].id - # ), ConfigurationParameterPossibleValueCreate( configuration_parameter_value_id=conf_param_values[ (CoreConfParamName.CLIMATOLOGICAL_MODEL.value, "model_ensemble") @@ -1023,18 +653,9 @@ def generate_configurations( ), CoverageConfigurationCreate( name="tasmax_seasonal_absolute_model_ensemble_lower_uncertainty", - # display_name_english=_DISPLAY_NAME_ENGLISH, - # display_name_italian=_DISPLAY_NAME_ITALIAN, - # description_english=_DESCRIPTION_ENGLISH, - # description_italian=_DESCRIPTION_ITALIAN, netcdf_main_dataset_name="tasmax_stddown", wms_main_layer_name="tasmax_stddown", thredds_url_pattern="ensymbc/std/clipped/tasmax_stddown_{scenario}_{year_period}_ts19762100_ls_VFVG.nc", - # unit_english="ºC", - # palette="default/seq-YlOrRd", - # color_scale_min=7, - # color_scale_max=37, - # data_precision=_DATA_PRECISION, climatic_indicator_id=climatic_indicators["tasmax-absolute-annual"], possible_values=[ ConfigurationParameterPossibleValueCreate( @@ -1042,21 +663,6 @@ def generate_configurations( (CoreConfParamName.ARCHIVE.value, "forecast") ].id ), - # ConfigurationParameterPossibleValueCreate( - # configuration_parameter_value_id=conf_param_values[ - # (CoreConfParamName.CLIMATOLOGICAL_VARIABLE.value, "tasmax") - # ].id - # ), - # ConfigurationParameterPossibleValueCreate( - # configuration_parameter_value_id=conf_param_values[ - # (CoreConfParamName.AGGREGATION_PERIOD.value, "annual") - # ].id - # ), - # ConfigurationParameterPossibleValueCreate( - # configuration_parameter_value_id=conf_param_values[ - # (CoreConfParamName.MEASURE.value, "absolute") - # ].id - # ), ConfigurationParameterPossibleValueCreate( configuration_parameter_value_id=conf_param_values[ (CoreConfParamName.CLIMATOLOGICAL_MODEL.value, "model_ensemble") @@ -1106,18 +712,9 @@ def generate_configurations( ), CoverageConfigurationCreate( name="tasmax_annual_absolute_model_ensemble_upper_uncertainty", - # display_name_english=_DISPLAY_NAME_ENGLISH, - # display_name_italian=_DISPLAY_NAME_ITALIAN, - # description_english=_DESCRIPTION_ENGLISH, - # description_italian=_DESCRIPTION_ITALIAN, netcdf_main_dataset_name="tasmax_stdup", wms_main_layer_name="tasmax_stdup", thredds_url_pattern="ensymbc/std/clipped/tasmax_stdup_{scenario}_ts19762100_ls_VFVG.nc", - # unit_english="ºC", - # palette="default/seq-YlOrRd", - # color_scale_min=7, - # color_scale_max=37, - # data_precision=_DATA_PRECISION, climatic_indicator_id=climatic_indicators["tasmax-absolute-annual"], possible_values=[ ConfigurationParameterPossibleValueCreate( @@ -1125,21 +722,6 @@ def generate_configurations( (CoreConfParamName.ARCHIVE.value, "forecast") ].id ), - # ConfigurationParameterPossibleValueCreate( - # configuration_parameter_value_id=conf_param_values[ - # (CoreConfParamName.CLIMATOLOGICAL_VARIABLE.value, "tasmax") - # ].id - # ), - # ConfigurationParameterPossibleValueCreate( - # configuration_parameter_value_id=conf_param_values[ - # (CoreConfParamName.AGGREGATION_PERIOD.value, "annual") - # ].id - # ), - # ConfigurationParameterPossibleValueCreate( - # configuration_parameter_value_id=conf_param_values[ - # (CoreConfParamName.MEASURE.value, "absolute") - # ].id - # ), ConfigurationParameterPossibleValueCreate( configuration_parameter_value_id=conf_param_values[ (CoreConfParamName.CLIMATOLOGICAL_MODEL.value, "model_ensemble") @@ -1174,18 +756,9 @@ def generate_configurations( ), CoverageConfigurationCreate( name="tasmax_annual_absolute_model_ensemble_lower_uncertainty", - # display_name_english=_DISPLAY_NAME_ENGLISH, - # display_name_italian=_DISPLAY_NAME_ITALIAN, - # description_english=_DESCRIPTION_ENGLISH, - # description_italian=_DESCRIPTION_ITALIAN, netcdf_main_dataset_name="tasmax_stddown", wms_main_layer_name="tasmax_stddown", thredds_url_pattern="ensymbc/std/clipped/tasmax_stddown_{scenario}_ts19762100_ls_VFVG.nc", - # unit_english="ºC", - # palette="default/seq-YlOrRd", - # color_scale_min=7, - # color_scale_max=37, - # data_precision=_DATA_PRECISION, climatic_indicator_id=climatic_indicators["tasmax-absolute-annual"], possible_values=[ ConfigurationParameterPossibleValueCreate( @@ -1193,21 +766,6 @@ def generate_configurations( (CoreConfParamName.ARCHIVE.value, "forecast") ].id ), - # ConfigurationParameterPossibleValueCreate( - # configuration_parameter_value_id=conf_param_values[ - # (CoreConfParamName.CLIMATOLOGICAL_VARIABLE.value, "tasmax") - # ].id - # ), - # ConfigurationParameterPossibleValueCreate( - # configuration_parameter_value_id=conf_param_values[ - # (CoreConfParamName.AGGREGATION_PERIOD.value, "annual") - # ].id - # ), - # ConfigurationParameterPossibleValueCreate( - # configuration_parameter_value_id=conf_param_values[ - # (CoreConfParamName.MEASURE.value, "absolute") - # ].id - # ), ConfigurationParameterPossibleValueCreate( configuration_parameter_value_id=conf_param_values[ (CoreConfParamName.CLIMATOLOGICAL_MODEL.value, "model_ensemble") @@ -1242,19 +800,10 @@ def generate_configurations( ), CoverageConfigurationCreate( name="tasmax_30yr_anomaly_seasonal_agree_model_ensemble", - # display_name_english=_DISPLAY_NAME_ENGLISH, - # display_name_italian=_DISPLAY_NAME_ITALIAN, - # description_english=_DESCRIPTION_ENGLISH, - # description_italian=_DESCRIPTION_ITALIAN, netcdf_main_dataset_name="tasmax", wms_main_layer_name="tasmax-uncertainty_group", wms_secondary_layer_name="tasmax", thredds_url_pattern="ensembletwbc/std/clipped/tasmax_avgagree_anom_{time_window}_{scenario}_{year_period}_VFVGTAA.nc", - # unit_english="ºC", - # palette="uncert-stippled/seq-YlOrRd", - # color_scale_min=0, - # color_scale_max=6, - # data_precision=_DATA_PRECISION, climatic_indicator_id=climatic_indicators["tasmax-anomaly-thirty_year"], possible_values=[ ConfigurationParameterPossibleValueCreate( @@ -1262,21 +811,6 @@ def generate_configurations( (CoreConfParamName.ARCHIVE.value, "forecast") ].id ), - # ConfigurationParameterPossibleValueCreate( - # configuration_parameter_value_id=conf_param_values[ - # (CoreConfParamName.CLIMATOLOGICAL_VARIABLE.value, "tasmax") - # ].id - # ), - # ConfigurationParameterPossibleValueCreate( - # configuration_parameter_value_id=conf_param_values[ - # (CoreConfParamName.AGGREGATION_PERIOD.value, "30yr") - # ].id - # ), - # ConfigurationParameterPossibleValueCreate( - # configuration_parameter_value_id=conf_param_values[ - # (CoreConfParamName.MEASURE.value, "anomaly") - # ].id - # ), ConfigurationParameterPossibleValueCreate( configuration_parameter_value_id=conf_param_values[ (CoreConfParamName.CLIMATOLOGICAL_MODEL.value, "model_ensemble") @@ -1331,18 +865,9 @@ def generate_configurations( ), CoverageConfigurationCreate( name="tasmax_30yr_anomaly_seasonal_model_ec_earth_cclm4_8_17", - # display_name_english=_DISPLAY_NAME_ENGLISH, - # display_name_italian=_DISPLAY_NAME_ITALIAN, - # description_english=_DESCRIPTION_ENGLISH, - # description_italian=_DESCRIPTION_ITALIAN, netcdf_main_dataset_name="tasmax", wms_main_layer_name="tasmax", thredds_url_pattern="taspr5rcm/clipped/tasmax_EC-EARTH_CCLM4-8-17_{scenario}_seas_{time_window}{year_period}_VFVGTAA.nc", - # unit_english="ºC", - # palette="default/seq-YlOrRd", - # color_scale_min=0, - # color_scale_max=6, - # data_precision=_DATA_PRECISION, climatic_indicator_id=climatic_indicators["tasmax-anomaly-thirty_year"], possible_values=[ ConfigurationParameterPossibleValueCreate( @@ -1350,21 +875,6 @@ def generate_configurations( (CoreConfParamName.ARCHIVE.value, "forecast") ].id ), - # ConfigurationParameterPossibleValueCreate( - # configuration_parameter_value_id=conf_param_values[ - # (CoreConfParamName.CLIMATOLOGICAL_VARIABLE.value, "tasmax") - # ].id - # ), - # ConfigurationParameterPossibleValueCreate( - # configuration_parameter_value_id=conf_param_values[ - # (CoreConfParamName.AGGREGATION_PERIOD.value, "30yr") - # ].id - # ), - # ConfigurationParameterPossibleValueCreate( - # configuration_parameter_value_id=conf_param_values[ - # (CoreConfParamName.MEASURE.value, "anomaly") - # ].id - # ), ConfigurationParameterPossibleValueCreate( configuration_parameter_value_id=conf_param_values[ ( @@ -1422,18 +932,9 @@ def generate_configurations( ), CoverageConfigurationCreate( name="tasmax_30yr_anomaly_seasonal_model_ec_earth_racmo22e", - # display_name_english=_DISPLAY_NAME_ENGLISH, - # display_name_italian=_DISPLAY_NAME_ITALIAN, - # description_english=_DESCRIPTION_ENGLISH, - # description_italian=_DESCRIPTION_ITALIAN, netcdf_main_dataset_name="tasmax", wms_main_layer_name="tasmax", thredds_url_pattern="taspr5rcm/clipped/tasmax_EC-EARTH_RACMO22E_{scenario}_seas_{time_window}{year_period}_VFVGTAA.nc", - # unit_english="ºC", - # palette="default/seq-YlOrRd", - # color_scale_min=0, - # color_scale_max=6, - # data_precision=_DATA_PRECISION, climatic_indicator_id=climatic_indicators["tasmax-anomaly-thirty_year"], possible_values=[ ConfigurationParameterPossibleValueCreate( @@ -1441,21 +942,6 @@ def generate_configurations( (CoreConfParamName.ARCHIVE.value, "forecast") ].id ), - # ConfigurationParameterPossibleValueCreate( - # configuration_parameter_value_id=conf_param_values[ - # (CoreConfParamName.CLIMATOLOGICAL_VARIABLE.value, "tasmax") - # ].id - # ), - # ConfigurationParameterPossibleValueCreate( - # configuration_parameter_value_id=conf_param_values[ - # (CoreConfParamName.AGGREGATION_PERIOD.value, "30yr") - # ].id - # ), - # ConfigurationParameterPossibleValueCreate( - # configuration_parameter_value_id=conf_param_values[ - # (CoreConfParamName.MEASURE.value, "anomaly") - # ].id - # ), ConfigurationParameterPossibleValueCreate( configuration_parameter_value_id=conf_param_values[ ( @@ -1513,18 +999,9 @@ def generate_configurations( ), CoverageConfigurationCreate( name="tasmax_30yr_anomaly_seasonal_model_ec_earth_rca4", - # display_name_english=_DISPLAY_NAME_ENGLISH, - # display_name_italian=_DISPLAY_NAME_ITALIAN, - # description_english=_DESCRIPTION_ENGLISH, - # description_italian=_DESCRIPTION_ITALIAN, netcdf_main_dataset_name="tasmax", wms_main_layer_name="tasmax", thredds_url_pattern="taspr5rcm/clipped/tasmax_EC-EARTH_RCA4_{scenario}_seas_{time_window}{year_period}_VFVGTAA.nc", - # unit_english="ºC", - # palette="default/seq-YlOrRd", - # color_scale_min=0, - # color_scale_max=6, - # data_precision=_DATA_PRECISION, climatic_indicator_id=climatic_indicators["tasmax-anomaly-thirty_year"], possible_values=[ ConfigurationParameterPossibleValueCreate( @@ -1532,21 +1009,6 @@ def generate_configurations( (CoreConfParamName.ARCHIVE.value, "forecast") ].id ), - # ConfigurationParameterPossibleValueCreate( - # configuration_parameter_value_id=conf_param_values[ - # (CoreConfParamName.CLIMATOLOGICAL_VARIABLE.value, "tasmax") - # ].id - # ), - # ConfigurationParameterPossibleValueCreate( - # configuration_parameter_value_id=conf_param_values[ - # (CoreConfParamName.AGGREGATION_PERIOD.value, "30yr") - # ].id - # ), - # ConfigurationParameterPossibleValueCreate( - # configuration_parameter_value_id=conf_param_values[ - # (CoreConfParamName.MEASURE.value, "anomaly") - # ].id - # ), ConfigurationParameterPossibleValueCreate( configuration_parameter_value_id=conf_param_values[ (CoreConfParamName.CLIMATOLOGICAL_MODEL.value, "ec_earth_rca4") @@ -1601,18 +1063,9 @@ def generate_configurations( ), CoverageConfigurationCreate( name="tasmax_30yr_anomaly_seasonal_model_hadgem2_es_racmo22e", - # display_name_english=_DISPLAY_NAME_ENGLISH, - # display_name_italian=_DISPLAY_NAME_ITALIAN, - # description_english=_DESCRIPTION_ENGLISH, - # description_italian=_DESCRIPTION_ITALIAN, netcdf_main_dataset_name="tasmax", wms_main_layer_name="tasmax", thredds_url_pattern="taspr5rcm/clipped/tasmax_HadGEM2-ES_RACMO22E_{scenario}_seas_{time_window}{year_period}_VFVGTAA.nc", - # unit_english="ºC", - # palette="default/seq-YlOrRd", - # color_scale_min=0, - # color_scale_max=6, - # data_precision=_DATA_PRECISION, climatic_indicator_id=climatic_indicators["tasmax-anomaly-thirty_year"], possible_values=[ ConfigurationParameterPossibleValueCreate( @@ -1620,21 +1073,6 @@ def generate_configurations( (CoreConfParamName.ARCHIVE.value, "forecast") ].id ), - # ConfigurationParameterPossibleValueCreate( - # configuration_parameter_value_id=conf_param_values[ - # (CoreConfParamName.CLIMATOLOGICAL_VARIABLE.value, "tasmax") - # ].id - # ), - # ConfigurationParameterPossibleValueCreate( - # configuration_parameter_value_id=conf_param_values[ - # (CoreConfParamName.AGGREGATION_PERIOD.value, "30yr") - # ].id - # ), - # ConfigurationParameterPossibleValueCreate( - # configuration_parameter_value_id=conf_param_values[ - # (CoreConfParamName.MEASURE.value, "anomaly") - # ].id - # ), ConfigurationParameterPossibleValueCreate( configuration_parameter_value_id=conf_param_values[ ( @@ -1692,18 +1130,9 @@ def generate_configurations( ), CoverageConfigurationCreate( name="tasmax_30yr_anomaly_seasonal_model_mpi_esm_lr_remo2009", - # display_name_english=_DISPLAY_NAME_ENGLISH, - # display_name_italian=_DISPLAY_NAME_ITALIAN, - # description_english=_DESCRIPTION_ENGLISH, - # description_italian=_DESCRIPTION_ITALIAN, netcdf_main_dataset_name="tasmax", wms_main_layer_name="tasmax", thredds_url_pattern="taspr5rcm/clipped/tasmax_MPI-ESM-LR_REMO2009_{scenario}_seas_{time_window}{year_period}_VFVGTAA.nc", - # unit_english="ºC", - # palette="default/seq-YlOrRd", - # color_scale_min=0, - # color_scale_max=6, - # data_precision=_DATA_PRECISION, climatic_indicator_id=climatic_indicators["tasmax-anomaly-thirty_year"], possible_values=[ ConfigurationParameterPossibleValueCreate( @@ -1711,21 +1140,6 @@ def generate_configurations( (CoreConfParamName.ARCHIVE.value, "forecast") ].id ), - # ConfigurationParameterPossibleValueCreate( - # configuration_parameter_value_id=conf_param_values[ - # (CoreConfParamName.CLIMATOLOGICAL_VARIABLE.value, "tasmax") - # ].id - # ), - # ConfigurationParameterPossibleValueCreate( - # configuration_parameter_value_id=conf_param_values[ - # (CoreConfParamName.AGGREGATION_PERIOD.value, "30yr") - # ].id - # ), - # ConfigurationParameterPossibleValueCreate( - # configuration_parameter_value_id=conf_param_values[ - # (CoreConfParamName.MEASURE.value, "anomaly") - # ].id - # ), ConfigurationParameterPossibleValueCreate( configuration_parameter_value_id=conf_param_values[ ( diff --git a/arpav_ppcv/bootstrapper/coverage_configurations/forecast/tasmin.py b/arpav_ppcv/bootstrapper/coverage_configurations/forecast/tasmin.py index c3334a12..21871e9c 100644 --- a/arpav_ppcv/bootstrapper/coverage_configurations/forecast/tasmin.py +++ b/arpav_ppcv/bootstrapper/coverage_configurations/forecast/tasmin.py @@ -1,39 +1,20 @@ -from ....schemas.base import ( - CoreConfParamName, - ObservationAggregationType, -) +from ....schemas.base import CoreConfParamName from ....schemas.coverages import ( CoverageConfigurationCreate, ConfigurationParameterPossibleValueCreate, ) -# _DISPLAY_NAME_ENGLISH = "Minimum temperature" -# _DISPLAY_NAME_ITALIAN = "Temperatura minima" -# _DESCRIPTION_ENGLISH = "Minimum daily air temperature near the ground" -# _DESCRIPTION_ITALIAN = "Temperatura minima giornaliera dell'aria vicino al suolo" -# _DATA_PRECISION = 1 - def generate_configurations( conf_param_values, - variables, climatic_indicators: dict[str, int], ) -> list[CoverageConfigurationCreate]: return [ CoverageConfigurationCreate( name="tasmin_seasonal_absolute_model_ensemble", - # display_name_english=_DISPLAY_NAME_ENGLISH, - # display_name_italian=_DISPLAY_NAME_ITALIAN, - # description_english=_DESCRIPTION_ENGLISH, - # description_italian=_DESCRIPTION_ITALIAN, netcdf_main_dataset_name="tasmin", wms_main_layer_name="tasmin", thredds_url_pattern="ensymbc/clipped/tasmin_avg_{scenario}_{year_period}_ts19762100_ls_VFVG.nc", - # unit_english="ºC", - # palette="default/seq-YlOrRd", - # color_scale_min=-3, - # color_scale_max=32, - # data_precision=_DATA_PRECISION, climatic_indicator_id=climatic_indicators["tasmin-absolute-annual"], possible_values=[ ConfigurationParameterPossibleValueCreate( @@ -41,21 +22,6 @@ def generate_configurations( (CoreConfParamName.ARCHIVE.value, "forecast") ].id ), - # ConfigurationParameterPossibleValueCreate( - # configuration_parameter_value_id=conf_param_values[ - # (CoreConfParamName.CLIMATOLOGICAL_VARIABLE.value, "tasmin") - # ].id - # ), - # ConfigurationParameterPossibleValueCreate( - # configuration_parameter_value_id=conf_param_values[ - # (CoreConfParamName.AGGREGATION_PERIOD.value, "annual") - # ].id - # ), - # ConfigurationParameterPossibleValueCreate( - # configuration_parameter_value_id=conf_param_values[ - # (CoreConfParamName.MEASURE.value, "absolute") - # ].id - # ), ConfigurationParameterPossibleValueCreate( configuration_parameter_value_id=conf_param_values[ (CoreConfParamName.CLIMATOLOGICAL_MODEL.value, "model_ensemble") @@ -97,25 +63,12 @@ def generate_configurations( ].id ), ], - observation_variable_id=( - v.id if (v := variables.get("TNd")) is not None else None - ), - observation_variable_aggregation_type=ObservationAggregationType.SEASONAL, ), CoverageConfigurationCreate( name="tasmin_annual_absolute_model_ensemble", - # display_name_english=_DISPLAY_NAME_ENGLISH, - # display_name_italian=_DISPLAY_NAME_ITALIAN, - # description_english=_DESCRIPTION_ENGLISH, - # description_italian=_DESCRIPTION_ITALIAN, netcdf_main_dataset_name="tasmin", wms_main_layer_name="tasmin", thredds_url_pattern="ensymbc/clipped/tasmin_avg_{scenario}_ts19762100_ls_VFVG.nc", - # unit_english="ºC", - # palette="default/seq-YlOrRd", - # color_scale_min=-3, - # color_scale_max=32, - # data_precision=_DATA_PRECISION, climatic_indicator_id=climatic_indicators["tasmin-absolute-annual"], possible_values=[ ConfigurationParameterPossibleValueCreate( @@ -123,21 +76,6 @@ def generate_configurations( (CoreConfParamName.ARCHIVE.value, "forecast") ].id ), - # ConfigurationParameterPossibleValueCreate( - # configuration_parameter_value_id=conf_param_values[ - # (CoreConfParamName.CLIMATOLOGICAL_VARIABLE.value, "tasmin") - # ].id - # ), - # ConfigurationParameterPossibleValueCreate( - # configuration_parameter_value_id=conf_param_values[ - # (CoreConfParamName.AGGREGATION_PERIOD.value, "annual") - # ].id - # ), - # ConfigurationParameterPossibleValueCreate( - # configuration_parameter_value_id=conf_param_values[ - # (CoreConfParamName.MEASURE.value, "absolute") - # ].id - # ), ConfigurationParameterPossibleValueCreate( configuration_parameter_value_id=conf_param_values[ (CoreConfParamName.CLIMATOLOGICAL_MODEL.value, "model_ensemble") @@ -164,25 +102,12 @@ def generate_configurations( ].id ), ], - observation_variable_id=( - v.id if (v := variables.get("TNd")) is not None else None - ), - observation_variable_aggregation_type=ObservationAggregationType.YEARLY, ), CoverageConfigurationCreate( name="tasmin_seasonal_absolute_model_ec_earth_cclm4_8_17", - # display_name_english=_DISPLAY_NAME_ENGLISH, - # display_name_italian=_DISPLAY_NAME_ITALIAN, - # description_english=_DESCRIPTION_ENGLISH, - # description_italian=_DESCRIPTION_ITALIAN, netcdf_main_dataset_name="tasmin", wms_main_layer_name="tasmin", thredds_url_pattern="EC-EARTH_CCLM4-8-17ymbc/clipped/tasmin_EC-EARTH_CCLM4-8-17_{scenario}_{year_period}_ts19762100_ls_VFVG.nc", - # unit_english="ºC", - # palette="default/seq-YlOrRd", - # color_scale_min=-3, - # color_scale_max=32, - # data_precision=_DATA_PRECISION, climatic_indicator_id=climatic_indicators["tasmin-absolute-annual"], possible_values=[ ConfigurationParameterPossibleValueCreate( @@ -190,21 +115,6 @@ def generate_configurations( (CoreConfParamName.ARCHIVE.value, "forecast") ].id ), - # ConfigurationParameterPossibleValueCreate( - # configuration_parameter_value_id=conf_param_values[ - # (CoreConfParamName.CLIMATOLOGICAL_VARIABLE.value, "tasmin") - # ].id - # ), - # ConfigurationParameterPossibleValueCreate( - # configuration_parameter_value_id=conf_param_values[ - # (CoreConfParamName.AGGREGATION_PERIOD.value, "annual") - # ].id - # ), - # ConfigurationParameterPossibleValueCreate( - # configuration_parameter_value_id=conf_param_values[ - # (CoreConfParamName.MEASURE.value, "absolute") - # ].id - # ), ConfigurationParameterPossibleValueCreate( configuration_parameter_value_id=conf_param_values[ ( @@ -249,25 +159,12 @@ def generate_configurations( ].id ), ], - observation_variable_id=( - v.id if (v := variables.get("TNd")) is not None else None - ), - observation_variable_aggregation_type=ObservationAggregationType.SEASONAL, ), CoverageConfigurationCreate( name="tasmin_annual_absolute_model_ec_earth_cclm4_8_17", - # display_name_english=_DISPLAY_NAME_ENGLISH, - # display_name_italian=_DISPLAY_NAME_ITALIAN, - # description_english=_DESCRIPTION_ENGLISH, - # description_italian=_DESCRIPTION_ITALIAN, netcdf_main_dataset_name="tasmin", wms_main_layer_name="tasmin", thredds_url_pattern="EC-EARTH_CCLM4-8-17ymbc/clipped/tasmin_EC-EARTH_CCLM4-8-17_{scenario}_ts19762100_ls_VFVG.nc", - # unit_english="ºC", - # palette="default/seq-YlOrRd", - # color_scale_min=-13, - # color_scale_max=27, - # data_precision=_DATA_PRECISION, climatic_indicator_id=climatic_indicators["tasmin-absolute-annual"], possible_values=[ ConfigurationParameterPossibleValueCreate( @@ -275,21 +172,6 @@ def generate_configurations( (CoreConfParamName.ARCHIVE.value, "forecast") ].id ), - # ConfigurationParameterPossibleValueCreate( - # configuration_parameter_value_id=conf_param_values[ - # (CoreConfParamName.CLIMATOLOGICAL_VARIABLE.value, "tasmin") - # ].id - # ), - # ConfigurationParameterPossibleValueCreate( - # configuration_parameter_value_id=conf_param_values[ - # (CoreConfParamName.AGGREGATION_PERIOD.value, "annual") - # ].id - # ), - # ConfigurationParameterPossibleValueCreate( - # configuration_parameter_value_id=conf_param_values[ - # (CoreConfParamName.MEASURE.value, "absolute") - # ].id - # ), ConfigurationParameterPossibleValueCreate( configuration_parameter_value_id=conf_param_values[ ( @@ -319,25 +201,12 @@ def generate_configurations( ].id ), ], - observation_variable_id=( - v.id if (v := variables.get("TNd")) is not None else None - ), - observation_variable_aggregation_type=ObservationAggregationType.YEARLY, ), CoverageConfigurationCreate( name="tasmin_seasonal_absolute_model_ec_earth_racmo22e", - # display_name_english=_DISPLAY_NAME_ENGLISH, - # display_name_italian=_DISPLAY_NAME_ITALIAN, - # description_english=_DESCRIPTION_ENGLISH, - # description_italian=_DESCRIPTION_ITALIAN, netcdf_main_dataset_name="tasmin", wms_main_layer_name="tasmin", thredds_url_pattern="EC-EARTH_RACMO22Eymbc/clipped/tasmin_EC-EARTH_RACMO22E_{scenario}_{year_period}_ts19762100_ls_VFVG.nc", - # unit_english="ºC", - # palette="default/seq-YlOrRd", - # color_scale_min=-3, - # color_scale_max=32, - # data_precision=_DATA_PRECISION, climatic_indicator_id=climatic_indicators["tasmin-absolute-annual"], possible_values=[ ConfigurationParameterPossibleValueCreate( @@ -345,21 +214,6 @@ def generate_configurations( (CoreConfParamName.ARCHIVE.value, "forecast") ].id ), - # ConfigurationParameterPossibleValueCreate( - # configuration_parameter_value_id=conf_param_values[ - # (CoreConfParamName.CLIMATOLOGICAL_VARIABLE.value, "tasmin") - # ].id - # ), - # ConfigurationParameterPossibleValueCreate( - # configuration_parameter_value_id=conf_param_values[ - # (CoreConfParamName.AGGREGATION_PERIOD.value, "annual") - # ].id - # ), - # ConfigurationParameterPossibleValueCreate( - # configuration_parameter_value_id=conf_param_values[ - # (CoreConfParamName.MEASURE.value, "absolute") - # ].id - # ), ConfigurationParameterPossibleValueCreate( configuration_parameter_value_id=conf_param_values[ ( @@ -404,25 +258,12 @@ def generate_configurations( ].id ), ], - observation_variable_id=( - v.id if (v := variables.get("TNd")) is not None else None - ), - observation_variable_aggregation_type=ObservationAggregationType.SEASONAL, ), CoverageConfigurationCreate( name="tasmin_annual_absolute_model_ec_earth_racmo22e", - # display_name_english=_DISPLAY_NAME_ENGLISH, - # display_name_italian=_DISPLAY_NAME_ITALIAN, - # description_english=_DESCRIPTION_ENGLISH, - # description_italian=_DESCRIPTION_ITALIAN, netcdf_main_dataset_name="tasmin", wms_main_layer_name="tasmin", thredds_url_pattern="EC-EARTH_RACMO22Eymbc/clipped/tasmin_EC-EARTH_RACMO22E_{scenario}_ts19762100_ls_VFVG.nc", - # unit_english="ºC", - # palette="default/seq-YlOrRd", - # color_scale_min=-13, - # color_scale_max=27, - # data_precision=_DATA_PRECISION, climatic_indicator_id=climatic_indicators["tasmin-absolute-annual"], possible_values=[ ConfigurationParameterPossibleValueCreate( @@ -430,21 +271,6 @@ def generate_configurations( (CoreConfParamName.ARCHIVE.value, "forecast") ].id ), - # ConfigurationParameterPossibleValueCreate( - # configuration_parameter_value_id=conf_param_values[ - # (CoreConfParamName.CLIMATOLOGICAL_VARIABLE.value, "tasmin") - # ].id - # ), - # ConfigurationParameterPossibleValueCreate( - # configuration_parameter_value_id=conf_param_values[ - # (CoreConfParamName.AGGREGATION_PERIOD.value, "annual") - # ].id - # ), - # ConfigurationParameterPossibleValueCreate( - # configuration_parameter_value_id=conf_param_values[ - # (CoreConfParamName.MEASURE.value, "absolute") - # ].id - # ), ConfigurationParameterPossibleValueCreate( configuration_parameter_value_id=conf_param_values[ ( @@ -474,25 +300,12 @@ def generate_configurations( ].id ), ], - observation_variable_id=( - v.id if (v := variables.get("TNd")) is not None else None - ), - observation_variable_aggregation_type=ObservationAggregationType.YEARLY, ), CoverageConfigurationCreate( name="tasmin_seasonal_absolute_model_ec_earth_rca4", - # display_name_english=_DISPLAY_NAME_ENGLISH, - # display_name_italian=_DISPLAY_NAME_ITALIAN, - # description_english=_DESCRIPTION_ENGLISH, - # description_italian=_DESCRIPTION_ITALIAN, netcdf_main_dataset_name="tasmin", wms_main_layer_name="tasmin", thredds_url_pattern="EC-EARTH_RCA4ymbc/clipped/tasmin_EC-EARTH_RCA4_{scenario}_{year_period}_ts19762100_ls_VFVG.nc", - # unit_english="ºC", - # palette="default/seq-YlOrRd", - # color_scale_min=-3, - # color_scale_max=32, - # data_precision=_DATA_PRECISION, climatic_indicator_id=climatic_indicators["tasmin-absolute-annual"], possible_values=[ ConfigurationParameterPossibleValueCreate( @@ -500,21 +313,6 @@ def generate_configurations( (CoreConfParamName.ARCHIVE.value, "forecast") ].id ), - # ConfigurationParameterPossibleValueCreate( - # configuration_parameter_value_id=conf_param_values[ - # (CoreConfParamName.CLIMATOLOGICAL_VARIABLE.value, "tasmin") - # ].id - # ), - # ConfigurationParameterPossibleValueCreate( - # configuration_parameter_value_id=conf_param_values[ - # (CoreConfParamName.AGGREGATION_PERIOD.value, "annual") - # ].id - # ), - # ConfigurationParameterPossibleValueCreate( - # configuration_parameter_value_id=conf_param_values[ - # (CoreConfParamName.MEASURE.value, "absolute") - # ].id - # ), ConfigurationParameterPossibleValueCreate( configuration_parameter_value_id=conf_param_values[ (CoreConfParamName.CLIMATOLOGICAL_MODEL.value, "ec_earth_rca4") @@ -556,25 +354,12 @@ def generate_configurations( ].id ), ], - observation_variable_id=( - v.id if (v := variables.get("TNd")) is not None else None - ), - observation_variable_aggregation_type=ObservationAggregationType.SEASONAL, ), CoverageConfigurationCreate( name="tasmin_annual_absolute_model_ec_earth_rca4", - # display_name_english=_DISPLAY_NAME_ENGLISH, - # display_name_italian=_DISPLAY_NAME_ITALIAN, - # description_english=_DESCRIPTION_ENGLISH, - # description_italian=_DESCRIPTION_ITALIAN, netcdf_main_dataset_name="tasmin", wms_main_layer_name="tasmin", thredds_url_pattern="EC-EARTH_RCA4ymbc/clipped/tasmin_EC-EARTH_RCA4_{scenario}_ts19762100_ls_VFVG.nc", - # unit_english="ºC", - # palette="default/seq-YlOrRd", - # color_scale_min=-13, - # color_scale_max=27, - # data_precision=_DATA_PRECISION, climatic_indicator_id=climatic_indicators["tasmin-absolute-annual"], possible_values=[ ConfigurationParameterPossibleValueCreate( @@ -582,21 +367,6 @@ def generate_configurations( (CoreConfParamName.ARCHIVE.value, "forecast") ].id ), - # ConfigurationParameterPossibleValueCreate( - # configuration_parameter_value_id=conf_param_values[ - # (CoreConfParamName.CLIMATOLOGICAL_VARIABLE.value, "tasmin") - # ].id - # ), - # ConfigurationParameterPossibleValueCreate( - # configuration_parameter_value_id=conf_param_values[ - # (CoreConfParamName.AGGREGATION_PERIOD.value, "annual") - # ].id - # ), - # ConfigurationParameterPossibleValueCreate( - # configuration_parameter_value_id=conf_param_values[ - # (CoreConfParamName.MEASURE.value, "absolute") - # ].id - # ), ConfigurationParameterPossibleValueCreate( configuration_parameter_value_id=conf_param_values[ (CoreConfParamName.CLIMATOLOGICAL_MODEL.value, "ec_earth_rca4") @@ -623,25 +393,12 @@ def generate_configurations( ].id ), ], - observation_variable_id=( - v.id if (v := variables.get("TNd")) is not None else None - ), - observation_variable_aggregation_type=ObservationAggregationType.YEARLY, ), CoverageConfigurationCreate( name="tasmin_seasonal_absolute_model_hadgem2_es_racmo22e", - # display_name_english=_DISPLAY_NAME_ENGLISH, - # display_name_italian=_DISPLAY_NAME_ITALIAN, - # description_english=_DESCRIPTION_ENGLISH, - # description_italian=_DESCRIPTION_ITALIAN, netcdf_main_dataset_name="tasmin", wms_main_layer_name="tasmin", thredds_url_pattern="HadGEM2-ES_RACMO22Eymbc/clipped/tasmin_HadGEM2-ES_RACMO22E_{scenario}_{year_period}_ts19762100_ls_VFVG.nc", - # unit_english="ºC", - # palette="default/seq-YlOrRd", - # color_scale_min=-3, - # color_scale_max=32, - # data_precision=_DATA_PRECISION, climatic_indicator_id=climatic_indicators["tasmin-absolute-annual"], possible_values=[ ConfigurationParameterPossibleValueCreate( @@ -649,21 +406,6 @@ def generate_configurations( (CoreConfParamName.ARCHIVE.value, "forecast") ].id ), - # ConfigurationParameterPossibleValueCreate( - # configuration_parameter_value_id=conf_param_values[ - # (CoreConfParamName.CLIMATOLOGICAL_VARIABLE.value, "tasmin") - # ].id - # ), - # ConfigurationParameterPossibleValueCreate( - # configuration_parameter_value_id=conf_param_values[ - # (CoreConfParamName.AGGREGATION_PERIOD.value, "annual") - # ].id - # ), - # ConfigurationParameterPossibleValueCreate( - # configuration_parameter_value_id=conf_param_values[ - # (CoreConfParamName.MEASURE.value, "absolute") - # ].id - # ), ConfigurationParameterPossibleValueCreate( configuration_parameter_value_id=conf_param_values[ ( @@ -708,25 +450,12 @@ def generate_configurations( ].id ), ], - observation_variable_id=( - v.id if (v := variables.get("TNd")) is not None else None - ), - observation_variable_aggregation_type=ObservationAggregationType.SEASONAL, ), CoverageConfigurationCreate( name="tasmin_annual_absolute_model_hadgem2_es_racmo22e", - # display_name_english=_DISPLAY_NAME_ENGLISH, - # display_name_italian=_DISPLAY_NAME_ITALIAN, - # description_english=_DESCRIPTION_ENGLISH, - # description_italian=_DESCRIPTION_ITALIAN, netcdf_main_dataset_name="tasmin", wms_main_layer_name="tasmin", thredds_url_pattern="HadGEM2-ES_RACMO22Eymbc/clipped/tasmin_HadGEM2-ES_RACMO22E_{scenario}_ts19762100_ls_VFVG.nc", - # unit_english="ºC", - # palette="default/seq-YlOrRd", - # color_scale_min=-13, - # color_scale_max=27, - # data_precision=_DATA_PRECISION, climatic_indicator_id=climatic_indicators["tasmin-absolute-annual"], possible_values=[ ConfigurationParameterPossibleValueCreate( @@ -734,21 +463,6 @@ def generate_configurations( (CoreConfParamName.ARCHIVE.value, "forecast") ].id ), - # ConfigurationParameterPossibleValueCreate( - # configuration_parameter_value_id=conf_param_values[ - # (CoreConfParamName.CLIMATOLOGICAL_VARIABLE.value, "tasmin") - # ].id - # ), - # ConfigurationParameterPossibleValueCreate( - # configuration_parameter_value_id=conf_param_values[ - # (CoreConfParamName.AGGREGATION_PERIOD.value, "annual") - # ].id - # ), - # ConfigurationParameterPossibleValueCreate( - # configuration_parameter_value_id=conf_param_values[ - # (CoreConfParamName.MEASURE.value, "absolute") - # ].id - # ), ConfigurationParameterPossibleValueCreate( configuration_parameter_value_id=conf_param_values[ ( @@ -778,25 +492,12 @@ def generate_configurations( ].id ), ], - observation_variable_id=( - v.id if (v := variables.get("TNd")) is not None else None - ), - observation_variable_aggregation_type=ObservationAggregationType.YEARLY, ), CoverageConfigurationCreate( name="tasmin_seasonal_absolute_model_mpi_esm_lr_remo2009", - # display_name_english=_DISPLAY_NAME_ENGLISH, - # display_name_italian=_DISPLAY_NAME_ITALIAN, - # description_english=_DESCRIPTION_ENGLISH, - # description_italian=_DESCRIPTION_ITALIAN, netcdf_main_dataset_name="tasmin", wms_main_layer_name="tasmin", thredds_url_pattern="MPI-ESM-LR_REMO2009ymbc/clipped/tasmin_MPI-ESM-LR_REMO2009_{scenario}_{year_period}_ts19762100_ls_VFVG.nc", - # unit_english="ºC", - # palette="default/seq-YlOrRd", - # color_scale_min=-3, - # color_scale_max=32, - # data_precision=_DATA_PRECISION, climatic_indicator_id=climatic_indicators["tasmin-absolute-annual"], possible_values=[ ConfigurationParameterPossibleValueCreate( @@ -804,21 +505,6 @@ def generate_configurations( (CoreConfParamName.ARCHIVE.value, "forecast") ].id ), - # ConfigurationParameterPossibleValueCreate( - # configuration_parameter_value_id=conf_param_values[ - # (CoreConfParamName.CLIMATOLOGICAL_VARIABLE.value, "tasmin") - # ].id - # ), - # ConfigurationParameterPossibleValueCreate( - # configuration_parameter_value_id=conf_param_values[ - # (CoreConfParamName.AGGREGATION_PERIOD.value, "annual") - # ].id - # ), - # ConfigurationParameterPossibleValueCreate( - # configuration_parameter_value_id=conf_param_values[ - # (CoreConfParamName.MEASURE.value, "absolute") - # ].id - # ), ConfigurationParameterPossibleValueCreate( configuration_parameter_value_id=conf_param_values[ ( @@ -863,25 +549,12 @@ def generate_configurations( ].id ), ], - observation_variable_id=( - v.id if (v := variables.get("TNd")) is not None else None - ), - observation_variable_aggregation_type=ObservationAggregationType.SEASONAL, ), CoverageConfigurationCreate( name="tasmin_annual_absolute_model_mpi_esm_lr_remo2009", - # display_name_english=_DISPLAY_NAME_ENGLISH, - # display_name_italian=_DISPLAY_NAME_ITALIAN, - # description_english=_DESCRIPTION_ENGLISH, - # description_italian=_DESCRIPTION_ITALIAN, netcdf_main_dataset_name="tasmin", wms_main_layer_name="tasmin", thredds_url_pattern="MPI-ESM-LR_REMO2009ymbc/clipped/tasmin_MPI-ESM-LR_REMO2009_{scenario}_ts19762100_ls_VFVG.nc", - # unit_english="ºC", - # palette="default/seq-YlOrRd", - # color_scale_min=-13, - # color_scale_max=27, - # data_precision=_DATA_PRECISION, climatic_indicator_id=climatic_indicators["tasmin-absolute-annual"], possible_values=[ ConfigurationParameterPossibleValueCreate( @@ -889,21 +562,6 @@ def generate_configurations( (CoreConfParamName.ARCHIVE.value, "forecast") ].id ), - # ConfigurationParameterPossibleValueCreate( - # configuration_parameter_value_id=conf_param_values[ - # (CoreConfParamName.CLIMATOLOGICAL_VARIABLE.value, "tasmin") - # ].id - # ), - # ConfigurationParameterPossibleValueCreate( - # configuration_parameter_value_id=conf_param_values[ - # (CoreConfParamName.AGGREGATION_PERIOD.value, "annual") - # ].id - # ), - # ConfigurationParameterPossibleValueCreate( - # configuration_parameter_value_id=conf_param_values[ - # (CoreConfParamName.MEASURE.value, "absolute") - # ].id - # ), ConfigurationParameterPossibleValueCreate( configuration_parameter_value_id=conf_param_values[ ( @@ -933,25 +591,12 @@ def generate_configurations( ].id ), ], - observation_variable_id=( - v.id if (v := variables.get("TNd")) is not None else None - ), - observation_variable_aggregation_type=ObservationAggregationType.YEARLY, ), CoverageConfigurationCreate( name="tasmin_seasonal_absolute_model_ensemble_upper_uncertainty", - # display_name_english=_DISPLAY_NAME_ENGLISH, - # display_name_italian=_DISPLAY_NAME_ITALIAN, - # description_english=_DESCRIPTION_ENGLISH, - # description_italian=_DESCRIPTION_ITALIAN, netcdf_main_dataset_name="tasmin_stdup", wms_main_layer_name="tasmin_stdup", thredds_url_pattern="ensymbc/std/clipped/tasmin_stdup_{scenario}_{year_period}_ts19762100_ls_VFVG.nc", - # unit_english="ºC", - # palette="default/seq-YlOrRd", - # color_scale_min=-13, - # color_scale_max=27, - # data_precision=_DATA_PRECISION, climatic_indicator_id=climatic_indicators["tasmin-absolute-annual"], possible_values=[ ConfigurationParameterPossibleValueCreate( @@ -959,21 +604,6 @@ def generate_configurations( (CoreConfParamName.ARCHIVE.value, "forecast") ].id ), - # ConfigurationParameterPossibleValueCreate( - # configuration_parameter_value_id=conf_param_values[ - # (CoreConfParamName.CLIMATOLOGICAL_VARIABLE.value, "tasmin") - # ].id - # ), - # ConfigurationParameterPossibleValueCreate( - # configuration_parameter_value_id=conf_param_values[ - # (CoreConfParamName.AGGREGATION_PERIOD.value, "annual") - # ].id - # ), - # ConfigurationParameterPossibleValueCreate( - # configuration_parameter_value_id=conf_param_values[ - # (CoreConfParamName.MEASURE.value, "absolute") - # ].id - # ), ConfigurationParameterPossibleValueCreate( configuration_parameter_value_id=conf_param_values[ (CoreConfParamName.CLIMATOLOGICAL_MODEL.value, "model_ensemble") @@ -1023,18 +653,9 @@ def generate_configurations( ), CoverageConfigurationCreate( name="tasmin_seasonal_absolute_model_ensemble_lower_uncertainty", - # display_name_english=_DISPLAY_NAME_ENGLISH, - # display_name_italian=_DISPLAY_NAME_ITALIAN, - # description_english=_DESCRIPTION_ENGLISH, - # description_italian=_DESCRIPTION_ITALIAN, netcdf_main_dataset_name="tasmin_stddown", wms_main_layer_name="tasmin_stddown", thredds_url_pattern="ensymbc/std/clipped/tasmin_stddown_{scenario}_{year_period}_ts19762100_ls_VFVG.nc", - # unit_english="ºC", - # palette="default/seq-YlOrRd", - # color_scale_min=-13, - # color_scale_max=27, - # data_precision=_DATA_PRECISION, climatic_indicator_id=climatic_indicators["tasmin-absolute-annual"], possible_values=[ ConfigurationParameterPossibleValueCreate( @@ -1042,21 +663,6 @@ def generate_configurations( (CoreConfParamName.ARCHIVE.value, "forecast") ].id ), - # ConfigurationParameterPossibleValueCreate( - # configuration_parameter_value_id=conf_param_values[ - # (CoreConfParamName.CLIMATOLOGICAL_VARIABLE.value, "tasmin") - # ].id - # ), - # ConfigurationParameterPossibleValueCreate( - # configuration_parameter_value_id=conf_param_values[ - # (CoreConfParamName.AGGREGATION_PERIOD.value, "annual") - # ].id - # ), - # ConfigurationParameterPossibleValueCreate( - # configuration_parameter_value_id=conf_param_values[ - # (CoreConfParamName.MEASURE.value, "absolute") - # ].id - # ), ConfigurationParameterPossibleValueCreate( configuration_parameter_value_id=conf_param_values[ (CoreConfParamName.CLIMATOLOGICAL_MODEL.value, "model_ensemble") @@ -1106,18 +712,9 @@ def generate_configurations( ), CoverageConfigurationCreate( name="tasmin_annual_absolute_model_ensemble_upper_uncertainty", - # display_name_english=_DISPLAY_NAME_ENGLISH, - # display_name_italian=_DISPLAY_NAME_ITALIAN, - # description_english=_DESCRIPTION_ENGLISH, - # description_italian=_DESCRIPTION_ITALIAN, netcdf_main_dataset_name="tasmin_stdup", wms_main_layer_name="tasmin_stdup", thredds_url_pattern="ensymbc/std/clipped/tasmin_stdup_{scenario}_ts19762100_ls_VFVG.nc", - # unit_english="ºC", - # palette="default/seq-YlOrRd", - # color_scale_min=-13, - # color_scale_max=27, - # data_precision=_DATA_PRECISION, climatic_indicator_id=climatic_indicators["tasmin-absolute-annual"], possible_values=[ ConfigurationParameterPossibleValueCreate( @@ -1125,21 +722,6 @@ def generate_configurations( (CoreConfParamName.ARCHIVE.value, "forecast") ].id ), - # ConfigurationParameterPossibleValueCreate( - # configuration_parameter_value_id=conf_param_values[ - # (CoreConfParamName.CLIMATOLOGICAL_VARIABLE.value, "tasmin") - # ].id - # ), - # ConfigurationParameterPossibleValueCreate( - # configuration_parameter_value_id=conf_param_values[ - # (CoreConfParamName.AGGREGATION_PERIOD.value, "annual") - # ].id - # ), - # ConfigurationParameterPossibleValueCreate( - # configuration_parameter_value_id=conf_param_values[ - # (CoreConfParamName.MEASURE.value, "absolute") - # ].id - # ), ConfigurationParameterPossibleValueCreate( configuration_parameter_value_id=conf_param_values[ (CoreConfParamName.CLIMATOLOGICAL_MODEL.value, "model_ensemble") @@ -1174,18 +756,9 @@ def generate_configurations( ), CoverageConfigurationCreate( name="tasmin_annual_absolute_model_ensemble_lower_uncertainty", - # display_name_english=_DISPLAY_NAME_ENGLISH, - # display_name_italian=_DISPLAY_NAME_ITALIAN, - # description_english=_DESCRIPTION_ENGLISH, - # description_italian=_DESCRIPTION_ITALIAN, netcdf_main_dataset_name="tasmin_stddown", wms_main_layer_name="tasmin_stddown", thredds_url_pattern="ensymbc/std/clipped/tasmin_stddown_{scenario}_ts19762100_ls_VFVG.nc", - # unit_english="ºC", - # palette="default/seq-YlOrRd", - # color_scale_min=-13, - # color_scale_max=27, - # data_precision=_DATA_PRECISION, climatic_indicator_id=climatic_indicators["tasmin-absolute-annual"], possible_values=[ ConfigurationParameterPossibleValueCreate( @@ -1193,21 +766,6 @@ def generate_configurations( (CoreConfParamName.ARCHIVE.value, "forecast") ].id ), - # ConfigurationParameterPossibleValueCreate( - # configuration_parameter_value_id=conf_param_values[ - # (CoreConfParamName.CLIMATOLOGICAL_VARIABLE.value, "tasmin") - # ].id - # ), - # ConfigurationParameterPossibleValueCreate( - # configuration_parameter_value_id=conf_param_values[ - # (CoreConfParamName.AGGREGATION_PERIOD.value, "annual") - # ].id - # ), - # ConfigurationParameterPossibleValueCreate( - # configuration_parameter_value_id=conf_param_values[ - # (CoreConfParamName.MEASURE.value, "absolute") - # ].id - # ), ConfigurationParameterPossibleValueCreate( configuration_parameter_value_id=conf_param_values[ (CoreConfParamName.CLIMATOLOGICAL_MODEL.value, "model_ensemble") @@ -1242,19 +800,10 @@ def generate_configurations( ), CoverageConfigurationCreate( name="tasmin_30yr_anomaly_seasonal_agree_model_ensemble", - # display_name_english=_DISPLAY_NAME_ENGLISH, - # display_name_italian=_DISPLAY_NAME_ITALIAN, - # description_english=_DESCRIPTION_ENGLISH, - # description_italian=_DESCRIPTION_ITALIAN, netcdf_main_dataset_name="tasmin", wms_main_layer_name="tasmin-uncertainty_group", wms_secondary_layer_name="tasmin", thredds_url_pattern="ensembletwbc/std/clipped/tasmin_avgagree_anom_{time_window}_{scenario}_{year_period}_VFVGTAA.nc", - # unit_english="ºC", - # palette="uncert-stippled/seq-YlOrRd", - # color_scale_min=0, - # color_scale_max=6, - # data_precision=_DATA_PRECISION, climatic_indicator_id=climatic_indicators["tasmin-anomaly-thirty_year"], possible_values=[ ConfigurationParameterPossibleValueCreate( @@ -1262,21 +811,6 @@ def generate_configurations( (CoreConfParamName.ARCHIVE.value, "forecast") ].id ), - # ConfigurationParameterPossibleValueCreate( - # configuration_parameter_value_id=conf_param_values[ - # (CoreConfParamName.CLIMATOLOGICAL_VARIABLE.value, "tasmin") - # ].id - # ), - # ConfigurationParameterPossibleValueCreate( - # configuration_parameter_value_id=conf_param_values[ - # (CoreConfParamName.AGGREGATION_PERIOD.value, "30yr") - # ].id - # ), - # ConfigurationParameterPossibleValueCreate( - # configuration_parameter_value_id=conf_param_values[ - # (CoreConfParamName.MEASURE.value, "anomaly") - # ].id - # ), ConfigurationParameterPossibleValueCreate( configuration_parameter_value_id=conf_param_values[ (CoreConfParamName.CLIMATOLOGICAL_MODEL.value, "model_ensemble") @@ -1331,18 +865,9 @@ def generate_configurations( ), CoverageConfigurationCreate( name="tasmin_30yr_anomaly_seasonal_model_ec_earth_cclm4_8_17", - # display_name_english=_DISPLAY_NAME_ENGLISH, - # display_name_italian=_DISPLAY_NAME_ITALIAN, - # description_english=_DESCRIPTION_ENGLISH, - # description_italian=_DESCRIPTION_ITALIAN, netcdf_main_dataset_name="tasmin", wms_main_layer_name="tasmin", thredds_url_pattern="taspr5rcm/clipped/tasmin_EC-EARTH_CCLM4-8-17_{scenario}_seas_{time_window}{year_period}_VFVGTAA.nc", - # unit_english="ºC", - # palette="default/seq-YlOrRd", - # color_scale_min=0, - # color_scale_max=6, - # data_precision=_DATA_PRECISION, climatic_indicator_id=climatic_indicators["tasmin-anomaly-thirty_year"], possible_values=[ ConfigurationParameterPossibleValueCreate( @@ -1350,21 +875,6 @@ def generate_configurations( (CoreConfParamName.ARCHIVE.value, "forecast") ].id ), - # ConfigurationParameterPossibleValueCreate( - # configuration_parameter_value_id=conf_param_values[ - # (CoreConfParamName.CLIMATOLOGICAL_VARIABLE.value, "tasmin") - # ].id - # ), - # ConfigurationParameterPossibleValueCreate( - # configuration_parameter_value_id=conf_param_values[ - # (CoreConfParamName.AGGREGATION_PERIOD.value, "30yr") - # ].id - # ), - # ConfigurationParameterPossibleValueCreate( - # configuration_parameter_value_id=conf_param_values[ - # (CoreConfParamName.MEASURE.value, "anomaly") - # ].id - # ), ConfigurationParameterPossibleValueCreate( configuration_parameter_value_id=conf_param_values[ ( @@ -1422,18 +932,9 @@ def generate_configurations( ), CoverageConfigurationCreate( name="tasmin_30yr_anomaly_seasonal_model_ec_earth_racmo22e", - # display_name_english=_DISPLAY_NAME_ENGLISH, - # display_name_italian=_DISPLAY_NAME_ITALIAN, - # description_english=_DESCRIPTION_ENGLISH, - # description_italian=_DESCRIPTION_ITALIAN, netcdf_main_dataset_name="tasmin", wms_main_layer_name="tasmin", thredds_url_pattern="taspr5rcm/clipped/tasmin_EC-EARTH_RACMO22E_{scenario}_seas_{time_window}{year_period}_VFVGTAA.nc", - # unit_english="ºC", - # palette="default/seq-YlOrRd", - # color_scale_min=0, - # color_scale_max=6, - # data_precision=_DATA_PRECISION, climatic_indicator_id=climatic_indicators["tasmin-anomaly-thirty_year"], possible_values=[ ConfigurationParameterPossibleValueCreate( @@ -1441,21 +942,6 @@ def generate_configurations( (CoreConfParamName.ARCHIVE.value, "forecast") ].id ), - # ConfigurationParameterPossibleValueCreate( - # configuration_parameter_value_id=conf_param_values[ - # (CoreConfParamName.CLIMATOLOGICAL_VARIABLE.value, "tasmin") - # ].id - # ), - # ConfigurationParameterPossibleValueCreate( - # configuration_parameter_value_id=conf_param_values[ - # (CoreConfParamName.AGGREGATION_PERIOD.value, "30yr") - # ].id - # ), - # ConfigurationParameterPossibleValueCreate( - # configuration_parameter_value_id=conf_param_values[ - # (CoreConfParamName.MEASURE.value, "anomaly") - # ].id - # ), ConfigurationParameterPossibleValueCreate( configuration_parameter_value_id=conf_param_values[ ( @@ -1513,18 +999,9 @@ def generate_configurations( ), CoverageConfigurationCreate( name="tasmin_30yr_anomaly_seasonal_model_ec_earth_rca4", - # display_name_english=_DISPLAY_NAME_ENGLISH, - # display_name_italian=_DISPLAY_NAME_ITALIAN, - # description_english=_DESCRIPTION_ENGLISH, - # description_italian=_DESCRIPTION_ITALIAN, netcdf_main_dataset_name="tasmin", wms_main_layer_name="tasmin", thredds_url_pattern="taspr5rcm/clipped/tasmin_EC-EARTH_RCA4_{scenario}_seas_{time_window}{year_period}_VFVGTAA.nc", - # unit_english="ºC", - # palette="default/seq-YlOrRd", - # color_scale_min=0, - # color_scale_max=6, - # data_precision=_DATA_PRECISION, climatic_indicator_id=climatic_indicators["tasmin-anomaly-thirty_year"], possible_values=[ ConfigurationParameterPossibleValueCreate( @@ -1532,21 +1009,6 @@ def generate_configurations( (CoreConfParamName.ARCHIVE.value, "forecast") ].id ), - # ConfigurationParameterPossibleValueCreate( - # configuration_parameter_value_id=conf_param_values[ - # (CoreConfParamName.CLIMATOLOGICAL_VARIABLE.value, "tasmin") - # ].id - # ), - # ConfigurationParameterPossibleValueCreate( - # configuration_parameter_value_id=conf_param_values[ - # (CoreConfParamName.AGGREGATION_PERIOD.value, "30yr") - # ].id - # ), - # ConfigurationParameterPossibleValueCreate( - # configuration_parameter_value_id=conf_param_values[ - # (CoreConfParamName.MEASURE.value, "anomaly") - # ].id - # ), ConfigurationParameterPossibleValueCreate( configuration_parameter_value_id=conf_param_values[ (CoreConfParamName.CLIMATOLOGICAL_MODEL.value, "ec_earth_rca4") @@ -1601,18 +1063,9 @@ def generate_configurations( ), CoverageConfigurationCreate( name="tasmin_30yr_anomaly_seasonal_model_hadgem2_es_racmo22e", - # display_name_english=_DISPLAY_NAME_ENGLISH, - # display_name_italian=_DISPLAY_NAME_ITALIAN, - # description_english=_DESCRIPTION_ENGLISH, - # description_italian=_DESCRIPTION_ITALIAN, netcdf_main_dataset_name="tasmin", wms_main_layer_name="tasmin", thredds_url_pattern="taspr5rcm/clipped/tasmin_HadGEM2-ES_RACMO22E_{scenario}_seas_{time_window}{year_period}_VFVGTAA.nc", - # unit_english="ºC", - # palette="default/seq-YlOrRd", - # color_scale_min=0, - # color_scale_max=6, - # data_precision=_DATA_PRECISION, climatic_indicator_id=climatic_indicators["tasmin-anomaly-thirty_year"], possible_values=[ ConfigurationParameterPossibleValueCreate( @@ -1620,21 +1073,6 @@ def generate_configurations( (CoreConfParamName.ARCHIVE.value, "forecast") ].id ), - # ConfigurationParameterPossibleValueCreate( - # configuration_parameter_value_id=conf_param_values[ - # (CoreConfParamName.CLIMATOLOGICAL_VARIABLE.value, "tasmin") - # ].id - # ), - # ConfigurationParameterPossibleValueCreate( - # configuration_parameter_value_id=conf_param_values[ - # (CoreConfParamName.AGGREGATION_PERIOD.value, "30yr") - # ].id - # ), - # ConfigurationParameterPossibleValueCreate( - # configuration_parameter_value_id=conf_param_values[ - # (CoreConfParamName.MEASURE.value, "anomaly") - # ].id - # ), ConfigurationParameterPossibleValueCreate( configuration_parameter_value_id=conf_param_values[ ( @@ -1692,18 +1130,9 @@ def generate_configurations( ), CoverageConfigurationCreate( name="tasmin_30yr_anomaly_seasonal_model_mpi_esm_lr_remo2009", - # display_name_english=_DISPLAY_NAME_ENGLISH, - # display_name_italian=_DISPLAY_NAME_ITALIAN, - # description_english=_DESCRIPTION_ENGLISH, - # description_italian=_DESCRIPTION_ITALIAN, netcdf_main_dataset_name="tasmin", wms_main_layer_name="tasmin", thredds_url_pattern="taspr5rcm/clipped/tasmin_MPI-ESM-LR_REMO2009_{scenario}_seas_{time_window}{year_period}_VFVGTAA.nc", - # unit_english="ºC", - # palette="default/seq-YlOrRd", - # color_scale_min=0, - # color_scale_max=6, - # data_precision=_DATA_PRECISION, climatic_indicator_id=climatic_indicators["tasmin-anomaly-thirty_year"], possible_values=[ ConfigurationParameterPossibleValueCreate( @@ -1711,21 +1140,6 @@ def generate_configurations( (CoreConfParamName.ARCHIVE.value, "forecast") ].id ), - # ConfigurationParameterPossibleValueCreate( - # configuration_parameter_value_id=conf_param_values[ - # (CoreConfParamName.CLIMATOLOGICAL_VARIABLE.value, "tasmin") - # ].id - # ), - # ConfigurationParameterPossibleValueCreate( - # configuration_parameter_value_id=conf_param_values[ - # (CoreConfParamName.AGGREGATION_PERIOD.value, "30yr") - # ].id - # ), - # ConfigurationParameterPossibleValueCreate( - # configuration_parameter_value_id=conf_param_values[ - # (CoreConfParamName.MEASURE.value, "anomaly") - # ].id - # ), ConfigurationParameterPossibleValueCreate( configuration_parameter_value_id=conf_param_values[ ( diff --git a/arpav_ppcv/bootstrapper/coverage_configurations/forecast/tr.py b/arpav_ppcv/bootstrapper/coverage_configurations/forecast/tr.py index 3022eb4c..fea5eef3 100644 --- a/arpav_ppcv/bootstrapper/coverage_configurations/forecast/tr.py +++ b/arpav_ppcv/bootstrapper/coverage_configurations/forecast/tr.py @@ -1,40 +1,20 @@ -from ....schemas.base import ( - CoreConfParamName, - ObservationAggregationType, -) +from ....schemas.base import CoreConfParamName from ....schemas.coverages import ( CoverageConfigurationCreate, ConfigurationParameterPossibleValueCreate, ) -# _DISPLAY_NAME_ENGLISH = "Tropical nights" -# _DISPLAY_NAME_ITALIAN = "Notti tropicali" -# _DESCRIPTION_ENGLISH = "Number of days with minimum temperature greater than 20 °C" -# _DESCRIPTION_ITALIAN = "Numero di giorni con temperatura minima superiore a 20 °C" -# _DATA_PRECISION = 0 - def generate_configurations( conf_param_values, - variables, climatic_indicators: dict[str, int], ) -> list[CoverageConfigurationCreate]: return [ CoverageConfigurationCreate( name="tr_annual_absolute_model_ensemble", - # display_name_english=_DISPLAY_NAME_ENGLISH, - # display_name_italian=_DISPLAY_NAME_ITALIAN, - # description_english=_DESCRIPTION_ENGLISH, - # description_italian=_DESCRIPTION_ITALIAN, netcdf_main_dataset_name="tr", wms_main_layer_name="tr", thredds_url_pattern="ensymbc/clipped/ecatr_20_avg_{scenario}_ts19762100_ls_VFVG.nc", - # unit_english="days", - # unit_italian="gg", - # palette="default/seq-YlOrRd", - # color_scale_min=0, - # color_scale_max=120, - # data_precision=_DATA_PRECISION, climatic_indicator_id=climatic_indicators["tr-absolute-annual"], possible_values=[ ConfigurationParameterPossibleValueCreate( @@ -42,21 +22,6 @@ def generate_configurations( (CoreConfParamName.ARCHIVE.value, "forecast") ].id ), - # ConfigurationParameterPossibleValueCreate( - # configuration_parameter_value_id=conf_param_values[ - # (CoreConfParamName.CLIMATOLOGICAL_VARIABLE.value, "tr") - # ].id - # ), - # ConfigurationParameterPossibleValueCreate( - # configuration_parameter_value_id=conf_param_values[ - # (CoreConfParamName.AGGREGATION_PERIOD.value, "annual") - # ].id - # ), - # ConfigurationParameterPossibleValueCreate( - # configuration_parameter_value_id=conf_param_values[ - # (CoreConfParamName.MEASURE.value, "absolute") - # ].id - # ), ConfigurationParameterPossibleValueCreate( configuration_parameter_value_id=conf_param_values[ (CoreConfParamName.CLIMATOLOGICAL_MODEL.value, "model_ensemble") @@ -83,26 +48,12 @@ def generate_configurations( ].id ), ], - observation_variable_id=( - v.id if (v := variables.get("TR")) is not None else None - ), - observation_variable_aggregation_type=ObservationAggregationType.SEASONAL, ), CoverageConfigurationCreate( name="tr_annual_absolute_model_ec_earth_cclm4_8_17", - # display_name_english=_DISPLAY_NAME_ENGLISH, - # display_name_italian=_DISPLAY_NAME_ITALIAN, - # description_english=_DESCRIPTION_ENGLISH, - # description_italian=_DESCRIPTION_ITALIAN, netcdf_main_dataset_name="tr", wms_main_layer_name="tr", thredds_url_pattern="EC-EARTH_CCLM4-8-17ymbc/clipped/ecatr_20_EC-EARTH_CCLM4-8-17_{scenario}_ts19762100_ls_VFVG.nc", - # unit_english="days", - # unit_italian="gg", - # palette="default/seq-YlOrRd", - # color_scale_min=0, - # color_scale_max=120, - # data_precision=_DATA_PRECISION, climatic_indicator_id=climatic_indicators["tr-absolute-annual"], possible_values=[ ConfigurationParameterPossibleValueCreate( @@ -110,21 +61,6 @@ def generate_configurations( (CoreConfParamName.ARCHIVE.value, "forecast") ].id ), - # ConfigurationParameterPossibleValueCreate( - # configuration_parameter_value_id=conf_param_values[ - # (CoreConfParamName.CLIMATOLOGICAL_VARIABLE.value, "tr") - # ].id - # ), - # ConfigurationParameterPossibleValueCreate( - # configuration_parameter_value_id=conf_param_values[ - # (CoreConfParamName.AGGREGATION_PERIOD.value, "annual") - # ].id - # ), - # ConfigurationParameterPossibleValueCreate( - # configuration_parameter_value_id=conf_param_values[ - # (CoreConfParamName.MEASURE.value, "absolute") - # ].id - # ), ConfigurationParameterPossibleValueCreate( configuration_parameter_value_id=conf_param_values[ ( @@ -154,26 +90,12 @@ def generate_configurations( ].id ), ], - observation_variable_id=( - v.id if (v := variables.get("TR")) is not None else None - ), - observation_variable_aggregation_type=ObservationAggregationType.SEASONAL, ), CoverageConfigurationCreate( name="tr_annual_absolute_model_ec_earth_racmo22e", - # display_name_english=_DISPLAY_NAME_ENGLISH, - # display_name_italian=_DISPLAY_NAME_ITALIAN, - # description_english=_DESCRIPTION_ENGLISH, - # description_italian=_DESCRIPTION_ITALIAN, netcdf_main_dataset_name="tr", wms_main_layer_name="tr", thredds_url_pattern="EC-EARTH_RACMO22Eymbc/clipped/ecatr_20_EC-EARTH_RACMO22E_{scenario}_ts19762100_ls_VFVG.nc", - # unit_english="days", - # unit_italian="gg", - # palette="default/seq-YlOrRd", - # color_scale_min=0, - # color_scale_max=120, - # data_precision=_DATA_PRECISION, climatic_indicator_id=climatic_indicators["tr-absolute-annual"], possible_values=[ ConfigurationParameterPossibleValueCreate( @@ -181,21 +103,6 @@ def generate_configurations( (CoreConfParamName.ARCHIVE.value, "forecast") ].id ), - # ConfigurationParameterPossibleValueCreate( - # configuration_parameter_value_id=conf_param_values[ - # (CoreConfParamName.CLIMATOLOGICAL_VARIABLE.value, "tr") - # ].id - # ), - # ConfigurationParameterPossibleValueCreate( - # configuration_parameter_value_id=conf_param_values[ - # (CoreConfParamName.AGGREGATION_PERIOD.value, "annual") - # ].id - # ), - # ConfigurationParameterPossibleValueCreate( - # configuration_parameter_value_id=conf_param_values[ - # (CoreConfParamName.MEASURE.value, "absolute") - # ].id - # ), ConfigurationParameterPossibleValueCreate( configuration_parameter_value_id=conf_param_values[ ( @@ -225,26 +132,12 @@ def generate_configurations( ].id ), ], - observation_variable_id=( - v.id if (v := variables.get("TR")) is not None else None - ), - observation_variable_aggregation_type=ObservationAggregationType.SEASONAL, ), CoverageConfigurationCreate( name="tr_annual_absolute_model_ec_earth_rca4", - # display_name_english=_DISPLAY_NAME_ENGLISH, - # display_name_italian=_DISPLAY_NAME_ITALIAN, - # description_english=_DESCRIPTION_ENGLISH, - # description_italian=_DESCRIPTION_ITALIAN, netcdf_main_dataset_name="tr", wms_main_layer_name="tr", thredds_url_pattern="EC-EARTH_RCA4ymbc/clipped/ecatr_20_EC-EARTH_RCA4_{scenario}_ts19762100_ls_VFVG.nc", - # unit_english="days", - # unit_italian="gg", - # palette="default/seq-YlOrRd", - # color_scale_min=0, - # color_scale_max=120, - # data_precision=_DATA_PRECISION, climatic_indicator_id=climatic_indicators["tr-absolute-annual"], possible_values=[ ConfigurationParameterPossibleValueCreate( @@ -252,21 +145,6 @@ def generate_configurations( (CoreConfParamName.ARCHIVE.value, "forecast") ].id ), - # ConfigurationParameterPossibleValueCreate( - # configuration_parameter_value_id=conf_param_values[ - # (CoreConfParamName.CLIMATOLOGICAL_VARIABLE.value, "tr") - # ].id - # ), - # ConfigurationParameterPossibleValueCreate( - # configuration_parameter_value_id=conf_param_values[ - # (CoreConfParamName.AGGREGATION_PERIOD.value, "annual") - # ].id - # ), - # ConfigurationParameterPossibleValueCreate( - # configuration_parameter_value_id=conf_param_values[ - # (CoreConfParamName.MEASURE.value, "absolute") - # ].id - # ), ConfigurationParameterPossibleValueCreate( configuration_parameter_value_id=conf_param_values[ (CoreConfParamName.CLIMATOLOGICAL_MODEL.value, "ec_earth_rca4") @@ -293,26 +171,12 @@ def generate_configurations( ].id ), ], - observation_variable_id=( - v.id if (v := variables.get("TR")) is not None else None - ), - observation_variable_aggregation_type=ObservationAggregationType.SEASONAL, ), CoverageConfigurationCreate( name="tr_annual_absolute_model_hadgem2_es_racmo22e", - # display_name_english=_DISPLAY_NAME_ENGLISH, - # display_name_italian=_DISPLAY_NAME_ITALIAN, - # description_english=_DESCRIPTION_ENGLISH, - # description_italian=_DESCRIPTION_ITALIAN, netcdf_main_dataset_name="tr", wms_main_layer_name="tr", thredds_url_pattern="HadGEM2-ES_RACMO22Eymbc/clipped/ecatr_20_HadGEM2-ES_RACMO22E_{scenario}_ts19762100_ls_VFVG.nc", - # unit_english="days", - # unit_italian="gg", - # palette="default/seq-YlOrRd", - # color_scale_min=0, - # color_scale_max=120, - # data_precision=_DATA_PRECISION, climatic_indicator_id=climatic_indicators["tr-absolute-annual"], possible_values=[ ConfigurationParameterPossibleValueCreate( @@ -320,21 +184,6 @@ def generate_configurations( (CoreConfParamName.ARCHIVE.value, "forecast") ].id ), - # ConfigurationParameterPossibleValueCreate( - # configuration_parameter_value_id=conf_param_values[ - # (CoreConfParamName.CLIMATOLOGICAL_VARIABLE.value, "tr") - # ].id - # ), - # ConfigurationParameterPossibleValueCreate( - # configuration_parameter_value_id=conf_param_values[ - # (CoreConfParamName.AGGREGATION_PERIOD.value, "annual") - # ].id - # ), - # ConfigurationParameterPossibleValueCreate( - # configuration_parameter_value_id=conf_param_values[ - # (CoreConfParamName.MEASURE.value, "absolute") - # ].id - # ), ConfigurationParameterPossibleValueCreate( configuration_parameter_value_id=conf_param_values[ ( @@ -364,26 +213,12 @@ def generate_configurations( ].id ), ], - observation_variable_id=( - v.id if (v := variables.get("TR")) is not None else None - ), - observation_variable_aggregation_type=ObservationAggregationType.SEASONAL, ), CoverageConfigurationCreate( name="tr_annual_absolute_model_mpi_esm_lr_remo2009", - # display_name_english=_DISPLAY_NAME_ENGLISH, - # display_name_italian=_DISPLAY_NAME_ITALIAN, - # description_english=_DESCRIPTION_ENGLISH, - # description_italian=_DESCRIPTION_ITALIAN, netcdf_main_dataset_name="tr", wms_main_layer_name="tr", thredds_url_pattern="MPI-ESM-LR_REMO2009ymbc/clipped/ecatr_20_MPI-ESM-LR_REMO2009_{scenario}_ts19762100_ls_VFVG.nc", - # unit_english="days", - # unit_italian="gg", - # palette="default/seq-YlOrRd", - # color_scale_min=0, - # color_scale_max=120, - # data_precision=_DATA_PRECISION, climatic_indicator_id=climatic_indicators["tr-absolute-annual"], possible_values=[ ConfigurationParameterPossibleValueCreate( @@ -391,21 +226,6 @@ def generate_configurations( (CoreConfParamName.ARCHIVE.value, "forecast") ].id ), - # ConfigurationParameterPossibleValueCreate( - # configuration_parameter_value_id=conf_param_values[ - # (CoreConfParamName.CLIMATOLOGICAL_VARIABLE.value, "tr") - # ].id - # ), - # ConfigurationParameterPossibleValueCreate( - # configuration_parameter_value_id=conf_param_values[ - # (CoreConfParamName.AGGREGATION_PERIOD.value, "annual") - # ].id - # ), - # ConfigurationParameterPossibleValueCreate( - # configuration_parameter_value_id=conf_param_values[ - # (CoreConfParamName.MEASURE.value, "absolute") - # ].id - # ), ConfigurationParameterPossibleValueCreate( configuration_parameter_value_id=conf_param_values[ ( @@ -435,26 +255,12 @@ def generate_configurations( ].id ), ], - observation_variable_id=( - v.id if (v := variables.get("TR")) is not None else None - ), - observation_variable_aggregation_type=ObservationAggregationType.SEASONAL, ), CoverageConfigurationCreate( name="tr_annual_absolute_model_ensemble_upper_uncertainty", - # display_name_english=_DISPLAY_NAME_ENGLISH, - # display_name_italian=_DISPLAY_NAME_ITALIAN, - # description_english=_DESCRIPTION_ENGLISH, - # description_italian=_DESCRIPTION_ITALIAN, netcdf_main_dataset_name="tr_stdup", wms_main_layer_name="tr_stdup", thredds_url_pattern="ensymbc/std/clipped/ecatr_20_stdup_{scenario}_ts19762100_ls_VFVG.nc", - # unit_english="days", - # unit_italian="gg", - # palette="default/seq-YlOrRd", - # color_scale_min=0, - # color_scale_max=100, - # data_precision=_DATA_PRECISION, climatic_indicator_id=climatic_indicators["tr-absolute-annual"], possible_values=[ ConfigurationParameterPossibleValueCreate( @@ -462,21 +268,6 @@ def generate_configurations( (CoreConfParamName.ARCHIVE.value, "forecast") ].id ), - # ConfigurationParameterPossibleValueCreate( - # configuration_parameter_value_id=conf_param_values[ - # (CoreConfParamName.CLIMATOLOGICAL_VARIABLE.value, "tr") - # ].id - # ), - # ConfigurationParameterPossibleValueCreate( - # configuration_parameter_value_id=conf_param_values[ - # (CoreConfParamName.AGGREGATION_PERIOD.value, "annual") - # ].id - # ), - # ConfigurationParameterPossibleValueCreate( - # configuration_parameter_value_id=conf_param_values[ - # (CoreConfParamName.MEASURE.value, "absolute") - # ].id - # ), ConfigurationParameterPossibleValueCreate( configuration_parameter_value_id=conf_param_values[ (CoreConfParamName.CLIMATOLOGICAL_MODEL.value, "model_ensemble") @@ -511,19 +302,9 @@ def generate_configurations( ), CoverageConfigurationCreate( name="tr_annual_absolute_model_ensemble_lower_uncertainty", - # display_name_english=_DISPLAY_NAME_ENGLISH, - # display_name_italian=_DISPLAY_NAME_ITALIAN, - # description_english=_DESCRIPTION_ENGLISH, - # description_italian=_DESCRIPTION_ITALIAN, netcdf_main_dataset_name="tr_stddown", wms_main_layer_name="tr_stddown", thredds_url_pattern="ensymbc/std/clipped/ecatr_20_stddown_{scenario}_ts19762100_ls_VFVG.nc", - # unit_english="days", - # unit_italian="gg", - # palette="default/seq-YlOrRd", - # color_scale_min=0, - # color_scale_max=100, - # data_precision=_DATA_PRECISION, climatic_indicator_id=climatic_indicators["tr-absolute-annual"], possible_values=[ ConfigurationParameterPossibleValueCreate( @@ -531,21 +312,6 @@ def generate_configurations( (CoreConfParamName.ARCHIVE.value, "forecast") ].id ), - # ConfigurationParameterPossibleValueCreate( - # configuration_parameter_value_id=conf_param_values[ - # (CoreConfParamName.CLIMATOLOGICAL_VARIABLE.value, "tr") - # ].id - # ), - # ConfigurationParameterPossibleValueCreate( - # configuration_parameter_value_id=conf_param_values[ - # (CoreConfParamName.AGGREGATION_PERIOD.value, "annual") - # ].id - # ), - # ConfigurationParameterPossibleValueCreate( - # configuration_parameter_value_id=conf_param_values[ - # (CoreConfParamName.MEASURE.value, "absolute") - # ].id - # ), ConfigurationParameterPossibleValueCreate( configuration_parameter_value_id=conf_param_values[ (CoreConfParamName.CLIMATOLOGICAL_MODEL.value, "model_ensemble") @@ -580,20 +346,10 @@ def generate_configurations( ), CoverageConfigurationCreate( name="tr_30yr_anomaly_annual_agree_model_ensemble", - # display_name_english=_DISPLAY_NAME_ENGLISH, - # display_name_italian=_DISPLAY_NAME_ITALIAN, - # description_english=_DESCRIPTION_ENGLISH, - # description_italian=_DESCRIPTION_ITALIAN, netcdf_main_dataset_name="tr", wms_main_layer_name="tr-uncertainty_group", wms_secondary_layer_name="tr", thredds_url_pattern="ensembletwbc/std/clipped/ecatran_20_avgagree_{time_window}_{scenario}_ls_VFVG.nc", - # unit_english="days", - # unit_italian="gg", - # palette="uncert-stippled/seq-YlOrRd", - # color_scale_min=-5, - # color_scale_max=75, - # data_precision=_DATA_PRECISION, climatic_indicator_id=climatic_indicators["tr-anomaly-thirty_year"], possible_values=[ ConfigurationParameterPossibleValueCreate( @@ -601,21 +357,6 @@ def generate_configurations( (CoreConfParamName.ARCHIVE.value, "forecast") ].id ), - # ConfigurationParameterPossibleValueCreate( - # configuration_parameter_value_id=conf_param_values[ - # (CoreConfParamName.CLIMATOLOGICAL_VARIABLE.value, "tr") - # ].id - # ), - # ConfigurationParameterPossibleValueCreate( - # configuration_parameter_value_id=conf_param_values[ - # (CoreConfParamName.AGGREGATION_PERIOD.value, "30yr") - # ].id - # ), - # ConfigurationParameterPossibleValueCreate( - # configuration_parameter_value_id=conf_param_values[ - # (CoreConfParamName.MEASURE.value, "anomaly") - # ].id - # ), ConfigurationParameterPossibleValueCreate( configuration_parameter_value_id=conf_param_values[ (CoreConfParamName.CLIMATOLOGICAL_MODEL.value, "model_ensemble") @@ -655,19 +396,9 @@ def generate_configurations( ), CoverageConfigurationCreate( name="tr_30yr_anomaly_annual_model_ec_earth_cclm4_8_17", - # display_name_english=_DISPLAY_NAME_ENGLISH, - # display_name_italian=_DISPLAY_NAME_ITALIAN, - # description_english=_DESCRIPTION_ENGLISH, - # description_italian=_DESCRIPTION_ITALIAN, netcdf_main_dataset_name="tr", wms_main_layer_name="tr", thredds_url_pattern="indici5rcm/clipped/ecatran_20_EC-EARTH_CCLM4-8-17_{scenario}_{time_window}_ls_VFVG.nc", - # unit_english="days", - # unit_italian="gg", - # palette="default/seq-YlOrRd", - # color_scale_min=-5, - # color_scale_max=75, - # data_precision=_DATA_PRECISION, climatic_indicator_id=climatic_indicators["tr-anomaly-thirty_year"], possible_values=[ ConfigurationParameterPossibleValueCreate( @@ -675,21 +406,6 @@ def generate_configurations( (CoreConfParamName.ARCHIVE.value, "forecast") ].id ), - # ConfigurationParameterPossibleValueCreate( - # configuration_parameter_value_id=conf_param_values[ - # (CoreConfParamName.CLIMATOLOGICAL_VARIABLE.value, "tr") - # ].id - # ), - # ConfigurationParameterPossibleValueCreate( - # configuration_parameter_value_id=conf_param_values[ - # (CoreConfParamName.AGGREGATION_PERIOD.value, "30yr") - # ].id - # ), - # ConfigurationParameterPossibleValueCreate( - # configuration_parameter_value_id=conf_param_values[ - # (CoreConfParamName.MEASURE.value, "anomaly") - # ].id - # ), ConfigurationParameterPossibleValueCreate( configuration_parameter_value_id=conf_param_values[ ( @@ -732,19 +448,9 @@ def generate_configurations( ), CoverageConfigurationCreate( name="tr_30yr_anomaly_annual_model_ec_earth_racmo22e", - # display_name_english=_DISPLAY_NAME_ENGLISH, - # display_name_italian=_DISPLAY_NAME_ITALIAN, - # description_english=_DESCRIPTION_ENGLISH, - # description_italian=_DESCRIPTION_ITALIAN, netcdf_main_dataset_name="tr", wms_main_layer_name="tr", thredds_url_pattern="indici5rcm/clipped/ecatran_20_EC-EARTH_RACMO22E_{scenario}_{time_window}_ls_VFVG.nc", - # unit_english="days", - # unit_italian="gg", - # palette="default/seq-YlOrRd", - # color_scale_min=-5, - # color_scale_max=75, - # data_precision=_DATA_PRECISION, climatic_indicator_id=climatic_indicators["tr-anomaly-thirty_year"], possible_values=[ ConfigurationParameterPossibleValueCreate( @@ -752,21 +458,6 @@ def generate_configurations( (CoreConfParamName.ARCHIVE.value, "forecast") ].id ), - # ConfigurationParameterPossibleValueCreate( - # configuration_parameter_value_id=conf_param_values[ - # (CoreConfParamName.CLIMATOLOGICAL_VARIABLE.value, "tr") - # ].id - # ), - # ConfigurationParameterPossibleValueCreate( - # configuration_parameter_value_id=conf_param_values[ - # (CoreConfParamName.AGGREGATION_PERIOD.value, "30yr") - # ].id - # ), - # ConfigurationParameterPossibleValueCreate( - # configuration_parameter_value_id=conf_param_values[ - # (CoreConfParamName.MEASURE.value, "anomaly") - # ].id - # ), ConfigurationParameterPossibleValueCreate( configuration_parameter_value_id=conf_param_values[ ( @@ -809,19 +500,9 @@ def generate_configurations( ), CoverageConfigurationCreate( name="tr_30yr_anomaly_annual_model_ec_earth_rca4", - # display_name_english=_DISPLAY_NAME_ENGLISH, - # display_name_italian=_DISPLAY_NAME_ITALIAN, - # description_english=_DESCRIPTION_ENGLISH, - # description_italian=_DESCRIPTION_ITALIAN, netcdf_main_dataset_name="tr", wms_main_layer_name="tr", thredds_url_pattern="indici5rcm/clipped/ecatran_20_EC-EARTH_RCA4_{scenario}_{time_window}_ls_VFVG.nc", - # unit_english="days", - # unit_italian="gg", - # palette="default/seq-YlOrRd", - # color_scale_min=-5, - # color_scale_max=75, - # data_precision=_DATA_PRECISION, climatic_indicator_id=climatic_indicators["tr-anomaly-thirty_year"], possible_values=[ ConfigurationParameterPossibleValueCreate( @@ -829,21 +510,6 @@ def generate_configurations( (CoreConfParamName.ARCHIVE.value, "forecast") ].id ), - # ConfigurationParameterPossibleValueCreate( - # configuration_parameter_value_id=conf_param_values[ - # (CoreConfParamName.CLIMATOLOGICAL_VARIABLE.value, "tr") - # ].id - # ), - # ConfigurationParameterPossibleValueCreate( - # configuration_parameter_value_id=conf_param_values[ - # (CoreConfParamName.AGGREGATION_PERIOD.value, "30yr") - # ].id - # ), - # ConfigurationParameterPossibleValueCreate( - # configuration_parameter_value_id=conf_param_values[ - # (CoreConfParamName.MEASURE.value, "anomaly") - # ].id - # ), ConfigurationParameterPossibleValueCreate( configuration_parameter_value_id=conf_param_values[ (CoreConfParamName.CLIMATOLOGICAL_MODEL.value, "ec_earth_rca4") @@ -883,19 +549,9 @@ def generate_configurations( ), CoverageConfigurationCreate( name="tr_30yr_anomaly_annual_model_hadgem2_es_racmo22e", - # display_name_english=_DISPLAY_NAME_ENGLISH, - # display_name_italian=_DISPLAY_NAME_ITALIAN, - # description_english=_DESCRIPTION_ENGLISH, - # description_italian=_DESCRIPTION_ITALIAN, netcdf_main_dataset_name="tr", wms_main_layer_name="tr", thredds_url_pattern="indici5rcm/clipped/ecatran_20_HadGEM2-ES_RACMO22E_{scenario}_{time_window}_ls_VFVG.nc", - # unit_english="days", - # unit_italian="gg", - # palette="default/seq-YlOrRd", - # color_scale_min=-5, - # color_scale_max=75, - # data_precision=_DATA_PRECISION, climatic_indicator_id=climatic_indicators["tr-anomaly-thirty_year"], possible_values=[ ConfigurationParameterPossibleValueCreate( @@ -903,21 +559,6 @@ def generate_configurations( (CoreConfParamName.ARCHIVE.value, "forecast") ].id ), - # ConfigurationParameterPossibleValueCreate( - # configuration_parameter_value_id=conf_param_values[ - # (CoreConfParamName.CLIMATOLOGICAL_VARIABLE.value, "tr") - # ].id - # ), - # ConfigurationParameterPossibleValueCreate( - # configuration_parameter_value_id=conf_param_values[ - # (CoreConfParamName.AGGREGATION_PERIOD.value, "30yr") - # ].id - # ), - # ConfigurationParameterPossibleValueCreate( - # configuration_parameter_value_id=conf_param_values[ - # (CoreConfParamName.MEASURE.value, "anomaly") - # ].id - # ), ConfigurationParameterPossibleValueCreate( configuration_parameter_value_id=conf_param_values[ ( @@ -960,19 +601,9 @@ def generate_configurations( ), CoverageConfigurationCreate( name="tr_30yr_anomaly_annual_model_mpi_esm_lr_remo2009", - # display_name_english=_DISPLAY_NAME_ENGLISH, - # display_name_italian=_DISPLAY_NAME_ITALIAN, - # description_english=_DESCRIPTION_ENGLISH, - # description_italian=_DESCRIPTION_ITALIAN, netcdf_main_dataset_name="tr", wms_main_layer_name="tr", thredds_url_pattern="indici5rcm/clipped/ecatran_20_MPI-ESM-LR_REMO2009_{scenario}_{time_window}_ls_VFVG.nc", - # unit_english="days", - # unit_italian="gg", - # palette="default/seq-YlOrRd", - # color_scale_min=-5, - # color_scale_max=75, - # data_precision=_DATA_PRECISION, climatic_indicator_id=climatic_indicators["tr-anomaly-thirty_year"], possible_values=[ ConfigurationParameterPossibleValueCreate( @@ -980,21 +611,6 @@ def generate_configurations( (CoreConfParamName.ARCHIVE.value, "forecast") ].id ), - # ConfigurationParameterPossibleValueCreate( - # configuration_parameter_value_id=conf_param_values[ - # (CoreConfParamName.CLIMATOLOGICAL_VARIABLE.value, "tr") - # ].id - # ), - # ConfigurationParameterPossibleValueCreate( - # configuration_parameter_value_id=conf_param_values[ - # (CoreConfParamName.AGGREGATION_PERIOD.value, "30yr") - # ].id - # ), - # ConfigurationParameterPossibleValueCreate( - # configuration_parameter_value_id=conf_param_values[ - # (CoreConfParamName.MEASURE.value, "anomaly") - # ].id - # ), ConfigurationParameterPossibleValueCreate( configuration_parameter_value_id=conf_param_values[ ( diff --git a/arpav_ppcv/bootstrapper/coverage_configurations/historical/cdds.py b/arpav_ppcv/bootstrapper/coverage_configurations/historical/cdds.py index d34e71b3..640450e7 100644 --- a/arpav_ppcv/bootstrapper/coverage_configurations/historical/cdds.py +++ b/arpav_ppcv/bootstrapper/coverage_configurations/historical/cdds.py @@ -4,44 +4,19 @@ ConfigurationParameterPossibleValueCreate, ) -# _DISPLAY_NAME_ENGLISH = "Cooling degree days" -# _DISPLAY_NAME_ITALIAN = "Gradi giorno di raffrescamento" -# _DESCRIPTION_ENGLISH = ( -# "Sum of the average daily temperature minus 21°C if the average " -# "daily temperature is greater than 24°C." -# ) -# _DESCRIPTION_ITALIAN = ( -# "Somma della temperatura media giornaliera meno 21°C se la " -# "temperatura media giornaliera è maggiore di 24°C." -# ) -# # _VARIABLE = "cdds" -# _UNIT = "ºC" -# _COLOR_SCALE_MIN = 0 -# _COLOR_SCALE_MAX = 320 -# _DATA_PRECISION = 0 _ARCHIVE = "historical" def generate_configurations( conf_param_values, - variables, climatic_indicators: dict[str, int], ) -> list[CoverageConfigurationCreate]: cov_confs = [ CoverageConfigurationCreate( name="cdds_30yr", - # display_name_english=_DISPLAY_NAME_ENGLISH, - # display_name_italian=_DISPLAY_NAME_ITALIAN, - # description_english=_DESCRIPTION_ENGLISH, - # description_italian=_DESCRIPTION_ITALIAN, netcdf_main_dataset_name="{historical_year_period}_avg", wms_main_layer_name="{historical_year_period}_avg", thredds_url_pattern="cline_30yr/CDD_jrc_{climatological_standard_normal}.nc", - # unit_english=_UNIT, - # palette="default/seq-YlOrRd", - # color_scale_min=_COLOR_SCALE_MIN, - # color_scale_max=_COLOR_SCALE_MAX, - # data_precision=_DATA_PRECISION, climatic_indicator_id=climatic_indicators["cdds-absolute-thirty_year"], possible_values=[ ConfigurationParameterPossibleValueCreate( @@ -49,21 +24,6 @@ def generate_configurations( (CoreConfParamName.ARCHIVE.value, _ARCHIVE) ].id ), - # ConfigurationParameterPossibleValueCreate( - # configuration_parameter_value_id=conf_param_values[ - # (CoreConfParamName.HISTORICAL_VARIABLE.value, _VARIABLE) - # ].id - # ), - # ConfigurationParameterPossibleValueCreate( - # configuration_parameter_value_id=conf_param_values[ - # (CoreConfParamName.AGGREGATION_PERIOD.value, "30yr") - # ].id - # ), - # ConfigurationParameterPossibleValueCreate( - # configuration_parameter_value_id=conf_param_values[ - # (CoreConfParamName.MEASURE.value, "absolute") - # ].id - # ), ConfigurationParameterPossibleValueCreate( configuration_parameter_value_id=conf_param_values[ ("climatological_standard_normal", "1991_2020") @@ -78,18 +38,9 @@ def generate_configurations( ), CoverageConfigurationCreate( name="cdds_annual_yearly", - # display_name_english=_DISPLAY_NAME_ENGLISH, - # display_name_italian=_DISPLAY_NAME_ITALIAN, - # description_english=_DESCRIPTION_ENGLISH, - # description_italian=_DESCRIPTION_ITALIAN, netcdf_main_dataset_name="CDD_jrc", wms_main_layer_name="CDD_jrc", thredds_url_pattern="cline_yr/CDD_jrc_{historical_year_period}_*.nc", - # unit_english=_UNIT, - # palette="default/seq-YlOrRd", - # color_scale_min=_COLOR_SCALE_MIN, - # color_scale_max=_COLOR_SCALE_MAX, - # data_precision=_DATA_PRECISION, climatic_indicator_id=climatic_indicators["cdds-absolute-annual"], possible_values=[ ConfigurationParameterPossibleValueCreate( @@ -97,21 +48,6 @@ def generate_configurations( (CoreConfParamName.ARCHIVE.value, _ARCHIVE) ].id ), - # ConfigurationParameterPossibleValueCreate( - # configuration_parameter_value_id=conf_param_values[ - # (CoreConfParamName.HISTORICAL_VARIABLE.value, _VARIABLE) - # ].id - # ), - # ConfigurationParameterPossibleValueCreate( - # configuration_parameter_value_id=conf_param_values[ - # (CoreConfParamName.AGGREGATION_PERIOD.value, "annual") - # ].id - # ), - # ConfigurationParameterPossibleValueCreate( - # configuration_parameter_value_id=conf_param_values[ - # (CoreConfParamName.MEASURE.value, "absolute") - # ].id - # ), ConfigurationParameterPossibleValueCreate( configuration_parameter_value_id=conf_param_values[ (CoreConfParamName.HISTORICAL_YEAR_PERIOD.value, "all_year") diff --git a/arpav_ppcv/bootstrapper/coverage_configurations/historical/fd.py b/arpav_ppcv/bootstrapper/coverage_configurations/historical/fd.py index 1f834ba2..7e9f76b2 100644 --- a/arpav_ppcv/bootstrapper/coverage_configurations/historical/fd.py +++ b/arpav_ppcv/bootstrapper/coverage_configurations/historical/fd.py @@ -1,47 +1,23 @@ -from ....schemas.base import ( - CoreConfParamName, - ObservationAggregationType, -) +from ....schemas.base import CoreConfParamName from ....schemas.coverages import ( CoverageConfigurationCreate, ConfigurationParameterPossibleValueCreate, ) -# _DISPLAY_NAME_ENGLISH = "Frosty days" -# _DISPLAY_NAME_ITALIAN = "Giorni di gelo" -# _DESCRIPTION_ENGLISH = "Number of days with minimum temperature below 0°C" -# _DESCRIPTION_ITALIAN = "Numero di giorni con temperatura minima minore di 0°C" -# # _VARIABLE = "fd" -# _UNIT_ENGLISH = "days" -# _UNIT_ITALIAN = "gg" -# _COLOR_SCALE_MIN = 0 -# _COLOR_SCALE_MAX = 260 -# _DATA_PRECISION = 0 _RELATED_OBSERVATION_VARIABLE_NAME = "FD" _ARCHIVE = "historical" def generate_configurations( conf_param_values, - variables, climatic_indicators: dict[str, int], ) -> list[CoverageConfigurationCreate]: return [ CoverageConfigurationCreate( name="fd_30yr", - # display_name_english=_DISPLAY_NAME_ENGLISH, - # display_name_italian=_DISPLAY_NAME_ITALIAN, - # description_english=_DESCRIPTION_ENGLISH, - # description_italian=_DESCRIPTION_ITALIAN, netcdf_main_dataset_name="{historical_year_period}_avg", wms_main_layer_name="{historical_year_period}_avg", thredds_url_pattern="cline_30yr/FD_{climatological_standard_normal}.nc", - # unit_english=_UNIT_ENGLISH, - # unit_italian=_UNIT_ITALIAN, - # palette="default/seq-YlOrRd", - # color_scale_min=_COLOR_SCALE_MIN, - # color_scale_max=_COLOR_SCALE_MAX, - # data_precision=_DATA_PRECISION, climatic_indicator_id=climatic_indicators["fd-absolute-thirty_year"], possible_values=[ ConfigurationParameterPossibleValueCreate( @@ -49,21 +25,6 @@ def generate_configurations( (CoreConfParamName.ARCHIVE.value, _ARCHIVE) ].id ), - # ConfigurationParameterPossibleValueCreate( - # configuration_parameter_value_id=conf_param_values[ - # (CoreConfParamName.HISTORICAL_VARIABLE.value, _VARIABLE) - # ].id - # ), - # ConfigurationParameterPossibleValueCreate( - # configuration_parameter_value_id=conf_param_values[ - # (CoreConfParamName.AGGREGATION_PERIOD.value, "30yr") - # ].id - # ), - # ConfigurationParameterPossibleValueCreate( - # configuration_parameter_value_id=conf_param_values[ - # (CoreConfParamName.MEASURE.value, "absolute") - # ].id - # ), ConfigurationParameterPossibleValueCreate( configuration_parameter_value_id=conf_param_values[ ("climatological_standard_normal", "1991_2020") @@ -78,19 +39,9 @@ def generate_configurations( ), CoverageConfigurationCreate( name="fd_annual_yearly", - # display_name_english=_DISPLAY_NAME_ENGLISH, - # display_name_italian=_DISPLAY_NAME_ITALIAN, - # description_english=_DESCRIPTION_ENGLISH, - # description_italian=_DESCRIPTION_ITALIAN, netcdf_main_dataset_name="FD", wms_main_layer_name="FD", thredds_url_pattern="cline_yr/FD_{historical_year_period}_*.nc", - # unit_english=_UNIT_ENGLISH, - # unit_italian=_UNIT_ITALIAN, - # palette="default/seq-YlOrRd", - # color_scale_min=_COLOR_SCALE_MIN, - # color_scale_max=_COLOR_SCALE_MAX, - # data_precision=_DATA_PRECISION, climatic_indicator_id=climatic_indicators["fd-absolute-annual"], possible_values=[ ConfigurationParameterPossibleValueCreate( @@ -98,32 +49,11 @@ def generate_configurations( (CoreConfParamName.ARCHIVE.value, _ARCHIVE) ].id ), - # ConfigurationParameterPossibleValueCreate( - # configuration_parameter_value_id=conf_param_values[ - # (CoreConfParamName.HISTORICAL_VARIABLE.value, _VARIABLE) - # ].id - # ), - # ConfigurationParameterPossibleValueCreate( - # configuration_parameter_value_id=conf_param_values[ - # (CoreConfParamName.AGGREGATION_PERIOD.value, "annual") - # ].id - # ), - # ConfigurationParameterPossibleValueCreate( - # configuration_parameter_value_id=conf_param_values[ - # (CoreConfParamName.MEASURE.value, "absolute") - # ].id - # ), ConfigurationParameterPossibleValueCreate( configuration_parameter_value_id=conf_param_values[ (CoreConfParamName.HISTORICAL_YEAR_PERIOD.value, "all_year") ].id ), ], - observation_variable_id=( - v.id - if (v := variables.get(_RELATED_OBSERVATION_VARIABLE_NAME)) is not None - else None - ), - observation_variable_aggregation_type=ObservationAggregationType.YEARLY, ), ] diff --git a/arpav_ppcv/bootstrapper/coverage_configurations/historical/hdds.py b/arpav_ppcv/bootstrapper/coverage_configurations/historical/hdds.py index af807746..71074566 100644 --- a/arpav_ppcv/bootstrapper/coverage_configurations/historical/hdds.py +++ b/arpav_ppcv/bootstrapper/coverage_configurations/historical/hdds.py @@ -4,44 +4,19 @@ ConfigurationParameterPossibleValueCreate, ) -# _DISPLAY_NAME_ENGLISH = "Heating degree days" -# _DISPLAY_NAME_ITALIAN = "Gradi giorno di riscaldamento" -# _DESCRIPTION_ENGLISH = ( -# "Sum of 20°C minus the average daily temperature if the " -# "average daily temperature is less than 20°C." -# ) -# _DESCRIPTION_ITALIAN = ( -# "Somma di 20°C meno la temperatura media giornaliera se la " -# "temperatura media giornaliera è minore di 20°C." -# ) -# # _VARIABLE = "hdds" -# _UNIT = "ºC" -# _COLOR_SCALE_MIN = 2130 -# _COLOR_SCALE_MAX = 7800 -# _DATA_PRECISION = 0 _ARCHIVE = "historical" def generate_configurations( conf_param_values, - variables, climatic_indicators: dict[str, int], ) -> list[CoverageConfigurationCreate]: cov_confs = [ CoverageConfigurationCreate( name="hdds_30yr", - # display_name_english=_DISPLAY_NAME_ENGLISH, - # display_name_italian=_DISPLAY_NAME_ITALIAN, - # description_english=_DESCRIPTION_ENGLISH, - # description_italian=_DESCRIPTION_ITALIAN, netcdf_main_dataset_name="{historical_year_period}_avg", wms_main_layer_name="{historical_year_period}_avg", thredds_url_pattern="cline_30yr/HDD_it_{climatological_standard_normal}.nc", - # unit_english=_UNIT, - # palette="default/seq-YlOrRd", - # color_scale_min=_COLOR_SCALE_MIN, - # color_scale_max=_COLOR_SCALE_MAX, - # data_precision=_DATA_PRECISION, climatic_indicator_id=climatic_indicators["hdds-absolute-thirty_year"], possible_values=[ ConfigurationParameterPossibleValueCreate( @@ -49,21 +24,6 @@ def generate_configurations( (CoreConfParamName.ARCHIVE.value, _ARCHIVE) ].id ), - # ConfigurationParameterPossibleValueCreate( - # configuration_parameter_value_id=conf_param_values[ - # (CoreConfParamName.HISTORICAL_VARIABLE.value, _VARIABLE) - # ].id - # ), - # ConfigurationParameterPossibleValueCreate( - # configuration_parameter_value_id=conf_param_values[ - # (CoreConfParamName.AGGREGATION_PERIOD.value, "30yr") - # ].id - # ), - # ConfigurationParameterPossibleValueCreate( - # configuration_parameter_value_id=conf_param_values[ - # (CoreConfParamName.MEASURE.value, "absolute") - # ].id - # ), ConfigurationParameterPossibleValueCreate( configuration_parameter_value_id=conf_param_values[ ("climatological_standard_normal", "1991_2020") @@ -78,18 +38,9 @@ def generate_configurations( ), CoverageConfigurationCreate( name="hdds_annual_yearly", - # display_name_english=_DISPLAY_NAME_ENGLISH, - # display_name_italian=_DISPLAY_NAME_ITALIAN, - # description_english=_DESCRIPTION_ENGLISH, - # description_italian=_DESCRIPTION_ITALIAN, netcdf_main_dataset_name="HDD_it", wms_main_layer_name="HDD_it", thredds_url_pattern="cline_yr/HDD_it_{historical_year_period}_*.nc", - # unit_english=_UNIT, - # palette="default/seq-YlOrRd", - # color_scale_min=_COLOR_SCALE_MIN, - # color_scale_max=_COLOR_SCALE_MAX, - # data_precision=_DATA_PRECISION, climatic_indicator_id=climatic_indicators["hdds-absolute-annual"], possible_values=[ ConfigurationParameterPossibleValueCreate( @@ -97,21 +48,6 @@ def generate_configurations( (CoreConfParamName.ARCHIVE.value, _ARCHIVE) ].id ), - # ConfigurationParameterPossibleValueCreate( - # configuration_parameter_value_id=conf_param_values[ - # (CoreConfParamName.HISTORICAL_VARIABLE.value, _VARIABLE) - # ].id - # ), - # ConfigurationParameterPossibleValueCreate( - # configuration_parameter_value_id=conf_param_values[ - # (CoreConfParamName.AGGREGATION_PERIOD.value, "annual") - # ].id - # ), - # ConfigurationParameterPossibleValueCreate( - # configuration_parameter_value_id=conf_param_values[ - # (CoreConfParamName.MEASURE.value, "absolute") - # ].id - # ), ConfigurationParameterPossibleValueCreate( configuration_parameter_value_id=conf_param_values[ (CoreConfParamName.HISTORICAL_YEAR_PERIOD.value, "all_year") diff --git a/arpav_ppcv/bootstrapper/coverage_configurations/historical/prcptot.py b/arpav_ppcv/bootstrapper/coverage_configurations/historical/prcptot.py index 7bdff1cd..12634a93 100644 --- a/arpav_ppcv/bootstrapper/coverage_configurations/historical/prcptot.py +++ b/arpav_ppcv/bootstrapper/coverage_configurations/historical/prcptot.py @@ -1,45 +1,23 @@ -from ....schemas.base import ( - CoreConfParamName, - ObservationAggregationType, -) +from ....schemas.base import CoreConfParamName from ....schemas.coverages import ( CoverageConfigurationCreate, ConfigurationParameterPossibleValueCreate, ) -# _DISPLAY_NAME_ENGLISH = "Precipitation" -# _DISPLAY_NAME_ITALIAN = "Precipitazione" -# _DESCRIPTION_ENGLISH = "Daily precipitation near the ground" -# _DESCRIPTION_ITALIAN = "Precipitazione giornaliera vicino al suolo" -# # _VARIABLE = "prcptot" -# _UNIT = "mm" -# _COLOR_SCALE_MIN = 300 -# _COLOR_SCALE_MAX = 1300 -# _DATA_PRECISION = 0 _RELATED_OBSERVATION_VARIABLE_NAME = "PRCPTOT" _ARCHIVE = "historical" def generate_configurations( conf_param_values, - variables, climatic_indicators: dict[str, int], ) -> list[CoverageConfigurationCreate]: return [ CoverageConfigurationCreate( name="prcptot_30yr", - # display_name_english=_DISPLAY_NAME_ENGLISH, - # display_name_italian=_DISPLAY_NAME_ITALIAN, - # description_english=_DESCRIPTION_ENGLISH, - # description_italian=_DESCRIPTION_ITALIAN, netcdf_main_dataset_name="{historical_year_period}_avg", wms_main_layer_name="{historical_year_period}_avg", thredds_url_pattern="cline_30yr/PRCPTOT_{climatological_standard_normal}.nc", - # unit_english=_UNIT, - # palette="default/seq-YlOrRd", - # color_scale_min=_COLOR_SCALE_MIN, - # color_scale_max=_COLOR_SCALE_MAX, - # data_precision=_DATA_PRECISION, climatic_indicator_id=climatic_indicators["pr-absolute-thirty_year"], possible_values=[ ConfigurationParameterPossibleValueCreate( @@ -47,21 +25,6 @@ def generate_configurations( (CoreConfParamName.ARCHIVE.value, _ARCHIVE) ].id ), - # ConfigurationParameterPossibleValueCreate( - # configuration_parameter_value_id=conf_param_values[ - # (CoreConfParamName.HISTORICAL_VARIABLE.value, _VARIABLE) - # ].id - # ), - # ConfigurationParameterPossibleValueCreate( - # configuration_parameter_value_id=conf_param_values[ - # (CoreConfParamName.AGGREGATION_PERIOD.value, "30yr") - # ].id - # ), - # ConfigurationParameterPossibleValueCreate( - # configuration_parameter_value_id=conf_param_values[ - # (CoreConfParamName.MEASURE.value, "absolute") - # ].id - # ), ConfigurationParameterPossibleValueCreate( configuration_parameter_value_id=conf_param_values[ ("climatological_standard_normal", "1991_2020") @@ -156,18 +119,9 @@ def generate_configurations( ), CoverageConfigurationCreate( name="prcptot_annual_yearly", - # display_name_english=_DISPLAY_NAME_ENGLISH, - # display_name_italian=_DISPLAY_NAME_ITALIAN, - # description_english=_DESCRIPTION_ENGLISH, - # description_italian=_DESCRIPTION_ITALIAN, netcdf_main_dataset_name="PRCPTOT", wms_main_layer_name="PRCPTOT", thredds_url_pattern="cline_yr/PRCPTOT_{historical_year_period}_*.nc", - # unit_english=_UNIT, - # palette="default/seq-YlOrRd", - # color_scale_min=_COLOR_SCALE_MIN, - # color_scale_max=_COLOR_SCALE_MAX, - # data_precision=_DATA_PRECISION, climatic_indicator_id=climatic_indicators["pr-absolute-annual"], possible_values=[ ConfigurationParameterPossibleValueCreate( @@ -175,48 +129,18 @@ def generate_configurations( (CoreConfParamName.ARCHIVE.value, _ARCHIVE) ].id ), - # ConfigurationParameterPossibleValueCreate( - # configuration_parameter_value_id=conf_param_values[ - # (CoreConfParamName.HISTORICAL_VARIABLE.value, _VARIABLE) - # ].id - # ), - # ConfigurationParameterPossibleValueCreate( - # configuration_parameter_value_id=conf_param_values[ - # (CoreConfParamName.AGGREGATION_PERIOD.value, "annual") - # ].id - # ), - # ConfigurationParameterPossibleValueCreate( - # configuration_parameter_value_id=conf_param_values[ - # (CoreConfParamName.MEASURE.value, "absolute") - # ].id - # ), ConfigurationParameterPossibleValueCreate( configuration_parameter_value_id=conf_param_values[ (CoreConfParamName.HISTORICAL_YEAR_PERIOD.value, "all_year") ].id ), ], - observation_variable_id=( - v.id - if (v := variables.get(_RELATED_OBSERVATION_VARIABLE_NAME)) is not None - else None - ), - observation_variable_aggregation_type=ObservationAggregationType.YEARLY, ), CoverageConfigurationCreate( name="prcptot_annual_seasonal", - # display_name_english=_DISPLAY_NAME_ENGLISH, - # display_name_italian=_DISPLAY_NAME_ITALIAN, - # description_english=_DESCRIPTION_ENGLISH, - # description_italian=_DESCRIPTION_ITALIAN, netcdf_main_dataset_name="PRCPTOT", wms_main_layer_name="PRCPTOT", thredds_url_pattern="cline_yr/PRCPTOT_{historical_year_period}_*.nc", - # unit_english=_UNIT, - # palette="default/seq-YlOrRd", - # color_scale_min=_COLOR_SCALE_MIN, - # color_scale_max=_COLOR_SCALE_MAX, - # data_precision=_DATA_PRECISION, climatic_indicator_id=climatic_indicators["pr-absolute-annual"], possible_values=[ ConfigurationParameterPossibleValueCreate( @@ -224,21 +148,6 @@ def generate_configurations( (CoreConfParamName.ARCHIVE.value, _ARCHIVE) ].id ), - # ConfigurationParameterPossibleValueCreate( - # configuration_parameter_value_id=conf_param_values[ - # (CoreConfParamName.HISTORICAL_VARIABLE.value, _VARIABLE) - # ].id - # ), - # ConfigurationParameterPossibleValueCreate( - # configuration_parameter_value_id=conf_param_values[ - # (CoreConfParamName.AGGREGATION_PERIOD.value, "annual") - # ].id - # ), - # ConfigurationParameterPossibleValueCreate( - # configuration_parameter_value_id=conf_param_values[ - # (CoreConfParamName.MEASURE.value, "absolute") - # ].id - # ), ConfigurationParameterPossibleValueCreate( configuration_parameter_value_id=conf_param_values[ (CoreConfParamName.HISTORICAL_YEAR_PERIOD.value, "winter") @@ -260,27 +169,12 @@ def generate_configurations( ].id ), ], - observation_variable_id=( - v.id - if (v := variables.get(_RELATED_OBSERVATION_VARIABLE_NAME)) is not None - else None - ), - observation_variable_aggregation_type=ObservationAggregationType.SEASONAL, ), CoverageConfigurationCreate( name="prcptot_annual_monthly", - # display_name_english=_DISPLAY_NAME_ENGLISH, - # display_name_italian=_DISPLAY_NAME_ITALIAN, - # description_english=_DESCRIPTION_ENGLISH, - # description_italian=_DESCRIPTION_ITALIAN, netcdf_main_dataset_name="PRCPTOT", wms_main_layer_name="PRCPTOT", thredds_url_pattern="cline_yr/PRCPTOT_{historical_year_period}_*.nc", - # unit_english=_UNIT, - # palette="default/seq-YlOrRd", - # color_scale_min=_COLOR_SCALE_MIN, - # color_scale_max=_COLOR_SCALE_MAX, - # data_precision=_DATA_PRECISION, climatic_indicator_id=climatic_indicators["pr-absolute-annual"], possible_values=[ ConfigurationParameterPossibleValueCreate( @@ -288,21 +182,6 @@ def generate_configurations( (CoreConfParamName.ARCHIVE.value, _ARCHIVE) ].id ), - # ConfigurationParameterPossibleValueCreate( - # configuration_parameter_value_id=conf_param_values[ - # (CoreConfParamName.HISTORICAL_VARIABLE.value, _VARIABLE) - # ].id - # ), - # ConfigurationParameterPossibleValueCreate( - # configuration_parameter_value_id=conf_param_values[ - # (CoreConfParamName.AGGREGATION_PERIOD.value, "annual") - # ].id - # ), - # ConfigurationParameterPossibleValueCreate( - # configuration_parameter_value_id=conf_param_values[ - # (CoreConfParamName.MEASURE.value, "absolute") - # ].id - # ), ConfigurationParameterPossibleValueCreate( configuration_parameter_value_id=conf_param_values[ (CoreConfParamName.HISTORICAL_YEAR_PERIOD.value, "january") @@ -364,11 +243,5 @@ def generate_configurations( ].id ), ], - observation_variable_id=( - v.id - if (v := variables.get(_RELATED_OBSERVATION_VARIABLE_NAME)) is not None - else None - ), - observation_variable_aggregation_type=ObservationAggregationType.MONTHLY, ), ] diff --git a/arpav_ppcv/bootstrapper/coverage_configurations/historical/su30.py b/arpav_ppcv/bootstrapper/coverage_configurations/historical/su30.py index 055880d8..d83276cf 100644 --- a/arpav_ppcv/bootstrapper/coverage_configurations/historical/su30.py +++ b/arpav_ppcv/bootstrapper/coverage_configurations/historical/su30.py @@ -1,47 +1,23 @@ -from ....schemas.base import ( - CoreConfParamName, - ObservationAggregationType, -) +from ....schemas.base import CoreConfParamName from ....schemas.coverages import ( CoverageConfigurationCreate, ConfigurationParameterPossibleValueCreate, ) -# _DISPLAY_NAME_ENGLISH = "Hot days" -# _DISPLAY_NAME_ITALIAN = "Giorni caldi" -# _DESCRIPTION_ENGLISH = "Number of days with maximum temperature above 30°C" -# _DESCRIPTION_ITALIAN = "Numero di giorni con temperatura massima maggiore di 30°C" -# # _VARIABLE = "su30" -# _UNIT_ENGLISH = "days" -# _UNIT_ITALIAN = "gg" -# _COLOR_SCALE_MIN = 0 -# _COLOR_SCALE_MAX = 80 -# _DATA_PRECISION = 0 _RELATED_OBSERVATION_VARIABLE_NAME = "SU30" _ARCHIVE = "historical" def generate_configurations( conf_param_values, - variables, climatic_indicators: dict[str, int], ) -> list[CoverageConfigurationCreate]: return [ CoverageConfigurationCreate( name="su30_30yr", - # display_name_english=_DISPLAY_NAME_ENGLISH, - # display_name_italian=_DISPLAY_NAME_ITALIAN, - # description_english=_DESCRIPTION_ENGLISH, - # description_italian=_DESCRIPTION_ITALIAN, netcdf_main_dataset_name="{historical_year_period}_avg", wms_main_layer_name="{historical_year_period}_avg", thredds_url_pattern="cline_30yr/SU30_{climatological_standard_normal}.nc", - # unit_english=_UNIT_ENGLISH, - # unit_italian=_UNIT_ITALIAN, - # palette="default/seq-YlOrRd", - # color_scale_min=_COLOR_SCALE_MIN, - # color_scale_max=_COLOR_SCALE_MAX, - # data_precision=_DATA_PRECISION, climatic_indicator_id=climatic_indicators["su30-absolute-thirty_year"], possible_values=[ ConfigurationParameterPossibleValueCreate( @@ -49,21 +25,6 @@ def generate_configurations( (CoreConfParamName.ARCHIVE.value, _ARCHIVE) ].id ), - # ConfigurationParameterPossibleValueCreate( - # configuration_parameter_value_id=conf_param_values[ - # (CoreConfParamName.HISTORICAL_VARIABLE.value, _VARIABLE) - # ].id - # ), - # ConfigurationParameterPossibleValueCreate( - # configuration_parameter_value_id=conf_param_values[ - # (CoreConfParamName.AGGREGATION_PERIOD.value, "30yr") - # ].id - # ), - # ConfigurationParameterPossibleValueCreate( - # configuration_parameter_value_id=conf_param_values[ - # (CoreConfParamName.MEASURE.value, "absolute") - # ].id - # ), ConfigurationParameterPossibleValueCreate( configuration_parameter_value_id=conf_param_values[ ("climatological_standard_normal", "1991_2020") @@ -78,19 +39,9 @@ def generate_configurations( ), CoverageConfigurationCreate( name="su30_annual_yearly", - # display_name_english=_DISPLAY_NAME_ENGLISH, - # display_name_italian=_DISPLAY_NAME_ITALIAN, - # description_english=_DESCRIPTION_ENGLISH, - # description_italian=_DESCRIPTION_ITALIAN, netcdf_main_dataset_name="SU30", wms_main_layer_name="SU30", thredds_url_pattern="cline_yr/SU30_{historical_year_period}_*.nc", - # unit_english=_UNIT_ENGLISH, - # unit_italian=_UNIT_ITALIAN, - # palette="default/seq-YlOrRd", - # color_scale_min=_COLOR_SCALE_MIN, - # color_scale_max=_COLOR_SCALE_MAX, - # data_precision=_DATA_PRECISION, climatic_indicator_id=climatic_indicators["su30-absolute-annual"], possible_values=[ ConfigurationParameterPossibleValueCreate( @@ -98,32 +49,11 @@ def generate_configurations( (CoreConfParamName.ARCHIVE.value, _ARCHIVE) ].id ), - # ConfigurationParameterPossibleValueCreate( - # configuration_parameter_value_id=conf_param_values[ - # (CoreConfParamName.HISTORICAL_VARIABLE.value, _VARIABLE) - # ].id - # ), - # ConfigurationParameterPossibleValueCreate( - # configuration_parameter_value_id=conf_param_values[ - # (CoreConfParamName.AGGREGATION_PERIOD.value, "annual") - # ].id - # ), - # ConfigurationParameterPossibleValueCreate( - # configuration_parameter_value_id=conf_param_values[ - # (CoreConfParamName.MEASURE.value, "absolute") - # ].id - # ), ConfigurationParameterPossibleValueCreate( configuration_parameter_value_id=conf_param_values[ (CoreConfParamName.HISTORICAL_YEAR_PERIOD.value, "all_year") ].id ), ], - observation_variable_id=( - v.id - if (v := variables.get(_RELATED_OBSERVATION_VARIABLE_NAME)) is not None - else None - ), - observation_variable_aggregation_type=ObservationAggregationType.YEARLY, ), ] diff --git a/arpav_ppcv/bootstrapper/coverage_configurations/historical/tdd.py b/arpav_ppcv/bootstrapper/coverage_configurations/historical/tdd.py index fa6de938..bdbbad13 100644 --- a/arpav_ppcv/bootstrapper/coverage_configurations/historical/tdd.py +++ b/arpav_ppcv/bootstrapper/coverage_configurations/historical/tdd.py @@ -1,45 +1,23 @@ -from ....schemas.base import ( - CoreConfParamName, - ObservationAggregationType, -) +from ....schemas.base import CoreConfParamName from ....schemas.coverages import ( CoverageConfigurationCreate, ConfigurationParameterPossibleValueCreate, ) -# _DISPLAY_NAME_ENGLISH = "Average temperature" -# _DISPLAY_NAME_ITALIAN = "Temperatura media" -# _DESCRIPTION_ENGLISH = "Average of average temperatures" -# _DESCRIPTION_ITALIAN = "Media delle temperature medie" -# # _VARIABLE = "tdd" -# _UNIT = "ºC" -# _COLOR_SCALE_MIN = -5 -# _COLOR_SCALE_MAX = 20 -# _DATA_PRECISION = 1 _RELATED_OBSERVATION_VARIABLE_NAME = "TDd" _ARCHIVE = "historical" def generate_configurations( conf_param_values, - variables, climatic_indicators: dict[str, int], ) -> list[CoverageConfigurationCreate]: return [ CoverageConfigurationCreate( name="tdd_30yr", - # display_name_english=_DISPLAY_NAME_ENGLISH, - # display_name_italian=_DISPLAY_NAME_ITALIAN, - # description_english=_DESCRIPTION_ENGLISH, - # description_italian=_DESCRIPTION_ITALIAN, netcdf_main_dataset_name="{historical_year_period}_avg", wms_main_layer_name="{historical_year_period}_avg", thredds_url_pattern="cline_30yr/TDd_{climatological_standard_normal}.nc", - # unit_english=_UNIT, - # palette="default/seq-YlOrRd", - # color_scale_min=_COLOR_SCALE_MIN, - # color_scale_max=_COLOR_SCALE_MAX, - # data_precision=_DATA_PRECISION, climatic_indicator_id=climatic_indicators["tas-absolute-thirty_year"], possible_values=[ ConfigurationParameterPossibleValueCreate( @@ -47,21 +25,6 @@ def generate_configurations( (CoreConfParamName.ARCHIVE.value, _ARCHIVE) ].id ), - # ConfigurationParameterPossibleValueCreate( - # configuration_parameter_value_id=conf_param_values[ - # (CoreConfParamName.HISTORICAL_VARIABLE.value, _VARIABLE) - # ].id - # ), - # ConfigurationParameterPossibleValueCreate( - # configuration_parameter_value_id=conf_param_values[ - # (CoreConfParamName.AGGREGATION_PERIOD.value, "30yr") - # ].id - # ), - # ConfigurationParameterPossibleValueCreate( - # configuration_parameter_value_id=conf_param_values[ - # (CoreConfParamName.MEASURE.value, "absolute") - # ].id - # ), ConfigurationParameterPossibleValueCreate( configuration_parameter_value_id=conf_param_values[ ("climatological_standard_normal", "1991_2020") @@ -156,18 +119,9 @@ def generate_configurations( ), CoverageConfigurationCreate( name="tdd_annual_yearly", - # display_name_english=_DISPLAY_NAME_ENGLISH, - # display_name_italian=_DISPLAY_NAME_ITALIAN, - # description_english=_DESCRIPTION_ENGLISH, - # description_italian=_DESCRIPTION_ITALIAN, netcdf_main_dataset_name="TDd", wms_main_layer_name="TDd", thredds_url_pattern="cline_yr/TDd_{historical_year_period}_*.nc", - # unit_english=_UNIT, - # palette="default/seq-YlOrRd", - # color_scale_min=_COLOR_SCALE_MIN, - # color_scale_max=_COLOR_SCALE_MAX, - # data_precision=_DATA_PRECISION, climatic_indicator_id=climatic_indicators["tas-absolute-annual"], possible_values=[ ConfigurationParameterPossibleValueCreate( @@ -175,48 +129,18 @@ def generate_configurations( (CoreConfParamName.ARCHIVE.value, _ARCHIVE) ].id ), - # ConfigurationParameterPossibleValueCreate( - # configuration_parameter_value_id=conf_param_values[ - # (CoreConfParamName.HISTORICAL_VARIABLE.value, _VARIABLE) - # ].id - # ), - # ConfigurationParameterPossibleValueCreate( - # configuration_parameter_value_id=conf_param_values[ - # (CoreConfParamName.AGGREGATION_PERIOD.value, "annual") - # ].id - # ), - # ConfigurationParameterPossibleValueCreate( - # configuration_parameter_value_id=conf_param_values[ - # (CoreConfParamName.MEASURE.value, "absolute") - # ].id - # ), ConfigurationParameterPossibleValueCreate( configuration_parameter_value_id=conf_param_values[ (CoreConfParamName.HISTORICAL_YEAR_PERIOD.value, "all_year") ].id ), ], - observation_variable_id=( - v.id - if (v := variables.get(_RELATED_OBSERVATION_VARIABLE_NAME)) is not None - else None - ), - observation_variable_aggregation_type=ObservationAggregationType.YEARLY, ), CoverageConfigurationCreate( name="tdd_annual_seasonal", - # display_name_english=_DISPLAY_NAME_ENGLISH, - # display_name_italian=_DISPLAY_NAME_ITALIAN, - # description_english=_DESCRIPTION_ENGLISH, - # description_italian=_DESCRIPTION_ITALIAN, netcdf_main_dataset_name="TDd", wms_main_layer_name="TDd", thredds_url_pattern="cline_yr/TDd_{historical_year_period}_*.nc", - # unit_english=_UNIT, - # palette="default/seq-YlOrRd", - # color_scale_min=_COLOR_SCALE_MIN, - # color_scale_max=_COLOR_SCALE_MAX, - # data_precision=_DATA_PRECISION, climatic_indicator_id=climatic_indicators["tas-absolute-annual"], possible_values=[ ConfigurationParameterPossibleValueCreate( @@ -224,21 +148,6 @@ def generate_configurations( (CoreConfParamName.ARCHIVE.value, _ARCHIVE) ].id ), - # ConfigurationParameterPossibleValueCreate( - # configuration_parameter_value_id=conf_param_values[ - # (CoreConfParamName.HISTORICAL_VARIABLE.value, _VARIABLE) - # ].id - # ), - # ConfigurationParameterPossibleValueCreate( - # configuration_parameter_value_id=conf_param_values[ - # (CoreConfParamName.AGGREGATION_PERIOD.value, "annual") - # ].id - # ), - # ConfigurationParameterPossibleValueCreate( - # configuration_parameter_value_id=conf_param_values[ - # (CoreConfParamName.MEASURE.value, "absolute") - # ].id - # ), ConfigurationParameterPossibleValueCreate( configuration_parameter_value_id=conf_param_values[ (CoreConfParamName.HISTORICAL_YEAR_PERIOD.value, "winter") @@ -260,27 +169,12 @@ def generate_configurations( ].id ), ], - observation_variable_id=( - v.id - if (v := variables.get(_RELATED_OBSERVATION_VARIABLE_NAME)) is not None - else None - ), - observation_variable_aggregation_type=ObservationAggregationType.SEASONAL, ), CoverageConfigurationCreate( name="tdd_annual_monthly", - # display_name_english=_DISPLAY_NAME_ENGLISH, - # display_name_italian=_DISPLAY_NAME_ITALIAN, - # description_english=_DESCRIPTION_ENGLISH, - # description_italian=_DESCRIPTION_ITALIAN, netcdf_main_dataset_name="TDd", wms_main_layer_name="TDd", thredds_url_pattern="cline_yr/TDd_{historical_year_period}_*.nc", - # unit_english=_UNIT, - # palette="default/seq-YlOrRd", - # color_scale_min=_COLOR_SCALE_MIN, - # color_scale_max=_COLOR_SCALE_MAX, - # data_precision=_DATA_PRECISION, climatic_indicator_id=climatic_indicators["tas-absolute-annual"], possible_values=[ ConfigurationParameterPossibleValueCreate( @@ -288,21 +182,6 @@ def generate_configurations( (CoreConfParamName.ARCHIVE.value, _ARCHIVE) ].id ), - # ConfigurationParameterPossibleValueCreate( - # configuration_parameter_value_id=conf_param_values[ - # (CoreConfParamName.HISTORICAL_VARIABLE.value, _VARIABLE) - # ].id - # ), - # ConfigurationParameterPossibleValueCreate( - # configuration_parameter_value_id=conf_param_values[ - # (CoreConfParamName.AGGREGATION_PERIOD.value, "annual") - # ].id - # ), - # ConfigurationParameterPossibleValueCreate( - # configuration_parameter_value_id=conf_param_values[ - # (CoreConfParamName.MEASURE.value, "absolute") - # ].id - # ), ConfigurationParameterPossibleValueCreate( configuration_parameter_value_id=conf_param_values[ (CoreConfParamName.HISTORICAL_YEAR_PERIOD.value, "january") @@ -364,27 +243,12 @@ def generate_configurations( ].id ), ], - observation_variable_id=( - v.id - if (v := variables.get(_RELATED_OBSERVATION_VARIABLE_NAME)) is not None - else None - ), - observation_variable_aggregation_type=ObservationAggregationType.MONTHLY, ), CoverageConfigurationCreate( name="tdd_barometro_climatico", - # display_name_english=_DISPLAY_NAME_ENGLISH, - # display_name_italian=_DISPLAY_NAME_ITALIAN, - # description_english=_DESCRIPTION_ENGLISH, - # description_italian=_DESCRIPTION_ITALIAN, netcdf_main_dataset_name="TDd", wms_main_layer_name="TDd", thredds_url_pattern="cline_yr/fldmean/TDd_A00_*.nc", - # unit_english=_UNIT, - # palette="default/seq-YlOrRd", - # color_scale_min=_COLOR_SCALE_MIN, - # color_scale_max=_COLOR_SCALE_MAX, - # data_precision=_DATA_PRECISION, climatic_indicator_id=climatic_indicators["tas-absolute-annual"], possible_values=[ ConfigurationParameterPossibleValueCreate( @@ -392,17 +256,6 @@ def generate_configurations( (CoreConfParamName.ARCHIVE.value, "barometro_climatico") ].id ), - # ConfigurationParameterPossibleValueCreate( - # configuration_parameter_value_id=conf_param_values[ - # (CoreConfParamName.HISTORICAL_VARIABLE.value, _VARIABLE) - # ].id - # ), ], - observation_variable_id=( - v.id - if (v := variables.get(_RELATED_OBSERVATION_VARIABLE_NAME)) is not None - else None - ), - observation_variable_aggregation_type=ObservationAggregationType.MONTHLY, ), ] diff --git a/arpav_ppcv/bootstrapper/coverage_configurations/historical/tnd.py b/arpav_ppcv/bootstrapper/coverage_configurations/historical/tnd.py index 0f4e4686..bd5b4eb5 100644 --- a/arpav_ppcv/bootstrapper/coverage_configurations/historical/tnd.py +++ b/arpav_ppcv/bootstrapper/coverage_configurations/historical/tnd.py @@ -1,45 +1,23 @@ -from ....schemas.base import ( - CoreConfParamName, - ObservationAggregationType, -) +from ....schemas.base import CoreConfParamName from ....schemas.coverages import ( CoverageConfigurationCreate, ConfigurationParameterPossibleValueCreate, ) -# _DISPLAY_NAME_ENGLISH = "Minimum temperature" -# _DISPLAY_NAME_ITALIAN = "Temperatura minima" -# _DESCRIPTION_ENGLISH = "Average of minimum temperatures" -# _DESCRIPTION_ITALIAN = "Media delle temperature minime" -# # _VARIABLE = "tnd" -# _UNIT = "ºC" -# _COLOR_SCALE_MIN = -5 -# _COLOR_SCALE_MAX = 20 -# _DATA_PRECISION = 1 _RELATED_OBSERVATION_VARIABLE_NAME = "TNd" _ARCHIVE = "historical" def generate_configurations( conf_param_values, - variables, climatic_indicators: dict[str, int], ) -> list[CoverageConfigurationCreate]: return [ CoverageConfigurationCreate( name="tnd_30yr", - # display_name_english=_DISPLAY_NAME_ENGLISH, - # display_name_italian=_DISPLAY_NAME_ITALIAN, - # description_english=_DESCRIPTION_ENGLISH, - # description_italian=_DESCRIPTION_ITALIAN, netcdf_main_dataset_name="{historical_year_period}_avg", wms_main_layer_name="{historical_year_period}_avg", thredds_url_pattern="cline_30yr/TNd_{climatological_standard_normal}.nc", - # unit_english=_UNIT, - # palette="default/seq-YlOrRd", - # color_scale_min=_COLOR_SCALE_MIN, - # color_scale_max=_COLOR_SCALE_MAX, - # data_precision=_DATA_PRECISION, climatic_indicator_id=climatic_indicators["tasmin-absolute-thirty_year"], possible_values=[ ConfigurationParameterPossibleValueCreate( @@ -47,21 +25,6 @@ def generate_configurations( (CoreConfParamName.ARCHIVE.value, _ARCHIVE) ].id ), - # ConfigurationParameterPossibleValueCreate( - # configuration_parameter_value_id=conf_param_values[ - # (CoreConfParamName.HISTORICAL_VARIABLE.value, _VARIABLE) - # ].id - # ), - # ConfigurationParameterPossibleValueCreate( - # configuration_parameter_value_id=conf_param_values[ - # (CoreConfParamName.AGGREGATION_PERIOD.value, "30yr") - # ].id - # ), - # ConfigurationParameterPossibleValueCreate( - # configuration_parameter_value_id=conf_param_values[ - # (CoreConfParamName.MEASURE.value, "absolute") - # ].id - # ), ConfigurationParameterPossibleValueCreate( configuration_parameter_value_id=conf_param_values[ ("climatological_standard_normal", "1991_2020") @@ -156,18 +119,9 @@ def generate_configurations( ), CoverageConfigurationCreate( name="tnd_annual_yearly", - # display_name_english=_DISPLAY_NAME_ENGLISH, - # display_name_italian=_DISPLAY_NAME_ITALIAN, - # description_english=_DESCRIPTION_ENGLISH, - # description_italian=_DESCRIPTION_ITALIAN, netcdf_main_dataset_name="TNd", wms_main_layer_name="TNd", thredds_url_pattern="cline_yr/TNd_{historical_year_period}_*.nc", - # unit_english=_UNIT, - # palette="default/seq-YlOrRd", - # color_scale_min=_COLOR_SCALE_MIN, - # color_scale_max=_COLOR_SCALE_MAX, - # data_precision=_DATA_PRECISION, climatic_indicator_id=climatic_indicators["tasmin-absolute-annual"], possible_values=[ ConfigurationParameterPossibleValueCreate( @@ -175,48 +129,18 @@ def generate_configurations( (CoreConfParamName.ARCHIVE.value, _ARCHIVE) ].id ), - # ConfigurationParameterPossibleValueCreate( - # configuration_parameter_value_id=conf_param_values[ - # (CoreConfParamName.HISTORICAL_VARIABLE.value, _VARIABLE) - # ].id - # ), - # ConfigurationParameterPossibleValueCreate( - # configuration_parameter_value_id=conf_param_values[ - # (CoreConfParamName.AGGREGATION_PERIOD.value, "annual") - # ].id - # ), - # ConfigurationParameterPossibleValueCreate( - # configuration_parameter_value_id=conf_param_values[ - # (CoreConfParamName.MEASURE.value, "absolute") - # ].id - # ), ConfigurationParameterPossibleValueCreate( configuration_parameter_value_id=conf_param_values[ (CoreConfParamName.HISTORICAL_YEAR_PERIOD.value, "all_year") ].id ), ], - observation_variable_id=( - v.id - if (v := variables.get(_RELATED_OBSERVATION_VARIABLE_NAME)) is not None - else None - ), - observation_variable_aggregation_type=ObservationAggregationType.YEARLY, ), CoverageConfigurationCreate( name="tnd_annual_seasonal", - # display_name_english=_DISPLAY_NAME_ENGLISH, - # display_name_italian=_DISPLAY_NAME_ITALIAN, - # description_english=_DESCRIPTION_ENGLISH, - # description_italian=_DESCRIPTION_ITALIAN, netcdf_main_dataset_name="TNd", wms_main_layer_name="TNd", thredds_url_pattern="cline_yr/TNd_{historical_year_period}_*.nc", - # unit_english=_UNIT, - # palette="default/seq-YlOrRd", - # color_scale_min=_COLOR_SCALE_MIN, - # color_scale_max=_COLOR_SCALE_MAX, - # data_precision=_DATA_PRECISION, climatic_indicator_id=climatic_indicators["tasmin-absolute-annual"], possible_values=[ ConfigurationParameterPossibleValueCreate( @@ -224,21 +148,6 @@ def generate_configurations( (CoreConfParamName.ARCHIVE.value, _ARCHIVE) ].id ), - # ConfigurationParameterPossibleValueCreate( - # configuration_parameter_value_id=conf_param_values[ - # (CoreConfParamName.HISTORICAL_VARIABLE.value, _VARIABLE) - # ].id - # ), - # ConfigurationParameterPossibleValueCreate( - # configuration_parameter_value_id=conf_param_values[ - # (CoreConfParamName.AGGREGATION_PERIOD.value, "annual") - # ].id - # ), - # ConfigurationParameterPossibleValueCreate( - # configuration_parameter_value_id=conf_param_values[ - # (CoreConfParamName.MEASURE.value, "absolute") - # ].id - # ), ConfigurationParameterPossibleValueCreate( configuration_parameter_value_id=conf_param_values[ (CoreConfParamName.HISTORICAL_YEAR_PERIOD.value, "winter") @@ -260,27 +169,12 @@ def generate_configurations( ].id ), ], - observation_variable_id=( - v.id - if (v := variables.get(_RELATED_OBSERVATION_VARIABLE_NAME)) is not None - else None - ), - observation_variable_aggregation_type=ObservationAggregationType.SEASONAL, ), CoverageConfigurationCreate( name="tnd_annual_monthly", - # display_name_english=_DISPLAY_NAME_ENGLISH, - # display_name_italian=_DISPLAY_NAME_ITALIAN, - # description_english=_DESCRIPTION_ENGLISH, - # description_italian=_DESCRIPTION_ITALIAN, netcdf_main_dataset_name="TNd", wms_main_layer_name="TNd", thredds_url_pattern="cline_yr/TNd_{historical_year_period}_*.nc", - # unit_english=_UNIT, - # palette="default/seq-YlOrRd", - # color_scale_min=_COLOR_SCALE_MIN, - # color_scale_max=_COLOR_SCALE_MAX, - # data_precision=_DATA_PRECISION, climatic_indicator_id=climatic_indicators["tasmin-absolute-annual"], possible_values=[ ConfigurationParameterPossibleValueCreate( @@ -288,21 +182,6 @@ def generate_configurations( (CoreConfParamName.ARCHIVE.value, _ARCHIVE) ].id ), - # ConfigurationParameterPossibleValueCreate( - # configuration_parameter_value_id=conf_param_values[ - # (CoreConfParamName.HISTORICAL_VARIABLE.value, _VARIABLE) - # ].id - # ), - # ConfigurationParameterPossibleValueCreate( - # configuration_parameter_value_id=conf_param_values[ - # (CoreConfParamName.AGGREGATION_PERIOD.value, "annual") - # ].id - # ), - # ConfigurationParameterPossibleValueCreate( - # configuration_parameter_value_id=conf_param_values[ - # (CoreConfParamName.MEASURE.value, "absolute") - # ].id - # ), ConfigurationParameterPossibleValueCreate( configuration_parameter_value_id=conf_param_values[ (CoreConfParamName.HISTORICAL_YEAR_PERIOD.value, "february") @@ -359,11 +238,5 @@ def generate_configurations( ].id ), ], - observation_variable_id=( - v.id - if (v := variables.get(_RELATED_OBSERVATION_VARIABLE_NAME)) is not None - else None - ), - observation_variable_aggregation_type=ObservationAggregationType.MONTHLY, ), ] diff --git a/arpav_ppcv/bootstrapper/coverage_configurations/historical/tr.py b/arpav_ppcv/bootstrapper/coverage_configurations/historical/tr.py index 01f297aa..92c61844 100644 --- a/arpav_ppcv/bootstrapper/coverage_configurations/historical/tr.py +++ b/arpav_ppcv/bootstrapper/coverage_configurations/historical/tr.py @@ -1,45 +1,23 @@ -from ....schemas.base import ( - CoreConfParamName, - ObservationAggregationType, -) +from ....schemas.base import CoreConfParamName from ....schemas.coverages import ( CoverageConfigurationCreate, ConfigurationParameterPossibleValueCreate, ) -# _DISPLAY_NAME_ENGLISH = "Tropical nights" -# _DISPLAY_NAME_ITALIAN = "Notti tropicali" -# _DESCRIPTION_ENGLISH = "Number of days with minimum temperature higher than 20°C" -# _DESCRIPTION_ITALIAN = "Numero di giorni con temperatura minima maggiore di 20°C" -# # _VARIABLE = "tr" -# _UNIT = "gg" -# _COLOR_SCALE_MIN = 0 -# _COLOR_SCALE_MAX = 50 -# _DATA_PRECISION = 0 _RELATED_OBSERVATION_VARIABLE_NAME = "TR" _ARCHIVE = "historical" def generate_configurations( conf_param_values, - variables, climatic_indicators: dict[str, int], ) -> list[CoverageConfigurationCreate]: return [ CoverageConfigurationCreate( name="tr_30yr", - # display_name_english=_DISPLAY_NAME_ENGLISH, - # display_name_italian=_DISPLAY_NAME_ITALIAN, - # description_english=_DESCRIPTION_ENGLISH, - # description_italian=_DESCRIPTION_ITALIAN, netcdf_main_dataset_name="{historical_year_period}_avg", wms_main_layer_name="{historical_year_period}_avg", thredds_url_pattern="cline_30yr/TR_{climatological_standard_normal}.nc", - # unit_english=_UNIT, - # palette="default/seq-YlOrRd", - # color_scale_min=_COLOR_SCALE_MIN, - # color_scale_max=_COLOR_SCALE_MAX, - # data_precision=_DATA_PRECISION, climatic_indicator_id=climatic_indicators["tr-absolute-thirty_year"], possible_values=[ ConfigurationParameterPossibleValueCreate( @@ -47,21 +25,6 @@ def generate_configurations( (CoreConfParamName.ARCHIVE.value, _ARCHIVE) ].id ), - # ConfigurationParameterPossibleValueCreate( - # configuration_parameter_value_id=conf_param_values[ - # (CoreConfParamName.HISTORICAL_VARIABLE.value, _VARIABLE) - # ].id - # ), - # ConfigurationParameterPossibleValueCreate( - # configuration_parameter_value_id=conf_param_values[ - # (CoreConfParamName.AGGREGATION_PERIOD.value, "30yr") - # ].id - # ), - # ConfigurationParameterPossibleValueCreate( - # configuration_parameter_value_id=conf_param_values[ - # (CoreConfParamName.MEASURE.value, "absolute") - # ].id - # ), ConfigurationParameterPossibleValueCreate( configuration_parameter_value_id=conf_param_values[ ("climatological_standard_normal", "1991_2020") @@ -76,18 +39,9 @@ def generate_configurations( ), CoverageConfigurationCreate( name="tr_annual_yearly", - # display_name_english=_DISPLAY_NAME_ENGLISH, - # display_name_italian=_DISPLAY_NAME_ITALIAN, - # description_english=_DESCRIPTION_ENGLISH, - # description_italian=_DESCRIPTION_ITALIAN, netcdf_main_dataset_name="TR", wms_main_layer_name="TR", thredds_url_pattern="cline_yr/TR_{historical_year_period}_*.nc", - # unit_english=_UNIT, - # palette="default/seq-YlOrRd", - # color_scale_min=_COLOR_SCALE_MIN, - # color_scale_max=_COLOR_SCALE_MAX, - # data_precision=_DATA_PRECISION, climatic_indicator_id=climatic_indicators["tr-absolute-annual"], possible_values=[ ConfigurationParameterPossibleValueCreate( @@ -95,32 +49,11 @@ def generate_configurations( (CoreConfParamName.ARCHIVE.value, _ARCHIVE) ].id ), - # ConfigurationParameterPossibleValueCreate( - # configuration_parameter_value_id=conf_param_values[ - # (CoreConfParamName.HISTORICAL_VARIABLE.value, _VARIABLE) - # ].id - # ), - # ConfigurationParameterPossibleValueCreate( - # configuration_parameter_value_id=conf_param_values[ - # (CoreConfParamName.AGGREGATION_PERIOD.value, "annual") - # ].id - # ), - # ConfigurationParameterPossibleValueCreate( - # configuration_parameter_value_id=conf_param_values[ - # (CoreConfParamName.MEASURE.value, "absolute") - # ].id - # ), ConfigurationParameterPossibleValueCreate( configuration_parameter_value_id=conf_param_values[ (CoreConfParamName.HISTORICAL_YEAR_PERIOD.value, "all_year") ].id ), ], - observation_variable_id=( - v.id - if (v := variables.get(_RELATED_OBSERVATION_VARIABLE_NAME)) is not None - else None - ), - observation_variable_aggregation_type=ObservationAggregationType.YEARLY, ), ] diff --git a/arpav_ppcv/bootstrapper/coverage_configurations/historical/txd.py b/arpav_ppcv/bootstrapper/coverage_configurations/historical/txd.py index e43b9389..a5b1fad2 100644 --- a/arpav_ppcv/bootstrapper/coverage_configurations/historical/txd.py +++ b/arpav_ppcv/bootstrapper/coverage_configurations/historical/txd.py @@ -1,45 +1,23 @@ -from ....schemas.base import ( - CoreConfParamName, - ObservationAggregationType, -) +from ....schemas.base import CoreConfParamName from ....schemas.coverages import ( CoverageConfigurationCreate, ConfigurationParameterPossibleValueCreate, ) -# _DISPLAY_NAME_ENGLISH = "Maximum temperature" -# _DISPLAY_NAME_ITALIAN = "Temperatura massima" -# _DESCRIPTION_ENGLISH = "Average of maximum temperatures" -# _DESCRIPTION_ITALIAN = "Media delle temperature massime" -# # _VARIABLE = "txd" -# _UNIT = "ºC" -# _COLOR_SCALE_MIN = -5 -# _COLOR_SCALE_MAX = 20 -# _DATA_PRECISION = 1 _RELATED_OBSERVATION_VARIABLE_NAME = "TXd" _ARCHIVE = "historical" def generate_configurations( conf_param_values, - variables, climatic_indicators: dict[str, int], ) -> list[CoverageConfigurationCreate]: return [ CoverageConfigurationCreate( name="txd_30yr", - # display_name_english=_DISPLAY_NAME_ENGLISH, - # display_name_italian=_DISPLAY_NAME_ITALIAN, - # description_english=_DESCRIPTION_ENGLISH, - # description_italian=_DESCRIPTION_ITALIAN, netcdf_main_dataset_name="{historical_year_period}_avg", wms_main_layer_name="{historical_year_period}_avg", thredds_url_pattern="cline_30yr/TXd_{climatological_standard_normal}.nc", - # unit_english=_UNIT, - # palette="default/seq-YlOrRd", - # color_scale_min=_COLOR_SCALE_MIN, - # color_scale_max=_COLOR_SCALE_MAX, - # data_precision=_DATA_PRECISION, climatic_indicator_id=climatic_indicators["tasmax-absolute-thirty_year"], possible_values=[ ConfigurationParameterPossibleValueCreate( @@ -47,21 +25,6 @@ def generate_configurations( (CoreConfParamName.ARCHIVE.value, _ARCHIVE) ].id ), - # ConfigurationParameterPossibleValueCreate( - # configuration_parameter_value_id=conf_param_values[ - # (CoreConfParamName.HISTORICAL_VARIABLE.value, _VARIABLE) - # ].id - # ), - # ConfigurationParameterPossibleValueCreate( - # configuration_parameter_value_id=conf_param_values[ - # (CoreConfParamName.AGGREGATION_PERIOD.value, "30yr") - # ].id - # ), - # ConfigurationParameterPossibleValueCreate( - # configuration_parameter_value_id=conf_param_values[ - # (CoreConfParamName.MEASURE.value, "absolute") - # ].id - # ), ConfigurationParameterPossibleValueCreate( configuration_parameter_value_id=conf_param_values[ ("climatological_standard_normal", "1991_2020") @@ -156,18 +119,9 @@ def generate_configurations( ), CoverageConfigurationCreate( name="txd_annual_yearly", - # display_name_english=_DISPLAY_NAME_ENGLISH, - # display_name_italian=_DISPLAY_NAME_ITALIAN, - # description_english=_DESCRIPTION_ENGLISH, - # description_italian=_DESCRIPTION_ITALIAN, netcdf_main_dataset_name="TXd", wms_main_layer_name="TXd", thredds_url_pattern="cline_yr/TXd_{historical_year_period}_*.nc", - # unit_english=_UNIT, - # palette="default/seq-YlOrRd", - # color_scale_min=_COLOR_SCALE_MIN, - # color_scale_max=_COLOR_SCALE_MAX, - # data_precision=_DATA_PRECISION, climatic_indicator_id=climatic_indicators["tasmax-absolute-annual"], possible_values=[ ConfigurationParameterPossibleValueCreate( @@ -175,48 +129,18 @@ def generate_configurations( (CoreConfParamName.ARCHIVE.value, _ARCHIVE) ].id ), - # ConfigurationParameterPossibleValueCreate( - # configuration_parameter_value_id=conf_param_values[ - # (CoreConfParamName.HISTORICAL_VARIABLE.value, _VARIABLE) - # ].id - # ), - # ConfigurationParameterPossibleValueCreate( - # configuration_parameter_value_id=conf_param_values[ - # (CoreConfParamName.AGGREGATION_PERIOD.value, "annual") - # ].id - # ), - # ConfigurationParameterPossibleValueCreate( - # configuration_parameter_value_id=conf_param_values[ - # (CoreConfParamName.MEASURE.value, "absolute") - # ].id - # ), ConfigurationParameterPossibleValueCreate( configuration_parameter_value_id=conf_param_values[ (CoreConfParamName.HISTORICAL_YEAR_PERIOD.value, "all_year") ].id ), ], - observation_variable_id=( - v.id - if (v := variables.get(_RELATED_OBSERVATION_VARIABLE_NAME)) is not None - else None - ), - observation_variable_aggregation_type=ObservationAggregationType.YEARLY, ), CoverageConfigurationCreate( name="txd_annual_seasonal", - # display_name_english=_DISPLAY_NAME_ENGLISH, - # display_name_italian=_DISPLAY_NAME_ITALIAN, - # description_english=_DESCRIPTION_ENGLISH, - # description_italian=_DESCRIPTION_ITALIAN, netcdf_main_dataset_name="TXd", wms_main_layer_name="TXd", thredds_url_pattern="cline_yr/TXd_{historical_year_period}_*.nc", - # unit_english=_UNIT, - # palette="default/seq-YlOrRd", - # color_scale_min=_COLOR_SCALE_MIN, - # color_scale_max=_COLOR_SCALE_MAX, - # data_precision=_DATA_PRECISION, climatic_indicator_id=climatic_indicators["tasmax-absolute-annual"], possible_values=[ ConfigurationParameterPossibleValueCreate( @@ -224,21 +148,6 @@ def generate_configurations( (CoreConfParamName.ARCHIVE.value, _ARCHIVE) ].id ), - # ConfigurationParameterPossibleValueCreate( - # configuration_parameter_value_id=conf_param_values[ - # (CoreConfParamName.HISTORICAL_VARIABLE.value, _VARIABLE) - # ].id - # ), - # ConfigurationParameterPossibleValueCreate( - # configuration_parameter_value_id=conf_param_values[ - # (CoreConfParamName.AGGREGATION_PERIOD.value, "annual") - # ].id - # ), - # ConfigurationParameterPossibleValueCreate( - # configuration_parameter_value_id=conf_param_values[ - # (CoreConfParamName.MEASURE.value, "absolute") - # ].id - # ), ConfigurationParameterPossibleValueCreate( configuration_parameter_value_id=conf_param_values[ (CoreConfParamName.HISTORICAL_YEAR_PERIOD.value, "winter") @@ -260,27 +169,12 @@ def generate_configurations( ].id ), ], - observation_variable_id=( - v.id - if (v := variables.get(_RELATED_OBSERVATION_VARIABLE_NAME)) is not None - else None - ), - observation_variable_aggregation_type=ObservationAggregationType.SEASONAL, ), CoverageConfigurationCreate( name="txd_annual_monthly", - # display_name_english=_DISPLAY_NAME_ENGLISH, - # display_name_italian=_DISPLAY_NAME_ITALIAN, - # description_english=_DESCRIPTION_ENGLISH, - # description_italian=_DESCRIPTION_ITALIAN, netcdf_main_dataset_name="TXd", wms_main_layer_name="TXd", thredds_url_pattern="cline_yr/TXd_{historical_year_period}_*.nc", - # unit_english=_UNIT, - # palette="default/seq-YlOrRd", - # color_scale_min=_COLOR_SCALE_MIN, - # color_scale_max=_COLOR_SCALE_MAX, - # data_precision=_DATA_PRECISION, climatic_indicator_id=climatic_indicators["tasmax-absolute-annual"], possible_values=[ ConfigurationParameterPossibleValueCreate( @@ -288,21 +182,6 @@ def generate_configurations( (CoreConfParamName.ARCHIVE.value, _ARCHIVE) ].id ), - # ConfigurationParameterPossibleValueCreate( - # configuration_parameter_value_id=conf_param_values[ - # (CoreConfParamName.HISTORICAL_VARIABLE.value, _VARIABLE) - # ].id - # ), - # ConfigurationParameterPossibleValueCreate( - # configuration_parameter_value_id=conf_param_values[ - # (CoreConfParamName.AGGREGATION_PERIOD.value, "annual") - # ].id - # ), - # ConfigurationParameterPossibleValueCreate( - # configuration_parameter_value_id=conf_param_values[ - # (CoreConfParamName.MEASURE.value, "absolute") - # ].id - # ), ConfigurationParameterPossibleValueCreate( configuration_parameter_value_id=conf_param_values[ (CoreConfParamName.HISTORICAL_YEAR_PERIOD.value, "january") @@ -364,11 +243,5 @@ def generate_configurations( ].id ), ], - observation_variable_id=( - v.id - if (v := variables.get(_RELATED_OBSERVATION_VARIABLE_NAME)) is not None - else None - ), - observation_variable_aggregation_type=ObservationAggregationType.MONTHLY, ), ] diff --git a/arpav_ppcv/database.py b/arpav_ppcv/database.py index 45a8ae73..4d978c8b 100644 --- a/arpav_ppcv/database.py +++ b/arpav_ppcv/database.py @@ -1069,25 +1069,11 @@ def create_coverage_configuration( to_refresh = [] db_coverage_configuration = coverages.CoverageConfiguration( name=coverage_configuration_create.name, - # display_name_english=coverage_configuration_create.display_name_english, - # display_name_italian=coverage_configuration_create.display_name_italian, - # description_english=coverage_configuration_create.description_english, - # description_italian=coverage_configuration_create.description_italian, netcdf_main_dataset_name=coverage_configuration_create.netcdf_main_dataset_name, wms_main_layer_name=coverage_configuration_create.wms_main_layer_name, wms_secondary_layer_name=coverage_configuration_create.wms_secondary_layer_name, thredds_url_pattern=coverage_configuration_create.thredds_url_pattern, - # unit_english=coverage_configuration_create.unit_english, - # unit_italian=( - # coverage_configuration_create.unit_italian - # or coverage_configuration_create.unit_english - # ), - # palette=coverage_configuration_create.palette, - # color_scale_min=coverage_configuration_create.color_scale_min, - # color_scale_max=coverage_configuration_create.color_scale_max, climatic_indicator_id=coverage_configuration_create.climatic_indicator_id, - observation_variable_id=coverage_configuration_create.observation_variable_id, - observation_variable_aggregation_type=coverage_configuration_create.observation_variable_aggregation_type, uncertainty_lower_bounds_coverage_configuration_id=( coverage_configuration_create.uncertainty_lower_bounds_coverage_configuration_id ), diff --git a/arpav_ppcv/migrations/versions/7b7412888496_added_relationship_between_measurement_.py b/arpav_ppcv/migrations/versions/7b7412888496_added_relationship_between_measurement_.py new file mode 100644 index 00000000..dbe556ba --- /dev/null +++ b/arpav_ppcv/migrations/versions/7b7412888496_added_relationship_between_measurement_.py @@ -0,0 +1,41 @@ +"""added relationship between measurement and climatic_indicator + +Revision ID: 7b7412888496 +Revises: e20d856daca4 +Create Date: 2024-11-14 17:00:26.871034 + +""" +from typing import Sequence, Union + +from alembic import op +import sqlalchemy as sa +import sqlmodel + + +# revision identifiers, used by Alembic. +revision: str = '7b7412888496' +down_revision: Union[str, None] = 'e20d856daca4' +branch_labels: Union[str, Sequence[str], None] = None +depends_on: Union[str, Sequence[str], None] = None + + +def upgrade() -> None: + # ### commands auto generated by Alembic - please adjust! ### + op.add_column('monthlymeasurement', sa.Column('climatic_indicator_id', sa.Integer(), nullable=False)) + op.create_foreign_key(None, 'monthlymeasurement', 'climaticindicator', ['climatic_indicator_id'], ['id'], onupdate='CASCADE', ondelete='CASCADE') + op.add_column('seasonalmeasurement', sa.Column('climatic_indicator_id', sa.Integer(), nullable=False)) + op.create_foreign_key(None, 'seasonalmeasurement', 'climaticindicator', ['climatic_indicator_id'], ['id'], onupdate='CASCADE', ondelete='CASCADE') + op.add_column('yearlymeasurement', sa.Column('climatic_indicator_id', sa.Integer(), nullable=False)) + op.create_foreign_key(None, 'yearlymeasurement', 'climaticindicator', ['climatic_indicator_id'], ['id'], onupdate='CASCADE', ondelete='CASCADE') + # ### end Alembic commands ### + + +def downgrade() -> None: + # ### commands auto generated by Alembic - please adjust! ### + op.drop_constraint(None, 'yearlymeasurement', type_='foreignkey') + op.drop_column('yearlymeasurement', 'climatic_indicator_id') + op.drop_constraint(None, 'seasonalmeasurement', type_='foreignkey') + op.drop_column('seasonalmeasurement', 'climatic_indicator_id') + op.drop_constraint(None, 'monthlymeasurement', type_='foreignkey') + op.drop_column('monthlymeasurement', 'climatic_indicator_id') + # ### end Alembic commands ### diff --git a/arpav_ppcv/schemas/climaticindicators.py b/arpav_ppcv/schemas/climaticindicators.py index f81903ee..9c986365 100644 --- a/arpav_ppcv/schemas/climaticindicators.py +++ b/arpav_ppcv/schemas/climaticindicators.py @@ -15,6 +15,11 @@ if TYPE_CHECKING: from . import coverages + from .observations import ( + MonthlyMeasurement, + SeasonalMeasurement, + YearlyMeasurement, + ) _name_description_text: Final[str] = ( "Parameter name. Only alphanumeric characters and the underscore are allowed. " @@ -45,6 +50,43 @@ class ClimaticIndicator(sqlmodel.SQLModel, table=True): "coverages.CoverageConfiguration" ] = sqlmodel.Relationship(back_populates="climatic_indicator") + monthly_measurements: list["MonthlyMeasurement"] = sqlmodel.Relationship( + back_populates="climatic_indicator", + sa_relationship_kwargs={ + # ORM relationship config, which explicitly includes the + # `delete` and `delete-orphan` options because we want the ORM + # to try to delete monthly measurements when their related + # climatic_indicator is deleted + "cascade": "all, delete-orphan", + # expect that the RDBMS handles cascading deletes + "passive_deletes": True, + }, + ) + seasonal_measurements: list["SeasonalMeasurement"] = sqlmodel.Relationship( + back_populates="climatic_indicator", + sa_relationship_kwargs={ + # ORM relationship config, which explicitly includes the + # `delete` and `delete-orphan` options because we want the ORM + # to try to delete seasonal measurements when their related + # climatic_indicator is deleted + "cascade": "all, delete-orphan", + # expect that the RDBMS handles cascading deletes + "passive_deletes": True, + }, + ) + yearly_measurements: list["YearlyMeasurement"] = sqlmodel.Relationship( + back_populates="climatic_indicator", + sa_relationship_kwargs={ + # ORM relationship config, which explicitly includes the + # `delete` and `delete-orphan` options because we want the ORM + # to try to delete yearly measurements when their related + # climatic_indicator is deleted + "cascade": "all, delete-orphan", + # expect that the RDBMS handles cascading deletes + "passive_deletes": True, + }, + ) + @pydantic.computed_field @property def identifier(self) -> str: diff --git a/arpav_ppcv/schemas/coverages.py b/arpav_ppcv/schemas/coverages.py index 276b1234..97612116 100644 --- a/arpav_ppcv/schemas/coverages.py +++ b/arpav_ppcv/schemas/coverages.py @@ -176,29 +176,13 @@ class CoverageConfiguration(sqlmodel.SQLModel, table=True): id: uuid.UUID = sqlmodel.Field(default_factory=uuid.uuid4, primary_key=True) name: str = sqlmodel.Field(unique=True, index=True) - # display_name_english: Optional[str] = None - # display_name_italian: Optional[str] = None - # description_english: Optional[str] = None - # description_italian: Optional[str] = None netcdf_main_dataset_name: str thredds_url_pattern: str wms_main_layer_name: Optional[str] = None wms_secondary_layer_name: Optional[str] = None - # unit_english: str = "" - # unit_italian: Optional[str] = None - # palette: str - # color_scale_min: float = 0.0 - # color_scale_max: float = 1.0 - # data_precision: int = 3 climatic_indicator_id: Optional[int] = sqlmodel.Field( default=None, foreign_key="climaticindicator.id" ) - # observation_variable_id: Optional[uuid.UUID] = sqlmodel.Field( - # default=None, foreign_key="variable.id" - # ) - # observation_variable_aggregation_type: Optional[ - # base.ObservationAggregationType - # ] = None uncertainty_lower_bounds_coverage_configuration_id: Optional[ uuid.UUID ] = sqlmodel.Field(default=None, foreign_key="coverageconfiguration.id") @@ -444,28 +428,14 @@ class CoverageConfigurationCreate(sqlmodel.SQLModel): ), ), ] - # display_name_english: Optional[str] = None - # display_name_italian: Optional[str] = None - # description_english: Optional[str] = None - # description_italian: Optional[str] = None netcdf_main_dataset_name: str # the point in having a wms_main_layer_name and wms_secondary_layer_name is to let # the frontend toggle between them wms_main_layer_name: Optional[str] = None wms_secondary_layer_name: Optional[str] = None thredds_url_pattern: str - # unit_english: str - # unit_italian: Optional[str] = None - # palette: str - # color_scale_min: float - # color_scale_max: float - # data_precision: int = 3 possible_values: list["ConfigurationParameterPossibleValueCreate"] climatic_indicator_id: int - observation_variable_id: Optional[uuid.UUID] = None - observation_variable_aggregation_type: Optional[ - base.ObservationAggregationType - ] = None uncertainty_lower_bounds_coverage_configuration_id: Optional[uuid.UUID] = None uncertainty_upper_bounds_coverage_configuration_id: Optional[uuid.UUID] = None secondary_coverage_configurations_ids: Annotated[ @@ -483,25 +453,11 @@ def validate_thredds_url_pattern(cls, v: str) -> str: class CoverageConfigurationUpdate(sqlmodel.SQLModel): name: Annotated[Optional[str], pydantic.Field(pattern=_NAME_PATTERN)] = None - # display_name_english: Optional[str] = None - # display_name_italian: Optional[str] = None - # description_english: Optional[str] = None - # description_italian: Optional[str] = None netcdf_main_dataset_name: Optional[str] = None wms_main_layer_name: Optional[str] = None wms_secondary_layer_name: Optional[str] = None thredds_url_pattern: Optional[str] = None - # unit_english: Optional[str] = None - # unit_italian: Optional[str] = None - # palette: Optional[str] = None - # color_scale_min: Optional[float] = None - # color_scale_max: Optional[float] = None - # data_precision: Optional[int] = None - observation_variable_id: Optional[uuid.UUID] = None climatic_indicator_id: Optional[int] = None - observation_variable_aggregation_type: Optional[ - base.ObservationAggregationType - ] = None possible_values: list["ConfigurationParameterPossibleValueUpdate"] uncertainty_lower_bounds_coverage_configuration_id: Optional[uuid.UUID] = None uncertainty_upper_bounds_coverage_configuration_id: Optional[uuid.UUID] = None diff --git a/arpav_ppcv/schemas/observations.py b/arpav_ppcv/schemas/observations.py index e3c54ec8..d9f64853 100644 --- a/arpav_ppcv/schemas/observations.py +++ b/arpav_ppcv/schemas/observations.py @@ -285,7 +285,7 @@ class MonthlyMeasurement(MonthlyMeasurementBase, table=True): "lazy": "joined", }, ) - climatic_indicator: ClimaticIndicator = sqlmodel.Relationship( + climatic_indicator: "ClimaticIndicator" = sqlmodel.Relationship( back_populates="monthly_measurements", sa_relationship_kwargs={ # retrieve the related resource immediately, by means of a SQL JOIN - this @@ -348,7 +348,7 @@ class SeasonalMeasurement(sqlmodel.SQLModel, table=True): "lazy": "joined", }, ) - climatic_indicator: ClimaticIndicator = sqlmodel.Relationship( + climatic_indicator: "ClimaticIndicator" = sqlmodel.Relationship( back_populates="seasonal_measurements", sa_relationship_kwargs={ # retrieve the related resource immediately, by means of a SQL JOIN - this @@ -411,7 +411,7 @@ class YearlyMeasurement(sqlmodel.SQLModel, table=True): "lazy": "joined", }, ) - climatic_indicator: ClimaticIndicator = sqlmodel.Relationship( + climatic_indicator: "ClimaticIndicator" = sqlmodel.Relationship( back_populates="yearly_measurements", sa_relationship_kwargs={ # retrieve the related resource immediately, by means of a SQL JOIN - this diff --git a/arpav_ppcv/webapp/api_v2/routers/coverages.py b/arpav_ppcv/webapp/api_v2/routers/coverages.py index 1fa00b93..51757e33 100644 --- a/arpav_ppcv/webapp/api_v2/routers/coverages.py +++ b/arpav_ppcv/webapp/api_v2/routers/coverages.py @@ -5,6 +5,7 @@ from typing import ( Annotated, Optional, + Sequence, ) import anyio.to_thread @@ -37,10 +38,11 @@ utils as thredds_utils, ) from ....schemas.base import ( - CoreConfParamName, CoverageDataSmoothingStrategy, ObservationDataSmoothingStrategy, ) +from ....schemas.coverages import ConfigurationParameterValue +from ....schemas.climaticindicators import ClimaticIndicator from ... import dependencies from ..schemas import coverages as coverage_schemas from ..schemas.base import ( @@ -685,7 +687,7 @@ def get_forecast_variable_combinations( def _retrieve_climatic_indicator_filter( - session: sqlmodel.Session, configuration_parameter_values: Sequence[str] + session: Session, configuration_parameter_values: Sequence[str] ) -> tuple[Optional[list[ConfigurationParameterValue]], Optional[ClimaticIndicator]]: conf_param_values_filter = [] climatic_indicator_parts = {}