Exemplo n.º 1
0
    def __init__(self):
        inputs = [
            LiteralInput(
                'metric',
                'Metric',
                abstract='Choose a metric to calculate.',
                data_type='string',
                allowed_values=['t10p', 't90p', 'rx5day',
                                'Wx'],  # 'cdd' <- these do not work
                default='Wx'),
        ]
        self.plotlist = []
        outputs = [
            ComplexOutput('plot',
                          'Combined Climate Extreme Index plot',
                          abstract='Combined Climate Extreme Index plot.',
                          as_reference=True,
                          supported_formats=[Format('image/png')]),
            ComplexOutput('data',
                          'Combined Climate Extreme Index data',
                          abstract='Combined Climate Extreme Index data.',
                          as_reference=True,
                          supported_formats=[Format('application/zip')]),
            ComplexOutput(
                'archive',
                'Archive',
                abstract=
                'The complete output of the ESMValTool processing as an zip archive.',
                as_reference=True,
                supported_formats=[Format('application/zip')]),
            *default_outputs(),
        ]

        super(ExtremeIndex, self).__init__(
            self._handler,
            identifier="extreme_index",
            title="Combined Climate Extreme Index",
            version=runner.VERSION,
            abstract=
            """Metric showing extreme indices relevant to the insurance industry (heat, cold, wind, flood and drought indices).""",
            metadata=[
                Metadata('Estimated Calculation Time', '2 minutes'),
                Metadata('ESMValTool', 'http://www.esmvaltool.org/'),
                Metadata(
                    'Documentation',
                    'https://esmvaltool.readthedocs.io/en/latest/recipes/recipe_combined_climate_extreme_index.html',
                    role=util.WPS_ROLE_DOC),
                Metadata('Media',
                         util.diagdata_url() +
                         '/risk_index/insurance_risk_indices.png',
                         role=util.WPS_ROLE_MEDIA),
            ],
            inputs=inputs,
            outputs=outputs,
            status_supported=True,
            store_supported=True)
    def __init__(self):
        inputs = []
        self.plotlist = []
        outputs = [
            ComplexOutput(
                'plot',
                'Capacity Factor of Wind Power plot',
                abstract=
                'Ratio of average estimated power to theoretical maximum power.',
                as_reference=True,
                supported_formats=[Format('image/png')]),
            ComplexOutput(
                'data',
                'Capacity Factor of Wind Power data',
                abstract=
                'Ratio of average estimated power to theoretical maximum power.',
                as_reference=True,
                supported_formats=[Format('application/zip')]),
            ComplexOutput(
                'archive',
                'Archive',
                abstract=
                'The complete output of the ESMValTool processing as an zip archive.',
                as_reference=True,
                supported_formats=[Format('application/zip')]),
            *default_outputs(),
        ]

        super(CapacityFactor, self).__init__(
            self._handler,
            identifier="capacity_factor",
            title="Capacity factor of wind power",
            version=runner.VERSION,
            abstract=
            """Metric showing the wind capacity factor to estimate energy supply.""",
            metadata=[
                Metadata('Estimated Calculation Time', '1 minute'),
                Metadata('ESMValTool', 'http://www.esmvaltool.org/'),
                Metadata(
                    'Documentation',
                    'https://esmvaltool.readthedocs.io/en/latest/recipes/recipe_capacity_factor.html',
                    role=util.WPS_ROLE_DOC),
                #                Metadata(
                #                    'Media',
                #                    util.diagdata_url() + '/capacity_factor/diurnal_temperature_variation.png',
                #                    role=util.WPS_ROLE_MEDIA),
            ],
            inputs=inputs,
            outputs=outputs,
            status_supported=True,
            store_supported=True)
    def __init__(self):
        inputs = []
        self.plotlist = []
        outputs = [
            ComplexOutput(
                'plot',
                'Diurnal Temperature Variation (DTR) Indicator plot',
                abstract=
                'The diurnal temperature indicator to estimate energy demand.',
                as_reference=True,
                supported_formats=[Format('image/png')]),
            ComplexOutput('data',
                          'Diurnal Temperature Variation (DTR) Indicator data',
                          abstract='The diurnal temperature indicator data.',
                          as_reference=True,
                          supported_formats=[Format('application/zip')]),
            ComplexOutput(
                'archive',
                'Archive',
                abstract=
                'The complete output of the ESMValTool processing as an zip archive.',
                as_reference=True,
                supported_formats=[Format('application/zip')]),
            *default_outputs(),
        ]

        super(DiurnalTemperatureIndex, self).__init__(
            self._handler,
            identifier="diurnal_temperature_index",
            title="Diurnal Temperature Variation (DTR) Indicator",
            version=runner.VERSION,
            abstract=
            """Metric showing the diurnal temperature indicator to estimate energy demand.""",
            metadata=[
                Metadata('Estimated Calculation Time', '6 minutes'),
                Metadata('ESMValTool', 'http://www.esmvaltool.org/'),
                Metadata(
                    'Documentation',
                    'https://esmvaltool.readthedocs.io/en/latest/recipes/recipe_diurnal_temperature_index.html',
                    role=util.WPS_ROLE_DOC),
                #                Metadata(
                #                    'Media',
                #                    util.diagdata_url() + '/dtr/diurnal_temperature_variation.png',
                #                    role=util.WPS_ROLE_MEDIA),
            ],
            inputs=inputs,
            outputs=outputs,
            status_supported=True,
            store_supported=True)
