diff --git a/pyaerocom/aeroval/_processing_base.py b/pyaerocom/aeroval/_processing_base.py index a22570d54..45f1ec544 100644 --- a/pyaerocom/aeroval/_processing_base.py +++ b/pyaerocom/aeroval/_processing_base.py @@ -114,10 +114,7 @@ def get_colocator(self, model_name: str = None, obs_name: str = None) -> Colocat Colocator """ - # LB: In general I don't like what this function is doing. Ideally define the Colocator object once and just use that. - col_cfg = { - **self.cfg.colocation_opts.model_dump() - } # LB: obs_vars is a list, should be a tuple + col_cfg = {**self.cfg.colocation_opts.model_dump()} outdir = self.cfg.path_manager.get_coldata_dir() col_cfg["basedir_coldata"] = outdir @@ -127,7 +124,7 @@ def get_colocator(self, model_name: str = None, obs_name: str = None) -> Colocat if model_name: mod_cfg = self.cfg.get_model_entry(model_name) - col_cfg["model_cfg"] = mod_cfg # LB: this is untested and just a guess at this point + col_cfg["model_cfg"] = mod_cfg # LB: Hack and at what lowlevel_helpers's import_from was doing for key, val in mod_cfg.items(): @@ -143,11 +140,6 @@ def get_colocator(self, model_name: str = None, obs_name: str = None) -> Colocat if key in ColocationSetup.model_fields: col_cfg[key] = val - # col_stp = ColocationSetup(**col_cfg) - # col = Colocator(col_stp) - # col_cfg.add_meta - # col.import_from(obs_cfg) # LB: This is functionality might be needed. Want to get keys from the obs_cfg into ColocationSetup. - # col.colocation_setup.add_glob_meta(diurnal_only=self._get_diurnal_only(obs_name)) col_cfg["add_meta"].update(diurnal_only=self._get_diurnal_only(obs_name)) col_stp = ColocationSetup(**col_cfg) diff --git a/pyaerocom/aeroval/setupclasses.py b/pyaerocom/aeroval/setupclasses.py index a7f18959d..6652aae78 100644 --- a/pyaerocom/aeroval/setupclasses.py +++ b/pyaerocom/aeroval/setupclasses.py @@ -52,7 +52,7 @@ class OutputPaths(BaseModel): project ID exp_id : str experiment ID - json_basedir : str + json_basedir : str, Path """ diff --git a/pyaerocom/colocation_setup.py b/pyaerocom/colocation_setup.py index 3e26e72fe..ba010536c 100644 --- a/pyaerocom/colocation_setup.py +++ b/pyaerocom/colocation_setup.py @@ -72,7 +72,7 @@ class ColocationSetup(BaseModel): is ignored and only the config is used. obs_id : str ID of observation network to be used. - obs_vars : list + obs_vars : tuple[str, ...] Variables to be analysed (need to be available in input obs dataset). Variables that are not available in the model data output will be skipped. Alternatively, model variables to be used for a given obs @@ -97,7 +97,7 @@ class ColocationSetup(BaseModel): (to be precise, if None, then :attr:`pyaerocom.const.DEFAULT_REG_FILTER` is used which should default to `ALL-wMOUNTAINS`, that is, no filtering). - basedir_coldata : str + basedir_coldata : str | Path Base directory for storing of colocated data files. save_coldata : bool if True, colocated data objects are saved as NetCDF file.