def __init__(self): inputs = [ LiteralInput('model', 'Model', abstract='Choose a model like MPI-ESM-LR.', data_type='string', allowed_values=['MPI-ESM-LR', 'MPI-ESM-MR'], default='MPI-ESM-LR'), LiteralInput( 'experiment', 'Experiment', abstract='Choose an experiment like historical.', data_type='string', allowed_values=['historical', 'rcp26', 'rcp45', 'rcp85'], default='historical'), LiteralInput('ensemble', 'Ensemble', abstract='Choose an ensemble like r1i1p1.', data_type='string', allowed_values=['r1i1p1', 'r2i1p1', 'r3i1p1'], default='r1i1p1'), LiteralInput('start_year', 'Start year', data_type='integer', abstract='Start year of model data.', default="2000"), LiteralInput('end_year', 'End year', data_type='integer', abstract='End year of model data.', default="2001"), ] outputs = [ ComplexOutput('recipe', 'recipe', abstract='ESMValTool recipe used for processing.', as_reference=True, supported_formats=[Format('text/plain')]), ComplexOutput('log', 'Log File', abstract='Log File of ESMValTool processing.', as_reference=True, supported_formats=[Format('text/plain')]), ComplexOutput( 'output', 'Output plot', abstract='Generated output plot of ESMValTool processing.', as_reference=True, supported_formats=[Format('application/pdf')]), ] super(MyDiag, self).__init__( self._handler, identifier="mydiag", title="Simple plot", version=runner.VERSION, abstract="Generates a plot for temperature using ESMValTool." " It is a diagnostic used in the ESMValTool tutoriaal doc/toy-diagnostic-tutorial.pdf." " 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('ESMValTool', 'http://www.esmvaltool.org/'), Metadata( 'Documentation', 'https://copernicus-wps-demo.readthedocs.io/en/latest/processes.html#mydiag', role=util.WPS_ROLE_DOC), Metadata('Media', util.diagdata_url() + '/mydiag/mydiag_thumbnail.png', role=util.WPS_ROLE_MEDIA), Metadata( 'ESGF Testdata', 'https://esgf1.dkrz.de/thredds/catalog/esgcet/7/cmip5.output1.MPI-M.MPI-ESM-LR.historical.mon.atmos.Amon.r1i1p1.v20120315.html?dataset=cmip5.output1.MPI-M.MPI-ESM-LR.historical.mon.atmos.Amon.r1i1p1.v20120315.ta_Amon_MPI-ESM-LR_historical_r1i1p1_199001-199912.nc' ), # noqa ], inputs=inputs, outputs=outputs, status_supported=True, store_supported=True)
def __init__(self): inputs = [ LiteralInput('model', 'Model', abstract='Choose a model like MPI-ESM-LR.', data_type='string', allowed_values=['MPI-ESM-LR', 'MPI-ESM-MR'], default='MPI-ESM-LR'), LiteralInput( 'experiment', 'Experiment', abstract='Choose an experiment like historical.', data_type='string', allowed_values=['historical', 'rcp26', 'rcp45', 'rcp85'], default='historical'), LiteralInput('ensemble', 'Ensemble', abstract='Choose an ensemble like r1i1p1.', data_type='string', allowed_values=['r1i1p1', 'r2i1p1', 'r3i1p1'], default='r1i1p1'), LiteralInput('start_year', 'Start year', data_type='integer', abstract='Start year of model data.', default="2000"), LiteralInput('end_year', 'End year', data_type='integer', abstract='End year of model data.', default="2001"), ] outputs = [ ComplexOutput('namelist', 'namelist', abstract='ESMValTool namelist used for processing.', as_reference=True, supported_formats=[Format('text/plain')]), ComplexOutput('log', 'Log File', abstract='Log File of ESMValTool processing.', as_reference=True, supported_formats=[Format('text/plain')]), ComplexOutput( 'output', 'Output plot', abstract='Generated output plot of ESMValTool processing.', as_reference=True, supported_formats=[Format('application/pdf')]), ] super(Perfmetrics, self).__init__( self._handler, identifier="perfmetrics", title="Performance metrics", version=runner.VERSION, abstract= "Creates a performance metrics report comparing models using ESMValTool. " " The goal is to create a standard namelist for the calculation of performance metrics to quantify " " the ability of the models to reproduce the climatological mean annual cycle for selected " " Essential Climate Variables (ECVs) plus some additional corresponding diagnostics " " and plots to better understand and interpret the results. " " The namelist can be used to calculate performance metrics at different vertical " " levels (e.g., 5, 30, 200, 850 hPa as in Gleckler et al., 2008) and in four " " regions (global, tropics 20N-20S, northern extratropics 20-90N, southern extratropics 20-90S). " " As an additional reference, we consider the Righi et al. (2015) paper.", metadata=[ Metadata('ESMValTool', 'http://www.esmvaltool.org/'), Metadata( 'Documentation', 'https://copernicus-wps-demo.readthedocs.io/en/latest/processes.html#perfmetrics', role=util.WPS_ROLE_DOC), Metadata('Media', util.diagdata_url() + '/perfmetrics/Portait.png', role=util.WPS_ROLE_MEDIA), Metadata('Diagnostic Description', util.diagdata_url() + '/perfmetrics/description.md', role=util.MAGIC_ROLE_DOC), Metadata('Diagnostic Metadata', util.diagdata_url() + '/perfmetrics/perfmetrics.yml', role=util.MAGIC_ROLE_METADATA), ], inputs=inputs, outputs=outputs, status_supported=True, store_supported=True)
def __init__(self): inputs = [ LiteralInput('model', 'Model', abstract='Choose a model like MPI-ESM-LR.', data_type='string', allowed_values=[ 'ACCESS1-0', ], default='ACCESS1-0'), LiteralInput('experiment', 'Experiment', abstract='Choose an experiment like historical.', data_type='string', allowed_values=[ 'historical', ], default='historical'), LiteralInput('start_year', 'Start year', data_type='integer', abstract='Start year of model data.', default="1997"), LiteralInput('end_year', 'End year', data_type='integer', abstract='End year of model data.', default="1997"), LiteralInput( 'subset', 'Geographical subset', abstract= 'Choose a geographical subset with a Bounding Box: 4,13,44,53', data_type='string', default='4,13,44,53'), LiteralInput('regridding', 'Regridding', abstract='Flag for regridding.', data_type='boolean', default='0'), LiteralInput('slope', 'Slope', abstract='Flag for slope.', data_type='boolean', default='0'), LiteralInput('num_ens_members', 'Number of ensemble members', abstract='Choose a number of ensemble members.', data_type='integer', default='2'), LiteralInput('num_subdivs', 'Number of subdivisions', abstract='Choose a number of subdivisions.', data_type='integer', default='8'), ] outputs = [ ComplexOutput( 'output', 'Output plot', abstract='Generated output plot of ESMValTool processing.', as_reference=True, supported_formats=[Format('image/png')]), ] super(RainFarm, self).__init__( self._handler, identifier="rainfarm", title="RainFARM stochastic downscaling", version=runner.VERSION, abstract= "Tool to perform stochastic precipitation downscaling, generating an ensemble of fine-scale " " precipitation fields from information simulated by climate models at regional scale.", metadata=[ Metadata('ESMValTool', 'http://www.esmvaltool.org/'), Metadata( 'Documentation', 'https://copernicus-wps-demo.readthedocs.io/en/latest/processes.html#rainfarm', role=util.WPS_ROLE_DOC), Metadata('Media', util.diagdata_url() + '/rainfarm/rainfarm_thumbnail.png', role=util.WPS_ROLE_MEDIA), Metadata('Diagnostic Description', util.diagdata_url() + '/rainfarm/description.md', role=util.MAGIC_ROLE_DOC), Metadata('Diagnostic Metadata', util.diagdata_url() + '/rainfarm/rainfarm.yml', role=util.MAGIC_ROLE_METADATA), ], inputs=inputs, outputs=outputs, status_supported=True, store_supported=True)
def test_diagdata_url(): assert util.diagdata_url( ) == 'http://localhost:5000/static/diagnosticsdata'
def __init__(self): inputs = [ LiteralInput('region', 'Region', abstract='Choose a region like Arctic.', data_type='string', allowed_values=['Arctic', ], default='Arctic'), LiteralInput('model', 'Model', abstract='Choose a model like NASA.', data_type='string', allowed_values=['NASA', ], default='NASA'), LiteralInput('variable', 'Variable', abstract='Choose a variable like sic.', data_type='string', allowed_values=['sic', ], default='sic'), LiteralInput('ncenters', 'Number of Centers', abstract='Choose a number of centers.', data_type='integer', default='4'), LiteralInput('cluster_method', 'Cluster Method', abstract='Choose a cluster method.', data_type='string', allowed_values=['kmeans', ], default='kmeans'), LiteralInput('eofs', 'EOFS', abstract='Choose EOFS.', data_type='boolean', default='0'), LiteralInput('detrend', 'detrend', abstract='Choose a detrend.', data_type='integer', default='2'), LiteralInput('experiment', 'Experiment', abstract='Choose an experiment.', data_type='string', allowed_values=['historical', 'rcp26', 'rcp85'], default='historical'), ] outputs = [ ComplexOutput('output', 'Output plot', abstract='Generated output plot of ESMValTool processing.', as_reference=True, supported_formats=[Format('image/png')]), ] super(RMSE, self).__init__( self._handler, identifier="rmse", title="Modes of variability", version=runner.VERSION, abstract="Tool to compute 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('ESMValTool', 'http://www.esmvaltool.org/'), Metadata('Documentation', 'https://copernicus-wps-demo.readthedocs.io/en/latest/processes.html#rmse', role=util.WPS_ROLE_DOC), Metadata('Media', util.diagdata_url() + '/modes_of_variability/era_interim_1990-01-2010-01_clusters.png', role=util.WPS_ROLE_MEDIA), Metadata('Diagnostic Description', util.diagdata_url() + '/modes_of_variability/description.md', role=util.MAGIC_ROLE_DOC), Metadata('Diagnostic Metadata', util.diagdata_url() + '/modes_of_variability/modes_of_variability.yml', role=util.MAGIC_ROLE_METADATA), ], inputs=inputs, outputs=outputs, status_supported=True, store_supported=True)