Exemplo n.º 4
0
    def __init__(self):
        inputs = [
            *model_experiment_ensemble(models=['bcc-csm1-1-m', 'bcc-csm1-1'],
                                       experiments=['historical'],
                                       ensembles=['r1i1p1'],
                                       start_end_year=(1850, 2012),
                                       start_end_defaults=(2001, 2002)),
            LiteralInput('frlim',
                         'frlim',
                         abstract='Frlim',
                         data_type='string',
                         allowed_values=['2.5', '5', '10'],
                         default='5'),
            LiteralInput('plim',
                         'plim',
                         abstract='Plim',
                         data_type='string',
                         allowed_values=['0.5', '1', '2'],
                         default='1'),
        ]
        self.plotlist = ['dryfreq', 'drymax']
        outputs = [
            *outputs_from_plot_names(self.plotlist),
            ComplexOutput(
                'data_drymax',
                'Data Drymax',
                abstract='Generated output data of ESMValTool processing.',
                as_reference=True,
                supported_formats=[FORMATS.NETCDF]),
            ComplexOutput(
                'data_dryfreq',
                'Data DryFreq',
                abstract='Generated output data of ESMValTool processing.',
                as_reference=True,
                supported_formats=[FORMATS.NETCDF]),
            ComplexOutput(
                'archive',
                'Archive',
                abstract=
                'The complete output of the ESMValTool processing as an zip archive.',
                as_reference=True,
                supported_formats=[Format('application/zip')]),
            *default_outputs(),
        ]

        super(ConsecDryDays, self).__init__(
            self._handler,
            identifier="consecdrydays",
            title="Consecutive Dry Days",
            version=runner.VERSION,
            abstract=
            "calculates the longest period of consecutive dry days (days with at least 'prlim' mm/day) in the provided time series, as well as the number of periods of at least 'frlim' consecutive dry days. 'prlim' and 'frlim' are provided by the user.",
            metadata=[
                Metadata('Estimated Calculation Time', '30 seconds'),
                Metadata('ESMValTool', 'http://www.esmvaltool.org/'),
                Metadata(
                    'Documentation',
                    'https://esmvaltool.readthedocs.io/en/version2_development/recipes/recipe_consecdrydays.html',
                    role=util.WPS_ROLE_DOC),
                #                Metadata('Media',
                #                         util.diagdata_url() + '/consecdrydays/drydays.png',
                #                         role=util.WPS_ROLE_MEDIA),
            ],
            inputs=inputs,
            outputs=outputs,
            status_supported=True,
            store_supported=True)
    def __init__(self):
        inputs = [
            LiteralInput(
                'moninf',
                'First month month of the seasonal mean period',
                abstract=
                'The first month of the seasonal mean period to be computed, if none the monthly anomalies will be computed.',
                data_type='string',
                allowed_values=[
                    '1', '2', '3', '4', '5', '6', '7', '8', '9', '10', '11',
                    '12', 'null'
                ],
                default='6'),
            LiteralInput(
                'monsup',
                'Last month month of the seasonal mean period',
                abstract=
                'the last month of the seasonal mean period to be computed, if none the monthly anomalies will be computed.',
                data_type='string',
                allowed_values=[
                    '1', '2', '3', '4', '5', '6', '7', '8', '9', '10', '11',
                    '12'
                ],
                default='6'),
            LiteralInput(
                'agreement_threshold',
                'Agreement Threshold',
                abstract=
                'Integer between 0 and 100 indicating the threshold in percent for the minimum agreement between models on the sign of the multi-model mean anomaly for the stipling to be plotted.',
                data_type='integer',
                allowed_values=[i for i in range(0, 101)],
                default=80),
            LiteralInput(
                'running_mean',
                'Running Mean',
                abstract=
                'integer indictating the length of the window for the running mean to be computed.',
                data_type='integer',
                allowed_values=AllowedValue(
                    allowed_type=ALLOWEDVALUETYPE.RANGE, minval=1, maxval=365),
                default=5),
        ]
        self.plotlist = ['tas', 'Area']
        outputs = [
            *outputs_from_plot_names(self.plotlist),
            ComplexOutput(
                'data',
                'Data',
                abstract='Generated output data of ESMValTool processing.',
                as_reference=True,
                supported_formats=[FORMATS.NETCDF]),
            ComplexOutput(
                'archive',
                'Archive',
                abstract=
                'The complete output of the ESMValTool processing as an zip archive.',
                as_reference=True,
                supported_formats=[Format('application/zip')]),
            *default_outputs(),
        ]

        super(MultimodelProducts, self).__init__(
            self._handler,
            identifier="multimodel_products",
            title="Generic multi-model products",
            version=runner.VERSION,
            abstract="""For the 'generic multi-model diagnostic' the ensemble
                mean anomaly, and the ensemble variance and agreement are
                calculated. The results are shown as maps and time series.""",
            metadata=[
                Metadata('Estimated Calculation Time', '1 minute'),
                Metadata('ESMValTool', 'http://www.esmvaltool.org/'),
                Metadata(
                    'Documentation',
                    'https://esmvaltool.readthedocs.io/en/latest/recipes/recipe_multimodel_products.html',
                    role=util.WPS_ROLE_DOC),
                #                Metadata(
                #                    'Media',
                #                    util.diagdata_url() + '/multimodel_products/bsc_anomaly_timeseries.png',
                #                    role=util.WPS_ROLE_MEDIA),
            ],
            inputs=inputs,
            outputs=outputs,
            status_supported=True,
            store_supported=True)
    def __init__(self):
        inputs = []
        self.plotlist = []
        outputs = [
            ComplexOutput(
                'spi_plot',
                'SPI Histogram plot',
                abstract='Generated spi histogram plot.',
                as_reference=True,
                supported_formats=[Format('image/png')]),
            ComplexOutput(
                'spei_plot',
                'SPEI Histogram plot',
                abstract='Generated SPEI Histogram plot.',
                as_reference=True,
                supported_formats=[Format('image/png')]),
            ComplexOutput(
                'spi_model',
                'SPI Data for the model',
                abstract=
                'The complete SPI Data for the model.',
                as_reference=True,
                supported_formats=[Format('application/zip')]),
            ComplexOutput(
                'spi_reference',
                'SPI Data for the reference model',
                abstract=
                'The complete SPI Data for the reference model.',
                as_reference=True,
                supported_formats=[Format('application/zip')]),
            ComplexOutput(
                'spei_model',
                'SPEI Data for the model',
                abstract=
                'The complete SPEI Data for the model.',
                as_reference=True,
                supported_formats=[Format('application/zip')]),
            ComplexOutput(
                'spei_reference',
                'SPEI Data for the reference model',
                abstract=
                'The complete SPEI Data for the reference model.',
                as_reference=True,
                supported_formats=[Format('application/zip')]),
            ComplexOutput(
                'archive',
                'Archive',
                abstract=
                'The complete output of the ESMValTool processing as an zip archive.',
                as_reference=True,
                supported_formats=[Format('application/zip')]),
            *default_outputs(),
        ]

        super(DroughtIndicator, self).__init__(
            self._handler,
            identifier="drought_indicator",
            title="Drought indicator",
            version=runner.VERSION,
            abstract="""The drought indicator calculates diagnostics for meteorological drought.""",
            metadata=[
                Metadata('Estimated Calculation Time', '45 minutes'),
                Metadata('ESMValTool', 'http://www.esmvaltool.org/'),
                Metadata(
                    'Documentation',
                    'https://esmvaltool.readthedocs.io/en/version2_development/recipes/recipe_spei.html',
                    role=util.WPS_ROLE_DOC),
            ],
            inputs=inputs,
            outputs=outputs,
            status_supported=True,
            store_supported=True)
