Skip to content
Snippets Groups Projects
Commit d0b5ade5 authored by lukas leufen's avatar lukas leufen
Browse files

new naming for .nc files using keys of statistics per var, remove var_all_dict...

new naming for .nc files using keys of statistics per var, remove var_all_dict due to no usage inside program, check target var and remove unused keys from statistics per var
parent 39a87f3b
No related branches found
No related tags found
2 merge requests!59Develop,!54Lukas issue061 refac seperate input target vars
Pipeline #30909 passed with warnings
...@@ -138,10 +138,12 @@ class DataPrep(object): ...@@ -138,10 +138,12 @@ class DataPrep(object):
return xarr, meta return xarr, meta
def _set_file_name(self): def _set_file_name(self):
return os.path.join(self.path, f"{''.join(self.station)}_{'_'.join(sorted(self.variables))}.nc") all_vars = sorted(self.statistics_per_var.keys())
return os.path.join(self.path, f"{''.join(self.station)}_{'_'.join(all_vars)}.nc")
def _set_meta_file_name(self): def _set_meta_file_name(self):
return os.path.join(self.path, f"{''.join(self.station)}_{'_'.join(sorted(self.variables))}_meta.csv") all_vars = sorted(self.statistics_per_var.keys())
return os.path.join(self.path, f"{''.join(self.station)}_{'_'.join(all_vars)}_meta.csv")
def __repr__(self): def __repr__(self):
return f"Dataprep(path='{self.path}', network='{self.network}', station={self.station}, " \ return f"Dataprep(path='{self.path}', network='{self.network}', station={self.station}, " \
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment