@@ -75,7 +75,8 @@ def get_meteonorm(latitude, longitude, start, end, api_key, endpoint,
7575 Orientation (azimuth angle) of the (fixed) plane. Clockwise from north
7676 (north=0, east=90, south=180, west=270).
7777 time_step : {'1min', '15min', '1h'}, default : '15min'
78- Frequency of the time series.
78+ Frequency of the time series. The endpoint ``'forecast/basic'`` only
79+ supports ``time_step='1h'``.
7980 horizon : str or list, default : 'auto'
8081 Specification of the horizon line. Can be either 'flat', 'auto', or
8182 a list of 360 integer horizon elevation angles.
@@ -158,6 +159,10 @@ def get_meteonorm(latitude, longitude, start, end, api_key, endpoint,
158159
159160 if 'basic' not in endpoint :
160161 params ['frequency' ] = TIME_STEP_MAP .get (time_step , time_step )
162+ else :
163+ if time_step not in ['1h' , '1_hour' ]:
164+ raise ValueError ("The 'forecast/basic' api endpoint only "
165+ "supports ``time_step='1h'``." )
161166
162167 headers = {"Authorization" : f"Bearer { api_key } " }
163168
@@ -180,7 +185,7 @@ def get_meteonorm(latitude, longitude, start, end, api_key, endpoint,
180185def get_meteonorm_tmy (latitude , longitude , api_key ,
181186 parameters = 'all' , * , surface_tilt = 0 ,
182187 surface_azimuth = 180 , time_step = '1h' , horizon = 'auto' ,
183- terrain = 'open' , albedo = None , turbidity = 'auto' ,
188+ terrain_situation = 'open' , albedo = None , turbidity = 'auto' ,
184189 random_seed = None , clear_sky_radiation_model = 'esra' ,
185190 data_version = 'latest' , future_scenario = None ,
186191 future_year = None , interval_index = False ,
@@ -212,7 +217,7 @@ def get_meteonorm_tmy(latitude, longitude, api_key,
212217 Specification of the horizon line. Can be either 'flat' or 'auto', or
213218 specified as a list of 360 integer horizon elevation angles.
214219 'auto'.
215- terrain : str, default : 'open'
220+ terrain_situation : str, default : 'open'
216221 Local terrain situation. Must be one of: ['open', 'depression',
217222 'cold_air_lake', 'sea_lake', 'city', 'slope_south',
218223 'slope_west_east'].
@@ -279,7 +284,7 @@ def get_meteonorm_tmy(latitude, longitude, api_key,
279284 'frequency' : TIME_STEP_MAP .get (time_step , time_step ),
280285 'parameters' : parameters ,
281286 'horizon' : horizon ,
282- 'situation' : terrain ,
287+ 'situation' : terrain_situation ,
283288 'turbidity' : turbidity ,
284289 'clear_sky_radiation_model' : clear_sky_radiation_model ,
285290 'data_version' : data_version ,
0 commit comments