Exemplo n.º 7
0
    def __init__(self):
        inputs = [
            *model_experiment_ensemble(models=['EC-EARTH'],
                                       experiments=['historical'],
                                       ensembles=['r12i1p1'],
                                       start_end_year=(1979, 2005),
                                       start_end_defaults=(1990, 1999)),
            LiteralInput('shape',
                         'Shape',
                         abstract='Shape of the area',
                         data_type='string',
                         allowed_values=[
                             'MotalaStrom', 'Elbe', 'multicatchment',
                             'testfile', 'Thames'
                         ],
                         default='MotalaStrom'),
        ]
        outputs = [
            ComplexOutput(
                'data',
                'Data',
                abstract=
                'Generated NetCDF file with precipitation for the selected area.',
                as_reference=True,
                supported_formats=[FORMATS.NETCDF]),
            ComplexOutput(
                'xlsx_data',
                'XLSX Data',
                abstract=
                'Generated excel file with precipitation for the selected area',
                as_reference=True,
                supported_formats=[Format('application/vnd.ms-excel')]),
            ComplexOutput(
                'archive',
                'Archive',
                abstract=
                'The complete output of the ESMValTool processing as an zip archive.',
                as_reference=True,
                supported_formats=[Format('application/zip')]),
            *default_outputs(),
        ]

        super(ShapeSelect, self).__init__(
            self._handler,
            identifier="shapefile_selection",
            title="Shapefile selection",
            version=runner.VERSION,
            abstract=
            "Metric showing selected gridded data within a user defined polygon shapefile and outputting as NetCDF or csv file.",
            metadata=[
                Metadata('Estimated Calculation Time', '10 seconds'),
                Metadata('ESMValTool', 'http://www.esmvaltool.org/'),
                Metadata(
                    'Documentation',
                    'https://esmvaltool.readthedocs.io/en/version2_development/recipes/recipe_shapeselect.html',
                    role=util.WPS_ROLE_DOC),
                #                Metadata('Media',
                #                         util.diagdata_url() + '/shapefile_selection/OBS_CRU_reanaly_1_T2Ms_tas_1990-1994.png',
                #                         role=util.WPS_ROLE_MEDIA),
            ],
            inputs=inputs,
            outputs=outputs,
            status_supported=True,
            store_supported=True)
    def __init__(self):
        inputs = [
            LiteralInput(
                'weights',
                'Weights',
                abstract='Either `equal`, for equal weights, `null` for no weights.',
                data_type='string',
                allowed_values=['equal', 'null'],
                default='equal'),
            LiteralInput(
                'moninf',
                'First month month of the seasonal mean period',
                abstract='The first month of the seasonal mean period to be computed, if none the monthly anomalies will be computed.',
                data_type='string',
                allowed_values=['1', '2', '3', '4','5', '6', '7', '8', '9', '10', '11', '12', 'null'],
                default='1'),
            LiteralInput(
                'monsup',
                'Last month month of the seasonal mean period',
                abstract='the last month of the seasonal mean period to be computed, if none the monthly anomalies will be computed.',
                data_type='string',
                allowed_values=['1', '2', '3', '4','5', '6', '7', '8', '9', '10', '11', '12'],
                default='3'),
        ]
        outputs = [
            ComplexOutput(
                'data',
                'Data',
                abstract='Generated combined indices data.',
                as_reference=True,
                supported_formats=[FORMATS.NETCDF]),
            ComplexOutput(
                'archive',
                'Archive',
                abstract=
                'The complete output of the ESMValTool processing as an zip archive.',
                as_reference=True,
                supported_formats=[Format('application/zip')]),
            *default_outputs(),
        ]

        super(CombinedIndices, self).__init__(
            self._handler,
            identifier="combined_indices",
            title="Single and multi-model indices based on area averages",
            version=runner.VERSION,
            abstract="""Metric showning single and multi model indices based on area averages.""",
            metadata=[
		Metadata('Estimated Calculation Time', '1 minute'),
                Metadata('ESMValTool', 'http://www.esmvaltool.org/'),
                Metadata(
                    'Documentation',
                    'https://esmvaltool.readthedocs.io/en/latest/recipes/recipe_combined_climate_extreme_index.html',
                    role=util.WPS_ROLE_DOC),
#                Metadata(
#                    'Media',
#                    util.diagdata_url() + '/pydemo/pydemo_thumbnail.png',
#                    role=util.WPS_ROLE_MEDIA),
            ],
            inputs=inputs,
            outputs=outputs,
            status_supported=True,
            store_supported=True)
