source: flex_extract.git/test/testecmwfapi.py @ 87ae9a3

ctbtodev
Last change on this file since 87ae9a3 was 00439c0, checked in by Anne Philipp <anne.philipp@…>, 5 years ago

first test for ECMWFAPI package

  • Property mode set to 100644
File size: 1.2 KB
Line 
1#!/usr/bin/env python
2# -*- coding: utf-8 -*-
3
4
5import pytest
6from ecmwfapi import ECMWFDataServer
7from ecmwfapi import ECMWFService
8
9class TestECMWFApi:
10    """
11    """
12
13    def test_public():
14        server = ECMWFDataServer()
15
16        server.retrieve({'dataset' : "interim",
17                         'time'    : "00",
18                         'date'    : "2013-09-01/to/2013-09-30",
19                         'step'    : "0",
20                         'type'    : "an",
21                         'levtype' : "sfc",
22                         'param'   : "165.128/41.128",
23                         'grid'    : "0.75/0.75",
24                         'target'  : "interim201309.grib"
25                        })
26
27    def test_member():
28        server = ECMWFService("mars")
29
30        server.execute({'class'   : "ei",
31                        'time'    : "00",
32                        'date'    : "2013-09-01/to/2013-09-30",
33                        'step'    : "0",
34                        'type'    : "an",
35                        'levtype' : "sfc",
36                        'param'   : "165.128/41.128",
37                        'grid'    : "0.75/0.75"},
38                       "interim201309.grib")
39
Note: See TracBrowser for help on using the repository browser.
hosted by ZAMG