Skip to main content
Join the official 2019 Python Developers SurveyStart the survey!

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


Release history Release notifications

This version

0.0.1

Download files

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

Files for cdstoolbox-remote, version 0.0.1
Filename, size File type Python version Upload date Hashes
Filename, size cdstoolbox_remote-0.0.1-py3-none-any.whl (3.1 kB) File type Wheel Python version py3 Upload date Hashes View hashes
Filename, size cdstoolbox-remote-0.0.1.tar.gz (2.9 kB) File type Source Python version None Upload date Hashes View hashes

Supported by

Elastic Elastic Search Pingdom Pingdom Monitoring Google Google BigQuery Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN SignalFx SignalFx Supporter DigiCert DigiCert EV certificate StatusPage StatusPage Status page