Exemplo n.º 9
0
    def __init__(self):
        inputs = [
            LiteralInput(
                'quantile',
                'Quantile',
                abstract='quantile defining the exceedance/non-exceedance threshold',
                data_type='float',
                allowed_values=[0.5, 0.6, 0.7, 0.8, 0.9],
                default=0.8),
            LiteralInput(
                'min_duration',
                'Minimum duration',
                abstract='Min duration in days of a heatwave/coldwave event',
                data_type='integer',
                default=5),
            LiteralInput(
                'operator',
                'Operator',
                abstract='either `>` for exceedances or `<` for non-exceedances',
                data_type='string',
                allowed_values=['exceedances', 'non-exceedances'],
                default='non-exceedances'),
            LiteralInput(
                'season',
                'Season',
                abstract='Choose a season.',
                data_type='string',
                allowed_values=['summer', 'winter'],
                default='winter'),
        ]
        outputs = [
            ComplexOutput(
                'plot',
                'Extreme spell duration tasmin plot',
                abstract='Generated extreme spell duration tasmin plot.',
                as_reference=True,
                supported_formats=[Format('image/png')]),
            ComplexOutput(
                'data',
                'Extreme spell duration tasmin data',
                abstract=
                'Extreme spell duration tasmin data.',
                as_reference=True,
                supported_formats=[Format('application/zip')]),
            ComplexOutput(
                'archive',
                'Archive',
                abstract=
                'The complete output of the ESMValTool processing as an zip archive.',
                as_reference=True,
                supported_formats=[Format('application/zip')]),
            *default_outputs(),
        ]

        super(HeatwavesColdwaves, self).__init__(
            self._handler,
            identifier="heatwaves_coldwaves",
            title="Heatwave and coldwave duration",
            version=runner.VERSION,
            abstract="""Metric showing the duration of heatwaves and coldwaves, to help understand potential changes in energy demand.""",
            metadata=[
                Metadata('Estimated Calculation Time', '4 minutes'),
                Metadata('ESMValTool', 'http://www.esmvaltool.org/'),
                Metadata(
                    'Documentation',
                    'https://esmvaltool.readthedocs.io/en/latest/recipes/recipe_heatwaves_coldwaves.html',
                    role=util.WPS_ROLE_DOC),
#                Metadata(
#                    'Media',
#                    util.diagdata_url() + '/heatwaves_coldwaves/extreme_spells_energy.png',
#                    role=util.WPS_ROLE_MEDIA),
            ],
            inputs=inputs,
            outputs=outputs,
            status_supported=True,
            store_supported=True)
