Giter Club home page Giter Club logo

informatics-lab.beta-data-services's Introduction

betadataservices

Python wrapper for sending and receiving requests to Met Office Beta Data Services (BDS). This module requires webcoverageservice which can be installed from https://github.com/met-office-lab/ogc-web-services

To validate the requests an API key is needed, which must be registered with BDS. A key can be received by registering with Met Office DataPoint and following the link to "Your DataPoint API key". Currently, this gives you access to DataPoint data only. Contact the BDS team at the Met Office to have this key registered to get access the BDS data.

Requests can be made through WCS1 or WCS2 requests with the WCS1Requester and WCS2Requester classes. These classes both include methods for the basic request types:

  • getCapabilities()
  • describeCoverage()
  • getCoverage() - Note, arguments differ between WCS1 and WCS2.

WCS2Requester also includes:

  • describeCoverageCollection()

Example use:

import betadataservices as bds

bds.available_model_feeds()

EGloEGRR
UKPPBEST
UKPPNOW
EURO4
GlobEGRR

req = bds.WCS2Requester(api_key="your-datapoint-api-key-1234",
                        model_feed="UKPPBEST")
# Print out all available coverages.
req.getCapabilities()

UKPPBEST_2015-06-23T03.00.00Z_AGL
UKPPBEST_2015-06-23T03.00.00Z_Atmosphere
UKPPBEST_2015-06-23T03.00.00Z_CloudBase
UKPPBEST_2015-06-23T03.00.00Z_Ground
UKPPBEST_2015-06-23T06.00.00Z_AGL
UKPPBEST_2015-06-23T06.00.00Z_Atmosphere
UKPPBEST_2015-06-23T06.00.00Z_CloudBase
UKPPBEST_2015-06-23T06.00.00Z_Ground
etc..

# Take a coverage name and print out available parameters for it.
req.describeCoverage("UKPPBEST_2015-06-23T06.00.00Z_AGL")

*** NAME ***
UKPPBEST_2015-06-23T06.00.00Z_AGL

*** COMPONENTS ***
Temperature
Visibility
Wind_Direction
Wind_Gust_Speed
Wind_Speed

*** BBOX ***
-14.0, 47.5, 7.0, 61.0

*** DIM_RUNS ***
2015-06-23T06:00:00Z

# Get the coverage data and save to file.
req.getCoverage(coverage_id="UKPPBEST_2015-06-23T06.00.00Z_AGL",
                components="Temperature",
                format="NetCDF3",
                savepath="path/to/save.nc")

informatics-lab.beta-data-services's People

Contributors

jacobtomlinson avatar niallrobinson avatar simonstanley avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.