Skip to content

Commit 4bfce6a

Browse files
committed
fix pylint too-many-locals
1 parent cce98d4 commit 4bfce6a

1 file changed

Lines changed: 2 additions & 5 deletions

File tree

PyStemmusScope/save.py

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -277,16 +277,13 @@ def to_netcdf(config_file: str, cf_filename: str) -> str:
277277
"Precip": "precip_conv", # Pre
278278
}
279279

280-
# Number of time steps from configuration file
281-
time_steps = config["NumberOfTimeSteps"]
282-
283280
# read forcing file into a dict
284281
forcing_dict = forcing_io.read_forcing_data(
285282
Path(config["ForcingPath"]) / config["ForcingFileName"]
286283
)
287284

288285
# get time info
289-
time = _shorten_data_array(forcing_dict["time"], time_steps)
286+
time = _shorten_data_array(forcing_dict["time"], config["NumberOfTimeSteps"])
290287

291288
# read convention file
292289
conventions = pd.read_csv(cf_filename)
@@ -300,7 +297,7 @@ def to_netcdf(config_file: str, cf_filename: str) -> str:
300297
if alma_name in var_names:
301298
# select data
302299
data_array = _select_forcing_variables(forcing_dict, var_names[alma_name], alma_name)
303-
data_array = _shorten_data_array(data_array, time_steps)
300+
data_array = _shorten_data_array(data_array, config["NumberOfTimeSteps"])
304301

305302
# create data array
306303
elif alma_name in {"SoilTemp", "SoilMoist"}:

0 commit comments

Comments
 (0)