Skip to content
Snippets Groups Projects

Migration to plugin template and add climpact functionality

Merged Mostafa Hadizadeh requested to merge migration into main
4 unresolved threads
+ 25
25
@@ -8,7 +8,7 @@ Heat2UrbanImpact plugin API wrapper.
######################################################
# import commonly used libraries. You can add/remove
# libraries as needed
# libraries as needed *test*
######################################################
import json
@@ -37,7 +37,7 @@ class Heat2UrbanImpact(plugin.PluginAbstract):
# Version of the Heat2UrbanImpact plugin (major, minor, patch) * Mandatory
__version__ = (2024, 11, 0)
# Short Description of the Heat2UrbanImpact plugin * Mandatory
__short_description__: str = "Barrier-free RCM data, representative for heat events, for urban impact models."
__short_description__: str = "Preprocessed time series of heat periods from RCM data for urban impact models."
# Optional category this plugin belongs to
__category__: Optional[str] = "Time Series"
# Optional tags, that are the plugin can be described with and found by
@@ -50,7 +50,7 @@ class Heat2UrbanImpact(plugin.PluginAbstract):
# Optional long description of the author of the plugin
__long_description__: Optional[
str
] = "Extension or composition of various existing plugins or program parts for the barrier-free transfer of meteorological data (representative of certain climatological heat events) into an urban climate model"
] = "This plugin extracts the development of the atmospheric temperature stratification during a specified heat/warm period from regional climate model data and tailors the data for the usage in urban impact models. For a selectable region of interest and period of time this plugin returns hourly temperature data at different layers/hights in a directly usable format (format specification). This plugin is based on the NUKLEUS ensemble of 3km horizontal grid."
######################################################
# Define the parameters for the plugin * Mandatory
@@ -85,18 +85,18 @@ class Heat2UrbanImpact(plugin.PluginAbstract):
name="experiment",
mandatory=True,
facet="experiment",
help="Select a climate model experiment.",
help="Select the model simulation of interest: historical or projection (global warming level +2K or +3K)",
max_items=1,
predefined_facets={
"project": ["nukleus"],
"product": ["ceu-3"],
"time_frequency": ["1hr"],
"variable": ["tas", "ta300", "ta500", "ta700", "ta950"],
"variable": ["tas", "tasmin", "tasmax"],
},
),
SolrField(
name="models",
mandatory=True,
#mandatory=True,
facet="model",
multiple=True,
max_items=100,
@@ -104,42 +104,42 @@ class Heat2UrbanImpact(plugin.PluginAbstract):
"project": ["nukleus"],
"product": ["ceu-3"],
"time_frequency": ["1hr"],
"variable": ["tas", "ta300", "ta500", "ta700", "ta950"],
"variable": ["tas", "tasmin", "tasmax"],
},
help=(
"Select climate model(s). Multiple models can be chosen for simultaneous output."
"Select climate model(s) from the NUKLEUS ensemble. Multiple models can be chosen for simultaneous output."
),
),
SelectField(
name="event",
default="Heat Wave",
options={"heat_wave": "Heat Wave", "extreme_heat": "Extreme Heat"},
help="Select the type of heat event to analyze. IT'S NOT IMPLEMENTED YET.",
default="95",
options={"75": "75th percentile", "85": "85th percentile", "95": "95th percentile"},
help="Select the exceptionality of the heat/warm period by selecting percentiles of temperature probability distribution. Default is the 95th percentile. IT'S NOT IMPLEMENTED YET.",
),
Integer(
name="length_of_event",
default=3,
help="Duration of the heat event in days. IT'S NOT IMPLEMENTED YET.",
help="Enter the number of days of the heat/warm period you would like to receive as output. An integer between 1 and 14 days would be plausible. Default is 3 days. IT'S NOT IMPLEMENTED YET.",
),
SelectField(
String(
name="months_of_event",
default="Summer (Jun-Aug)",
options={
"JJA": "Summer (Jun-Aug)",
"DJF": "Winter (Dec-Feb)",
"MAM": "Spring (Mar-May)",
"SON": "Autumn (Sep-Nov)",
},
help="Select the season for the analysis. IT'S NOT IMPLEMENTED YET.",
default="July",
#options={
# "JJA": "Summer (Jun-Aug)",
# "DJF": "Winter (Dec-Feb)",
# "MAM": "Spring (Mar-May)",
# "SON": "Autumn (Sep-Nov)",
#},
help="Enter the month(s) when your heat event is supposed to happen for your studies. E.g. for single month 'June' or for multiple months 'May:August'. Default is 'July'. IT'S NOT IMPLEMENTED YET.",
),
SelectField(
name="impact_model",
default="Basic Impact Model",
default=None,
options={
"basic": "Basic Impact Model",
"advanced": "Advanced Impact Model",
"ENVI-met": "ENVI-met",
"PALM": "PALM",
},
help="Select the impact model to use for analysis. IT'S NOT IMPLEMENTED YET.",
help="The format of the output will be tailored for the selected impact model. IT'S NOT IMPLEMENTED YET.",
),
String(
name="start",
Loading