Skip to main content

Experimental tool to run a workflow on the CDS Toolbox remotely

Project description

Experimental tool to run a workflow on the CDS Toolbox remotely.

Install

Install via pip with:

$ pip install cdstoolbox-remote

Configure

If you are not already registered to the CDS, register here:

https://cds.climate.copernicus.eu/user/register

then log in the CDS and configure the cdsapi library following the instructions at:

https://cds.climate.copernicus.eu/api-how-to

Usage

Write a valid CDS Toolbox workflow to the file test-wf.py:

import cdstoolbox as ct

@ct.application(title='Hello World!')
@ct.output.figure()
@ct.output.download()
def application():

    data = ct.catalogue.retrieve(
        'seasonal-monthly-single-levels',
        {
            'originating_centre': 'ecmwf',
            'variable': '2m_temperature',
            'product_type': 'ensemble_mean',
            'year': '2018',
            'month': ['02'],
            'leadtime_month': ['1'],
        }
    )

    fig = ct.cdsplot.geomap(
        data, pcolormesh_kwargs={'cmap': 'RdBu_r'}, title='Mean {long_name}',
        projection=ct.cdsplot.crs.Robinson()
    )

    return fig, data

Then run the worflow remotely with:

$ python test-wf.py

License

Copyright 2019 European Centre for Medium-Range Weather Forecasts (ECMWF)

Licensed under the Apache License, Version 2.0 (the “License”); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an “AS IS” BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

In applying this licence, ECMWF does not waive the privileges and immunities granted to it by virtue of its status as an intergovernmental organisation nor does it submit to any jurisdiction.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

cdstoolbox-remote-0.0.1.tar.gz (2.9 kB view hashes)

Uploaded Source

Built Distribution

cdstoolbox_remote-0.0.1-py3-none-any.whl (3.1 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page