Skip to content
Snippets Groups Projects
Commit 73ffa9cb authored by Felix Kleinert's avatar Felix Kleinert
Browse files

Merge branch...

Merge branch 'felix_issue287_tech-wrf-datahandler-should-inherit-from-singlestationdatahandler' of ssh://gitlab.version.fz-juelich.de:10022/esde/machine-learning/mlair into felix_issue287_tech-wrf-datahandler-should-inherit-from-singlestationdatahandler
parents f7808a16 d762e40c
No related branches found
No related tags found
1 merge request!259Draft: Resolve "WRF-Datahandler should inherit from SingleStationDatahandler"
...@@ -131,7 +131,7 @@ class BaseWrfChemDataLoader: ...@@ -131,7 +131,7 @@ class BaseWrfChemDataLoader:
def dataset_search_str(self): def dataset_search_str(self):
if (self.start_time is None) and (self.end_time is None): if (self.start_time is None) and (self.end_time is None):
path_list = os.path.join(self.data_path, self.common_file_starter + '*') path_list = os.path.join(self.data_path, self.common_file_starter + '*')
logging.info(f"Reading file(s): {list(path_list)}") logging.info(f"Reading file(s): {path_list}")
return path_list return path_list
elif (self.start_time is not None) and (self.end_time is not None): elif (self.start_time is not None) and (self.end_time is not None):
path_list = set() path_list = set()
...@@ -140,8 +140,9 @@ class BaseWrfChemDataLoader: ...@@ -140,8 +140,9 @@ class BaseWrfChemDataLoader:
self.common_file_starter) + '*' + day.strftime( self.common_file_starter) + '*' + day.strftime(
self.date_format_of_nc_file) + '*' self.date_format_of_nc_file) + '*'
))[0]) ))[0])
logging.info(f"Reading file(s): {list(path_list)}") path_list = sorted(list(path_list))
return list(path_list) logging.info(f"Reading file(s): {path_list}")
return path_list
else: else:
raise ValueError(f"`start_time' and `end_time' must both be given or None.") raise ValueError(f"`start_time' and `end_time' must both be given or None.")
...@@ -526,8 +527,8 @@ class DataHandlerSingleGridColumn(DataHandlerSingleStation): ...@@ -526,8 +527,8 @@ class DataHandlerSingleGridColumn(DataHandlerSingleStation):
rechunk_values=self.rechunk_values, rechunk_values=self.rechunk_values,
variables=self.variables, variables=self.variables,
z_coord_selector=self._joint_z_coord_selector, z_coord_selector=self._joint_z_coord_selector,
start_time=self.start, # start_time=self.start,
end_time=self.end, # end_time=self.end,
date_format_of_nc_file=self.date_format_of_nc_file date_format_of_nc_file=self.date_format_of_nc_file
) )
self.__loader = loader self.__loader = loader
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment