Exemplo n.º 1
0
    def __init__(self):
        WPSProcess.__init__(
            self,
            identifier="indices_percentile",
            title="Climate indices -- Percentile",
            version="0.9",
            abstract=
            "Climate indices based on one single input variable and the percentile of a reference period.",
            metadata=[
                {
                    'title':
                    'Documentation',
                    'href':
                    'http://flyingpigeon.readthedocs.io/en/latest/descriptions/index.html#climate-indices'
                },
                {
                    "title": "ICCLIM",
                    "href": "http://icclim.readthedocs.io/en/latest/"
                },
                {
                    "title":
                    "Percentile-based indices",
                    "href":
                    "http://flyingpigeon.readthedocs.io/en/latest/descriptions/indices.html#percentile-based-indices"
                },
            ],
            statusSupported=True,
            storeSupported=True)

        self.resource = self.addComplexInput(
            identifier="resource",
            title="Resouce",
            abstract="NetCDF File",
            minOccurs=1,
            maxOccurs=100,
            maxmegabites=5000,
            formats=[{
                "mimeType": "application/x-netcdf"
            }],
        )

        self.indices = self.addLiteralInput(
            identifier="indices",
            title="Index",
            abstract='Select an index',
            default='TG',
            type=type(''),
            minOccurs=1,
            maxOccurs=1,  # len(indices()),
            allowedValues=['TG', 'TN', 'TX'],  # indices()
        )

        self.percentile = self.addLiteralInput(
            identifier="percentile",
            title="Percentile",
            abstract='Select an percentile',
            default=90,
            type=type('0'),
            minOccurs=1,
            maxOccurs=1,  # len(indices()),
            allowedValues=range(1, 100),  # indices()
        )

        self.refperiod = self.addLiteralInput(
            identifier="refperiod",
            title="Reference Period",
            abstract="Time refperiod to retrieve the percentile level",
            default="19700101-20101231",
            type=type(''),
            minOccurs=0,
            maxOccurs=1,
        )

        #self.refperiod = self.addLiteralInput(
        #identifier="refperiod",
        #title="Reference refperiod",
        #abstract="Reference refperiod for climate condition (all = entire timeserie)",
        #default=None,
        #type=type(''),
        #minOccurs=0,
        #maxOccurs=1,
        #allowedValues=['all','1951-1980', '1961-1990', '1971-2000','1981-2010']
        #)

        self.groupings = self.addLiteralInput(
            identifier="groupings",
            title="Grouping",
            abstract="Select an time grouping (time aggregation)",
            default='yr',
            type=type(''),
            minOccurs=1,
            maxOccurs=len(GROUPING),
            allowedValues=GROUPING)

        self.polygons = self.addLiteralInput(identifier="polygons",
                                             title="Country subset",
                                             abstract=countries_longname(),
                                             default='DEU',
                                             type=type(''),
                                             minOccurs=0,
                                             maxOccurs=len(countries()),
                                             allowedValues=countries())

        self.mosaic = self.addLiteralInput(
            identifier="mosaic",
            title="Mosaic",
            abstract=
            "If Mosaic is checked, selected polygons be clipped as a mosaic for each input file",
            default=False,
            type=type(False),
            minOccurs=0,
            maxOccurs=1,
        )

        # complex output
        # -------------
        self.output = self.addComplexOutput(
            identifier="output",
            title="Index",
            abstract="Calculated index as NetCDF file",
            metadata=[],
            formats=[{
                "mimeType": "application/x-tar"
            }],
            asReference=True)
    def __init__(self):
        WPSProcess.__init__(
            self, 
            identifier = "indices_percentile",
            title="Climate indices -- Percentile",
            version = "0.1",
            abstract="Climate indices based on one single input variable and the percentile of a referece refperiod.",
            metadata = [
                {'title': 'Documentation', 'href': 'http://flyingpigeon.readthedocs.io/en/latest/descriptions/index.html#climate-indices'},
                {"title": "ICCLIM" , "href": "http://icclim.readthedocs.io/en/latest/"},
                {"title": "Percentile-based indices", "href": "http://flyingpigeon.readthedocs.io/en/latest/descriptions/indices.html#percentile-based-indices"},
                ],
            statusSupported=True,
            storeSupported=True
            )

        self.resource = self.addComplexInput(
            identifier="resource",
            title="Resouce",
            abstract="NetCDF File",
            minOccurs=1,
            maxOccurs=100,
            maxmegabites=5000,
            formats=[{"mimeType":"application/x-netcdf"}],
            )
    
        self.indices = self.addLiteralInput(
            identifier="indices",
            title="Indice",
            abstract='Select an indice',
            default='TG',
            type=type(''),
            minOccurs=1,
            maxOccurs=1, # len(indices()),
            allowedValues=['TG', 'TN', 'TX'], # indices()
            )

        self.percentile = self.addLiteralInput(
            identifier="percentile",
            title="Percentile",
            abstract='Select an percentile',
            default=90,
            type=type('0'),
            minOccurs=1,
            maxOccurs=1, # len(indices()),
            allowedValues=range(1,100), # indices()
            )

        self.refperiod = self.addLiteralInput(
            identifier="refperiod",
            title="Reference Period",
            abstract="Time refperiod to retrieve the percentile level",
            default="19700101-20101231",
            type=type(''),
            minOccurs=0,
            maxOccurs=1,
            )

        
        #self.refperiod = self.addLiteralInput(
            #identifier="refperiod",
            #title="Reference refperiod",
            #abstract="Reference refperiod for climate condition (all = entire timeserie)",
            #default=None,
            #type=type(''),
            #minOccurs=0,
            #maxOccurs=1,
            #allowedValues=['all','1951-1980', '1961-1990', '1971-2000','1981-2010']
            #)

        self.groupings = self.addLiteralInput(
            identifier="groupings",
            title="Grouping",
            abstract="Select an time grouping (time aggregation)",
            default='yr',
            type=type(''),
            minOccurs=1,
            maxOccurs=len(GROUPING),
            allowedValues=GROUPING
            )
        
        self.polygons = self.addLiteralInput(
            identifier="polygons",
            title="Country subset",
            abstract= countries_longname(), 
            default='DEU',
            type=type(''),
            minOccurs=0,
            maxOccurs=len(countries()),
            allowedValues=countries()
            )
        
        self.mosaik = self.addLiteralInput(
            identifier="mosaik",
            title="Mosaik",
            abstract="If Mosaik is checked, selected polygons be clipped as a mosaik for each input file",
            default=False,
            type=type(False),
            minOccurs=0,
            maxOccurs=1,
            )


        # complex output
        # -------------
        self.output = self.addComplexOutput(
            identifier="output",
            title="Indice",
            abstract="Calculated indice as NetCDF file",
            metadata=[],
            formats=[{"mimeType":"application/x-tar"}],
            asReference=True
            )
