Skip to content

Commit 02d9ae4

Browse files
schluchcChristian Schluchter
andauthored
get rid of obsolete parameters (#63)
Co-authored-by: Christian Schluchter <[email protected]>
1 parent bf1bc8e commit 02d9ae4

File tree

9 files changed

+16
-19
lines changed

9 files changed

+16
-19
lines changed

examples/00_timeseries.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,16 +8,15 @@ def time_series_example(username: str, password: str, _logger):
88
enddate_ts = startdate_ts + dt.timedelta(days=1)
99
interval_ts = dt.timedelta(hours=1)
1010
coordinates_ts = [(47.249297, 9.342854), (50., 10.)]
11-
parameters_ts = ['t_2m:C', 'rr_1h:mm']
11+
parameters_ts = ['t_2m:C', 'precip_1h:mm']
1212
model = 'mix'
1313
ens_select = None # e.g. 'median'
1414
cluster_select = None # e.g. "cluster:1", see http://api.meteomatics.com/API-Request.html#cluster-selection
15-
interp_select = 'gradient_interpolation'
1615

1716
_logger.info("\ntime series:")
1817
try:
1918
df_ts = api.query_time_series(coordinates_ts, startdate_ts, enddate_ts, interval_ts, parameters_ts,
20-
username, password, model, ens_select, interp_select,
19+
username, password, model, ens_select,
2120
cluster_select=cluster_select)
2221
_logger.info("Dataframe head \n" + df_ts.head().to_string())
2322
except Exception as e:

examples/01_grid.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,8 @@ def grid_example(username: str, password: str, _logger):
88
lon_W = -15
99
lat_S = 20
1010
lon_E = 10
11-
res_lat = 3
12-
res_lon = 3
11+
res_lat = 1
12+
res_lon = 1
1313
startdate_grid = dt.datetime.utcnow().replace(hour=0, minute=0, second=0, microsecond=0)
1414
parameter_grid = 'evapotranspiration_1h:mm' # 't_2m:C'
1515

examples/02_unpivoted_grid.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,9 @@ def unpivoted_grid_example(username: str, password: str, _logger):
88
lon_W = -15
99
lat_S = 20
1010
lon_E = 10
11-
res_lat = 3
12-
res_lon = 3
13-
parameters_grid_unpiv = ['t_2m:C', 'rr_1h:mm']
11+
res_lat = 1
12+
res_lon = 1
13+
parameters_grid_unpiv = ['t_2m:C', 'precip_1h:mm']
1414
valid_dates_unpiv = [dt.datetime.utcnow(), dt.datetime.utcnow() + dt.timedelta(days=1)]
1515

1616
_logger.info("\nunpivoted grid:")

examples/03_grid_timeseries.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ def grid_time_series_example(username: str, password: str, _logger):
1313
startdate_ts = dt.datetime.utcnow().replace(hour=0, minute=0, second=0, microsecond=0)
1414
enddate_ts = startdate_ts + dt.timedelta(days=1)
1515
interval_ts = dt.timedelta(hours=1)
16-
parameters_ts = ['t_2m:C', 'rr_1h:mm']
16+
parameters_ts = ['t_2m:C', 'precip_1h:mm']
1717

1818
_logger.info("\ngrid timeseries:")
1919
try:

examples/04_grid_png.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,8 @@ def grid_png_example(username: str, password: str, _logger):
88
lon_W = -15
99
lat_S = 20
1010
lon_E = 10
11-
res_lat = 3
12-
res_lon = 3
11+
res_lat = 0.1
12+
res_lon = 0.1
1313
filename_png = "grid_target.png"
1414
startdate_png = dt.datetime.utcnow().replace(hour=0, minute=0, second=0, microsecond=0)
1515
parameter_png = 't_2m:C'

examples/05_lighning_strokes.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
import meteomatics.api as api
44

55

6-
def grid_png_example(username: str, password: str, _logger):
6+
def lightning_strokes_example(username: str, password: str, _logger):
77
startdate_l = dt.datetime.utcnow() - dt.timedelta(days=1)
88
enddate_l = dt.datetime.utcnow() - dt.timedelta(minutes=5)
99
lat_N_l = 90
@@ -23,4 +23,4 @@ def grid_png_example(username: str, password: str, _logger):
2323

2424

2525
if __name__ == "__main__":
26-
run_example(grid_png_example)
26+
run_example(lightning_strokes_example)

examples/13_using_proxy.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,11 +8,10 @@ def time_series_example_using_proxy(username: str, password: str, _logger):
88
enddate_ts = startdate_ts + dt.timedelta(days=1)
99
interval_ts = dt.timedelta(hours=1)
1010
coordinates_ts = [(47.249297, 9.342854), (50., 10.)]
11-
parameters_ts = ['t_2m:C', 'rr_1h:mm']
11+
parameters_ts = ['t_2m:C', 'precip_1h:mm']
1212
model = 'mix'
1313
ens_select = None # e.g. 'median'
1414
cluster_select = None # e.g. "cluster:1", see http://api.meteomatics.com/API-Request.html#cluster-selection
15-
interp_select = 'gradient_interpolation'
1615
proxies = {
1716
'http': 'http://localhost:8080',
1817
'https': 'https://localhost:8080',
@@ -23,7 +22,7 @@ def time_series_example_using_proxy(username: str, password: str, _logger):
2322
_logger.info("\ntime series:")
2423
try:
2524
df_ts = api.query_time_series(coordinates_ts, startdate_ts, enddate_ts, interval_ts, parameters_ts,
26-
username, password, model, ens_select, interp_select,
25+
username, password, model, ens_select,
2726
cluster_select=cluster_select)
2827
_logger.info("Dataframe head \n" + df_ts.head().to_string())
2928
except Exception as e:

examples/14_timeseries_with_init_date.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,13 +12,12 @@ def time_series_example(username: str, password: str, _logger):
1212
model = 'ecmwf-ifs'
1313
ens_select = None # e.g. 'median'
1414
cluster_select = None # e.g. "cluster:1", see http://api.meteomatics.com/API-Request.html#cluster-selection
15-
interp_select = 'gradient_interpolation'
1615

1716
_logger.info("\ntime series:")
1817
try:
1918
# init_date goes as part of kwargs of the function and is added to the final URL
2019
df_ts = api.query_time_series(coordinates_ts, startdate_ts, enddate_ts, interval_ts, parameters_ts,
21-
username, password, model, ens_select, interp_select,
20+
username, password, model, ens_select,
2221
cluster_select=cluster_select, init_date="2022-05-19T00Z")
2322
_logger.info("Dataframe head \n" + df_ts.head().to_string())
2423
except Exception as e:

meteomatics/__version__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
# -*- coding: utf-8 -*-
22

3-
__version__ = "2.8.1"
3+
__version__ = "2.8.2"

0 commit comments

Comments
 (0)