Exemplo n.º 10
0
    def __init__(self):
        inputs = [
            *model_experiment_ensemble(models=['EC-EARTH'],
                                       experiments=['historical'],
                                       ensembles=['r2i1p1'],
                                       start_end_year=(1850, 2005),
                                       start_end_defaults=(1980, 1989)),
            LiteralInput('ref_model',
                         'Reference Model',
                         abstract='Choose a reference model like ERA-Interim.',
                         data_type='string',
                         allowed_values=['ERA-Interim'],
                         default='ERA-Interim',
                         min_occurs=1,
                         max_occurs=1),
            LiteralInput('season',
                         'Season',
                         abstract='Choose a season like DJF.',
                         data_type='string',
                         allowed_values=['DJF', 'MAM', 'JJA', 'SON', 'ALL'],
                         default='DJF'),
            LiteralInput('teles',
                         'Teles (EOFs)',
                         abstract='Choose an EOF like NAO.',
                         data_type='string',
                         allowed_values=['NAO', 'AO', 'PNA'],
                         default='NAO'),
        ]
        self.plotlist = ["EOF{}".format(i) for i in range(1, 5)]
        outputs = [
            *outputs_from_plot_names(self.plotlist),
            ComplexOutput(
                'data',
                'EOF Data',
                abstract='Generated output data of ESMValTool processing.',
                as_reference=True,
                supported_formats=[FORMATS.NETCDF]),
            ComplexOutput(
                'archive',
                'Archive',
                abstract=
                'The complete output of the ESMValTool processing as an zip archive.',
                as_reference=True,
                supported_formats=[Format('application/zip')]),
            *default_outputs(),
        ]

        super(Teleconnections, self).__init__(
            self._handler,
            identifier="teleconnections",
            title="Teleconnection indices",
            version=runner.VERSION,
            abstract=
            "Diagnostic providing teleconnection indices (Z500 empirical orthogonal functions)",
            metadata=[
                Metadata('Estimated Calculation Time', '2 minutes'),
                Metadata('ESMValTool', 'http://www.esmvaltool.org/'),
                Metadata(
                    'Documentation',
                    'https://esmvaltool.readthedocs.io/en/latest/recipes/recipe_miles.html',
                    role=util.WPS_ROLE_DOC),
                #                Metadata('Media',
                #                         util.diagdata_url() + '/pydemo/pydemo_thumbnail.png',
                #                         role=util.WPS_ROLE_MEDIA),
            ],
            inputs=inputs,
            outputs=outputs,
            status_supported=True,
            store_supported=True)
    def __init__(self):
        inputs = [
            *model_experiment_ensemble(models=['bcc-csm1-1'],
                                       model_name='Model_historical',
                                       experiments=['historical'],
                                       experiment_name='Experiment_historical',
                                       ensembles=['r1i1p1'],
                                       ensemble_name='Ensemble_historical'),
            *year_ranges((1850, 2005), (1971, 2000),
                         start_name='start_historical',
                         end_name='end_historical'),
            *model_experiment_ensemble(models=['bcc-csm1-1'],
                                       model_name='Model_projection',
                                       experiments=['rcp85'],
                                       experiment_name='Experiment_projection',
                                       ensembles=['r1i1p1'],
                                       ensemble_name='Ensemble_projection'),
            *year_ranges((2006, 2050), (2020, 2050),
                         start_name='start_projection',
                         end_name='end_projection'),
            LiteralInput('region',
                         'Region',
                         abstract='Choose a region like Polar',
                         data_type='string',
                         allowed_values=['Polar', 'North-Atlantic'],
                         default='North-Atlantic'),
            LiteralInput('ncenters',
                         'Cluster Centers',
                         abstract='Choose a number of cluster centers.',
                         data_type='string',
                         allowed_values=['3', '4', '5'],
                         default='4'),
            LiteralInput('detrend_order',
                         'Detrend Order',
                         abstract='Choose a order of detrend.',
                         data_type='string',
                         allowed_values=['2', '1'],
                         default='2'),
            LiteralInput('cluster_method',
                         'Cluster Method',
                         abstract='Choose a clustering method.',
                         data_type='string',
                         allowed_values=['kmeans', 'hclust'],
                         default='kmeans'),
            LiteralInput('eofs',
                         'EOFs',
                         abstract='Calculate EOFs?',
                         data_type='string',
                         allowed_values=['True', 'False'],
                         default=True),
            LiteralInput(
                'frequency',
                'Frequency',
                abstract='Choose a frequency like JAN.',
                data_type='string',
                allowed_values=[
                    'JAN',
                    'FEB',
                    'MAR',
                    'APR',
                    'MAY',
                    'JUN',
                    'JUL',
                    'AUG',
                    'SEP',
                    'OCT',
                    'NOV',
                    'DEC',
                    'JJA',
                    'SON',
                    'DJF'  # 'MAM' <- does not work yet
                ],
                default='JJA'),
        ]
        self.plotlist = [
            'Table_psl', 'psl_predicted_regimes', 'psl_observed_regimes'
        ]
        outputs = [
            *outputs_from_plot_names(self.plotlist),
            ComplexOutput(
                'rmse',
                'RMSE Data',
                abstract='Generated output data of ESMValTool processing.',
                as_reference=True,
                supported_formats=[FORMATS.NETCDF]),
            ComplexOutput(
                'exp',
                'EXP Data',
                abstract='Generated output data of ESMValTool processing.',
                as_reference=True,
                supported_formats=[FORMATS.NETCDF]),
            ComplexOutput(
                'obs',
                'OBS Data',
                abstract='Generated output data of ESMValTool processing.',
                as_reference=True,
                supported_formats=[FORMATS.NETCDF]),
            ComplexOutput(
                'archive',
                'Archive',
                abstract=
                'The complete output of the ESMValTool processing as an zip archive.',
                as_reference=True,
                supported_formats=[Format('application/zip')]),
            *default_outputs(),
        ]

        super(ModesVariability, self).__init__(
            self._handler,
            identifier="modes_of_variability",
            title="Modes of variability",
            version=runner.VERSION,
            abstract="""Diagnostics showing the RMSE between the observed and
            modelled patterns of variability obtained through classification
            and their relative relative bias (percentage) in the frequency of
            occurrence and the persistence of each mode.""",
            metadata=[
                Metadata('Estimated Calculation Time', '30 seconds'),
                Metadata('ESMValTool', 'http://www.esmvaltool.org/'),
                Metadata(
                    'Documentation',
                    'https://esmvaltool.readthedocs.io/en/latest/recipes/recipe_modes_of_variability.html',
                    role=util.WPS_ROLE_DOC),
                #                Metadata(
                #                    'Media',
                #                    util.diagdata_url() + '/pydemo/pydemo_thumbnail.png',
                #                    role=util.WPS_ROLE_MEDIA),
            ],
            inputs=inputs,
            outputs=outputs,
            status_supported=True,
            store_supported=True)
