File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff 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" }:
You can’t perform that action at this time.
0 commit comments