forked from venetoarpa/Arpav-PPCV-backend
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #121 from ricardogsilva/115-add-bootstrap-config-f…
…or-CDD-variable Added bootstrap cov confs for cdd and r95ptot
- Loading branch information
Showing
3 changed files
with
716 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,356 @@ | ||
""" | ||
- [x] cdd_30yr_anomaly_annual_agree_model_ensemble | ||
- [x] cdd_30yr_anomaly_annual_model_ec_earth_cclm4_8_17 | ||
- [x] cdd_30yr_anomaly_annual_model_ec_earth_racmo22e | ||
- [x] cdd_30yr_anomaly_annual_model_ec_earth_rca4 | ||
- [x] cdd_30yr_anomaly_annual_model_hadgem2_es_racmo22e | ||
- [x] cdd_30yr_anomaly_annual_model_mpi_esm_lr_remo2009 | ||
""" | ||
from ...schemas.coverages import ( | ||
CoverageConfigurationCreate, | ||
ConfigurationParameterPossibleValueCreate, | ||
) | ||
|
||
|
||
def generate_cdd_configurations( | ||
conf_param_values, | ||
) -> list[CoverageConfigurationCreate]: | ||
return [ | ||
CoverageConfigurationCreate( | ||
name="cdd_30yr_anomaly_annual_agree_model_ensemble", | ||
netcdf_main_dataset_name="cdd", | ||
thredds_url_pattern="ensembletwbc/std/clipped/eca_cdd_an_avgagree_{time_window}_{scenario}_{year_period}_ls_VFVGTAA.nc", | ||
unit="gg", | ||
palette="uncert-stippled/div-BrBg-inv", | ||
color_scale_min=-40, | ||
color_scale_max=40, | ||
possible_values=[ | ||
ConfigurationParameterPossibleValueCreate( | ||
configuration_parameter_value_id=conf_param_values[ | ||
("time_window", "tw1") | ||
].id | ||
), | ||
ConfigurationParameterPossibleValueCreate( | ||
configuration_parameter_value_id=conf_param_values[ | ||
("time_window", "tw2") | ||
].id | ||
), | ||
ConfigurationParameterPossibleValueCreate( | ||
configuration_parameter_value_id=conf_param_values[ | ||
("scenario", "rcp26") | ||
].id | ||
), | ||
ConfigurationParameterPossibleValueCreate( | ||
configuration_parameter_value_id=conf_param_values[ | ||
("scenario", "rcp45") | ||
].id | ||
), | ||
ConfigurationParameterPossibleValueCreate( | ||
configuration_parameter_value_id=conf_param_values[ | ||
("scenario", "rcp85") | ||
].id | ||
), | ||
ConfigurationParameterPossibleValueCreate( | ||
configuration_parameter_value_id=conf_param_values[ | ||
("year_period", "DJF") | ||
].id | ||
), | ||
ConfigurationParameterPossibleValueCreate( | ||
configuration_parameter_value_id=conf_param_values[ | ||
("year_period", "MAM") | ||
].id | ||
), | ||
ConfigurationParameterPossibleValueCreate( | ||
configuration_parameter_value_id=conf_param_values[ | ||
("year_period", "JJA") | ||
].id | ||
), | ||
ConfigurationParameterPossibleValueCreate( | ||
configuration_parameter_value_id=conf_param_values[ | ||
("year_period", "SON") | ||
].id | ||
), | ||
], | ||
), | ||
CoverageConfigurationCreate( | ||
name="cdd_30yr_anomaly_annual_model_ec_earth_cclm4_8_17", | ||
netcdf_main_dataset_name="cdd", | ||
thredds_url_pattern="indici5rcm/clipped/eca_cdd_an_EC-EARTH_CCLM4-8-17_{scenario}_{year_period}_{time_window}_ls_VFVGTAA.nc", | ||
unit="gg", | ||
palette="default/div-BrBg-inv", | ||
color_scale_min=-40, | ||
color_scale_max=40, | ||
possible_values=[ | ||
ConfigurationParameterPossibleValueCreate( | ||
configuration_parameter_value_id=conf_param_values[ | ||
("time_window", "tw1") | ||
].id | ||
), | ||
ConfigurationParameterPossibleValueCreate( | ||
configuration_parameter_value_id=conf_param_values[ | ||
("time_window", "tw2") | ||
].id | ||
), | ||
ConfigurationParameterPossibleValueCreate( | ||
configuration_parameter_value_id=conf_param_values[ | ||
("scenario", "rcp26") | ||
].id | ||
), | ||
ConfigurationParameterPossibleValueCreate( | ||
configuration_parameter_value_id=conf_param_values[ | ||
("scenario", "rcp45") | ||
].id | ||
), | ||
ConfigurationParameterPossibleValueCreate( | ||
configuration_parameter_value_id=conf_param_values[ | ||
("scenario", "rcp85") | ||
].id | ||
), | ||
ConfigurationParameterPossibleValueCreate( | ||
configuration_parameter_value_id=conf_param_values[ | ||
("year_period", "DJF") | ||
].id | ||
), | ||
ConfigurationParameterPossibleValueCreate( | ||
configuration_parameter_value_id=conf_param_values[ | ||
("year_period", "MAM") | ||
].id | ||
), | ||
ConfigurationParameterPossibleValueCreate( | ||
configuration_parameter_value_id=conf_param_values[ | ||
("year_period", "JJA") | ||
].id | ||
), | ||
ConfigurationParameterPossibleValueCreate( | ||
configuration_parameter_value_id=conf_param_values[ | ||
("year_period", "SON") | ||
].id | ||
), | ||
], | ||
), | ||
CoverageConfigurationCreate( | ||
name="cdd_30yr_anomaly_annual_model_ec_earth_racmo22e", | ||
netcdf_main_dataset_name="cdd", | ||
thredds_url_pattern="indici5rcm/clipped/eca_cdd_an_EC-EARTH_RACMO22E_{scenario}_{year_period}_{time_window}_ls_VFVGTAA.nc", | ||
unit="gg", | ||
palette="default/div-BrBg-inv", | ||
color_scale_min=-40, | ||
color_scale_max=40, | ||
possible_values=[ | ||
ConfigurationParameterPossibleValueCreate( | ||
configuration_parameter_value_id=conf_param_values[ | ||
("time_window", "tw1") | ||
].id | ||
), | ||
ConfigurationParameterPossibleValueCreate( | ||
configuration_parameter_value_id=conf_param_values[ | ||
("time_window", "tw2") | ||
].id | ||
), | ||
ConfigurationParameterPossibleValueCreate( | ||
configuration_parameter_value_id=conf_param_values[ | ||
("scenario", "rcp26") | ||
].id | ||
), | ||
ConfigurationParameterPossibleValueCreate( | ||
configuration_parameter_value_id=conf_param_values[ | ||
("scenario", "rcp45") | ||
].id | ||
), | ||
ConfigurationParameterPossibleValueCreate( | ||
configuration_parameter_value_id=conf_param_values[ | ||
("scenario", "rcp85") | ||
].id | ||
), | ||
ConfigurationParameterPossibleValueCreate( | ||
configuration_parameter_value_id=conf_param_values[ | ||
("year_period", "DJF") | ||
].id | ||
), | ||
ConfigurationParameterPossibleValueCreate( | ||
configuration_parameter_value_id=conf_param_values[ | ||
("year_period", "MAM") | ||
].id | ||
), | ||
ConfigurationParameterPossibleValueCreate( | ||
configuration_parameter_value_id=conf_param_values[ | ||
("year_period", "JJA") | ||
].id | ||
), | ||
ConfigurationParameterPossibleValueCreate( | ||
configuration_parameter_value_id=conf_param_values[ | ||
("year_period", "SON") | ||
].id | ||
), | ||
], | ||
), | ||
CoverageConfigurationCreate( | ||
name="cdd_30yr_anomaly_annual_model_ec_earth_rca4", | ||
netcdf_main_dataset_name="cdd", | ||
thredds_url_pattern="indici5rcm/clipped/eca_cdd_an_EC-EARTH_RCA4_{scenario}_{year_period}_{time_window}_ls_VFVGTAA.nc", | ||
unit="gg", | ||
palette="default/div-BrBg-inv", | ||
color_scale_min=-40, | ||
color_scale_max=40, | ||
possible_values=[ | ||
ConfigurationParameterPossibleValueCreate( | ||
configuration_parameter_value_id=conf_param_values[ | ||
("time_window", "tw1") | ||
].id | ||
), | ||
ConfigurationParameterPossibleValueCreate( | ||
configuration_parameter_value_id=conf_param_values[ | ||
("time_window", "tw2") | ||
].id | ||
), | ||
ConfigurationParameterPossibleValueCreate( | ||
configuration_parameter_value_id=conf_param_values[ | ||
("scenario", "rcp26") | ||
].id | ||
), | ||
ConfigurationParameterPossibleValueCreate( | ||
configuration_parameter_value_id=conf_param_values[ | ||
("scenario", "rcp45") | ||
].id | ||
), | ||
ConfigurationParameterPossibleValueCreate( | ||
configuration_parameter_value_id=conf_param_values[ | ||
("scenario", "rcp85") | ||
].id | ||
), | ||
ConfigurationParameterPossibleValueCreate( | ||
configuration_parameter_value_id=conf_param_values[ | ||
("year_period", "DJF") | ||
].id | ||
), | ||
ConfigurationParameterPossibleValueCreate( | ||
configuration_parameter_value_id=conf_param_values[ | ||
("year_period", "MAM") | ||
].id | ||
), | ||
ConfigurationParameterPossibleValueCreate( | ||
configuration_parameter_value_id=conf_param_values[ | ||
("year_period", "JJA") | ||
].id | ||
), | ||
ConfigurationParameterPossibleValueCreate( | ||
configuration_parameter_value_id=conf_param_values[ | ||
("year_period", "SON") | ||
].id | ||
), | ||
], | ||
), | ||
CoverageConfigurationCreate( | ||
name="cdd_30yr_anomaly_annual_model_hadgem2_es_racmo22e", | ||
netcdf_main_dataset_name="cdd", | ||
thredds_url_pattern="indici5rcm/clipped/eca_cdd_an_HadGEM2-ES_RACMO22E_{scenario}_{year_period}_{time_window}_ls_VFVGTAA.nc", | ||
unit="gg", | ||
palette="default/div-BrBg-inv", | ||
color_scale_min=-40, | ||
color_scale_max=40, | ||
possible_values=[ | ||
ConfigurationParameterPossibleValueCreate( | ||
configuration_parameter_value_id=conf_param_values[ | ||
("time_window", "tw1") | ||
].id | ||
), | ||
ConfigurationParameterPossibleValueCreate( | ||
configuration_parameter_value_id=conf_param_values[ | ||
("time_window", "tw2") | ||
].id | ||
), | ||
ConfigurationParameterPossibleValueCreate( | ||
configuration_parameter_value_id=conf_param_values[ | ||
("scenario", "rcp26") | ||
].id | ||
), | ||
ConfigurationParameterPossibleValueCreate( | ||
configuration_parameter_value_id=conf_param_values[ | ||
("scenario", "rcp45") | ||
].id | ||
), | ||
ConfigurationParameterPossibleValueCreate( | ||
configuration_parameter_value_id=conf_param_values[ | ||
("scenario", "rcp85") | ||
].id | ||
), | ||
ConfigurationParameterPossibleValueCreate( | ||
configuration_parameter_value_id=conf_param_values[ | ||
("year_period", "DJF") | ||
].id | ||
), | ||
ConfigurationParameterPossibleValueCreate( | ||
configuration_parameter_value_id=conf_param_values[ | ||
("year_period", "MAM") | ||
].id | ||
), | ||
ConfigurationParameterPossibleValueCreate( | ||
configuration_parameter_value_id=conf_param_values[ | ||
("year_period", "JJA") | ||
].id | ||
), | ||
ConfigurationParameterPossibleValueCreate( | ||
configuration_parameter_value_id=conf_param_values[ | ||
("year_period", "SON") | ||
].id | ||
), | ||
], | ||
), | ||
CoverageConfigurationCreate( | ||
name="cdd_30yr_anomaly_annual_model_mpi_esm_lr_remo2009", | ||
netcdf_main_dataset_name="cdd", | ||
thredds_url_pattern="indici5rcm/clipped/eca_cdd_an_MPI-ESM-LR_REMO2009_{scenario}_{year_period}_{time_window}_ls_VFVGTAA.nc", | ||
unit="gg", | ||
palette="default/div-BrBg-inv", | ||
color_scale_min=-40, | ||
color_scale_max=40, | ||
possible_values=[ | ||
ConfigurationParameterPossibleValueCreate( | ||
configuration_parameter_value_id=conf_param_values[ | ||
("time_window", "tw1") | ||
].id | ||
), | ||
ConfigurationParameterPossibleValueCreate( | ||
configuration_parameter_value_id=conf_param_values[ | ||
("time_window", "tw2") | ||
].id | ||
), | ||
ConfigurationParameterPossibleValueCreate( | ||
configuration_parameter_value_id=conf_param_values[ | ||
("scenario", "rcp26") | ||
].id | ||
), | ||
ConfigurationParameterPossibleValueCreate( | ||
configuration_parameter_value_id=conf_param_values[ | ||
("scenario", "rcp45") | ||
].id | ||
), | ||
ConfigurationParameterPossibleValueCreate( | ||
configuration_parameter_value_id=conf_param_values[ | ||
("scenario", "rcp85") | ||
].id | ||
), | ||
ConfigurationParameterPossibleValueCreate( | ||
configuration_parameter_value_id=conf_param_values[ | ||
("year_period", "DJF") | ||
].id | ||
), | ||
ConfigurationParameterPossibleValueCreate( | ||
configuration_parameter_value_id=conf_param_values[ | ||
("year_period", "MAM") | ||
].id | ||
), | ||
ConfigurationParameterPossibleValueCreate( | ||
configuration_parameter_value_id=conf_param_values[ | ||
("year_period", "JJA") | ||
].id | ||
), | ||
ConfigurationParameterPossibleValueCreate( | ||
configuration_parameter_value_id=conf_param_values[ | ||
("year_period", "SON") | ||
].id | ||
), | ||
], | ||
), | ||
] |
Oops, something went wrong.