Exemplo n.º 12
0
    def __init__(self):
        inputs = [
            *model_experiment_ensemble(models=['EC-EARTH'],
                                       experiments=['historical'],
                                       ensembles=['r2i1p1'],
                                       start_end_year=(1850, 2005),
                                       start_end_defaults=(1980, 1989)),
            LiteralInput('ref_model',
                         'Reference Model',
                         abstract='Choose a reference model like ERA-Interim.',
                         data_type='string',
                         allowed_values=['ERA-Interim'],
                         default='ERA-Interim',
                         min_occurs=1,
                         max_occurs=1),
            LiteralInput('season',
                         'Season',
                         abstract='Choose a season like DJF.',
                         data_type='string',
                         allowed_values=['DJF', 'MAM', 'JJA', 'SON', 'ALL'],
                         default='DJF'),
        ]
        self.plotlist = [
            'TM90', 'NumberEvents', 'DurationEvents', 'LongBlockEvents',
            'BlockEvents', 'ACN', 'CN', 'BI', 'MGI', 'Z500', 'ExtraBlock',
            'InstBlock'
        ]
        outputs = [
            *outputs_from_plot_names(self.plotlist),
            ComplexOutput(
                'data_full',
                'Full Blocking Data',
                abstract='Generated output data of ESMValTool processing.',
                as_reference=True,
                supported_formats=[FORMATS.NETCDF]),
            ComplexOutput(
                'data_clim',
                'Clim Blocking Data',
                abstract='Generated output data of ESMValTool processing.',
                as_reference=True,
                supported_formats=[FORMATS.NETCDF]),
            ComplexOutput(
                'archive',
                'Archive',
                abstract=
                'The complete output of the ESMValTool processing as an zip archive.',
                as_reference=True,
                supported_formats=[Format('application/zip')]),
            *default_outputs(),
        ]

        super(Blocking, self).__init__(
            self._handler,
            identifier="blocking",
            title="Blocking metrics and indices",
            version=runner.VERSION,
            abstract=
            "Calculate Blocking metrics that shows the mid-latitude 1D and 2D blocking indices.",
            metadata=[
                Metadata('Estimated Calculation Time', '2 minutes'),
                Metadata('ESMValTool', 'http://www.esmvaltool.org/'),
                Metadata(
                    'Documentation',
                    'https://esmvaltool.readthedocs.io/en/latest/recipes/recipe_miles.html',
                    role=util.WPS_ROLE_DOC),
                #                Metadata(
                #                    'Media',
                #                    util.diagdata_url() + '/pydemo/pydemo_thumbnail.png',
                #                    role=util.WPS_ROLE_MEDIA),
            ],
            inputs=inputs,
            outputs=outputs,
            status_supported=True,
            store_supported=True)