Exemplo n.º 3
0
    def __init__(self):
        WPSProcess.__init__(
            self,
            identifier="indices_simple",
            title="Climate indices -- Simple",
            version="0.9",
            abstract="Climate indices based on one single input variable.",
            metadata=[
                {'title': 'Documentation', 'href': 'http://flyingpigeon.readthedocs.io/en/latest/descriptions/index.html#climate-indices'},
                {"title": "ICCLIM" , "href": "http://icclim.readthedocs.io/en/latest/"},
                {"title": "Simple Indices", "href": "http://flyingpigeon.readthedocs.io/en/latest/descriptions/indices.html"}
                ],
            statusSupported=True,
            storeSupported=True
            )

        self.resource = self.addComplexInput(
            identifier="resource",
            title="Resouce",
            abstract="NetCDF File",
            minOccurs=1,
            maxOccurs=100,
            maxmegabites=5000,
            formats=[{"mimeType": "application/x-netcdf"}],
            )

        self.groupings = self.addLiteralInput(
            identifier="groupings",
            title="Grouping",
            abstract="Select an time grouping (time aggregation)",
            default='yr',
            type=type(''),
            minOccurs=1,
            maxOccurs=len(GROUPING),
            allowedValues=GROUPING
            )

        self.indices = self.addLiteralInput(
            identifier="indices",
            title="Index",
            abstract=indices_description(),
            default='SU',
            type=type(''),
            minOccurs=1,
            maxOccurs=len(indices()),
            allowedValues=indices()
            )

        self.polygons = self.addLiteralInput(
            identifier="polygons",
            title="Country subset",
            abstract=str(countries_longname()),
            type=type(''),
            minOccurs=0,
            maxOccurs=len(countries()),
            allowedValues=countries()
            )

        self.mosaic = self.addLiteralInput(
            identifier="mosaic",
            title="Mosaic",
            abstract="If Mosaic is checked, selected polygons be clipped as a mosaic for each input file",
            default=False,
            type=type(False),
            minOccurs=0,
            maxOccurs=1,
            )

        # complex output
        # -------------
        self.output = self.addComplexOutput(
            identifier="output",
            title="Index",
            abstract="Calculated index as NetCDF file",
            metadata=[],
            formats=[{"mimeType": "application/x-tar"}],
            asReference=True
            )

        self.output_netcdf = self.addComplexOutput(
            title="one dataset as example",
            abstract="NetCDF file to be dispayed on WMS",
            formats=[{"mimeType":"application/x-netcdf"}],
            asReference=True,
            identifier="ncout",
            )
Exemplo n.º 4
0
    def __init__(self):
        WPSProcess.__init__(
            self, 
            identifier = "indices_single",
            title="Calculation of climate indice (single variable)",
            version = "0.3",
            abstract="This process calculates climate indices based on one single variable.",
            statusSupported=True,
            storeSupported=True
            )

        self.resource = self.addComplexInput(
            identifier="resource",
            title="Resouce",
            abstract="NetCDF File",
            minOccurs=1,
            maxOccurs=100,
            maxmegabites=5000,
            formats=[{"mimeType":"application/x-netcdf"}],
            )
    
        self.groupings = self.addLiteralInput(
            identifier="groupings",
            title="Grouping",
            abstract="Select an time grouping (time aggregation)",
            default='yr',
            type=type(''),
            minOccurs=1,
            maxOccurs=len(GROUPING),
            allowedValues=GROUPING
            )

        self.indices = self.addLiteralInput(
            identifier="indices",
            title="Indice",
            abstract=indices_description(),
            default='SU',
            type=type(''),
            minOccurs=1,
            maxOccurs=len(indices()),
            allowedValues=indices()
            )
        
        self.polygons = self.addLiteralInput(
            identifier="polygons",
            title="Country subset",
            abstract= countries_longname(), 
            #default='FRA',
            type=type(''),
            minOccurs=0,
            maxOccurs=len(countries()),
            allowedValues=countries()
            )

        # complex output
        # -------------
        self.output = self.addComplexOutput(
            identifier="output",
            title="Indice",
            abstract="Calculated indice as NetCDF file",
            metadata=[],
            formats=[{"mimeType":"application/x-netcdf"}],
            asReference=True
            )