Exemplo n.º 13
0
    def __init__(self):
        inputs = [
            *model_experiment_ensemble(models=['EC-EARTH'],
                                       model_name='model1',
                                       experiments=['historical'],
                                       ensembles=['r2i1p1'],
                                       ensemble_name='ensemble1',
                                       start_end_year=(1850, 2005),
                                       start_end_defaults=(2000, 2005)),
            *model_experiment_ensemble(models=['bcc-csm1-1'],
                                       model_name='model2',
                                       experiments=['historical'],
                                       ensembles=['r1i1p1'],
                                       ensemble_name='ensemble2',
                                       start_end_year=(1850, 2005),
                                       start_end_defaults=(2000, 2005)),
            *model_experiment_ensemble(models=['MPI-ESM-LR'],
                                       model_name='model3',
                                       experiments=['historical'],
                                       ensembles=['r1i1p1'],
                                       ensemble_name='ensemble3',
                                       start_end_year=(1850, 2005),
                                       start_end_defaults=(2000, 2005)),
            LiteralInput(
                'extract_levels',
                'Extraction levels',
                abstract='Choose an extraction level for the preprocessor.',
                data_type='float',
                #allowed_values=make_allowedvalues([0.0, 110000.0]),
                default=85000.0),
        ]
        outputs = [
            ComplexOutput(
                'plot',
                'Output plot',
                abstract='Generated output plot of ESMValTool processing.',
                as_reference=True,
                supported_formats=[Format('image/png')]),
            ComplexOutput(
                'data',
                'Data',
                abstract='Generated output data of ESMValTool processing.',
                as_reference=True,
                supported_formats=[FORMATS.NETCDF]),
            ComplexOutput(
                'archive',
                'Archive',
                abstract=
                'The complete output of the ESMValTool processing as an zip archive.',
                as_reference=True,
                supported_formats=[Format('application/zip')]),
            *default_outputs(),
        ]

        super(PreprocessExample, self).__init__(
            self._handler,
            identifier="preproc",
            title="Preprocessing Demo",
            version=runner.VERSION,
            abstract="Generates a plot for temperature using ESMValTool.",
            #             " The default run uses the following CMIP5 data:"
            #             " project=CMIP5, experiment=historical, ensemble=r1i1p1, variable=ta, model=MPI-ESM-LR, time_frequency=mon.",  # noqa
            metadata=[
                Metadata('Estimated Calculation Time', '1 Minute'),
                Metadata('ESMValTool', 'http://www.esmvaltool.org/'),
                #                Metadata('Documentation',
                #                         'https://copernicus-wps-demo.readthedocs.io/en/latest/processes.html#pydemo',
                #                         role=util.WPS_ROLE_DOC),
                #                Metadata('Media',
                #                         util.diagdata_url() + '/pydemo/pydemo_thumbnail.png',
                #                         role=util.WPS_ROLE_MEDIA)
            ],
            inputs=inputs,
            outputs=outputs,
            status_supported=True,
            store_supported=True)