Skip to content

Commit

Permalink
vert_code
Browse files Browse the repository at this point in the history
  • Loading branch information
lewisblake committed Sep 4, 2023
1 parent c57bdfa commit 86e07bd
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 7 deletions.
7 changes: 2 additions & 5 deletions pyaerocom/io/fileconventions.py
Original file line number Diff line number Diff line change
Expand Up @@ -336,11 +336,8 @@ def _info_from_cso(self, filepath: str) -> dict:
f"Failed to extract name from file {basename(filepath)} "
f"using file convention {self.name}"
)
if "atstations" in filepath.lower():
raise Exception(
"Developers: please debug "
"(file convention Aerocom 2 should not have atstations encoded in file name)"
)

# info["vert_code"] = "space"
return info

def get_info_from_file(self, file: str) -> dict:
Expand Down
4 changes: 2 additions & 2 deletions pyaerocom/io/readgridded.py
Original file line number Diff line number Diff line change
Expand Up @@ -1046,7 +1046,7 @@ def filter_query(
msg = ""
exps = subset.experiment.unique()
verts = subset.vert_code.unique()

breakpoint() # LB: ideally shouldn't get to this point
if len(exps) > 1:
msg += f"Found multiple experiments. Choose from: {exps}"
if len(verts) > 1:
Expand Down Expand Up @@ -1525,7 +1525,6 @@ def _get_var_to_read(self, var_name: str) -> str:
raise VarNotAvailableError(f"Variable {var_name} could not be found")

def _eval_vert_which_and_ts_type(self, var_name, vert_which, ts_type):
breakpoint()
if all(x == "" for x in self.file_info.vert_code.values):
logger.info(
f"Deactivating file search by vertical code for {self.data_id}, "
Expand Down Expand Up @@ -1844,6 +1843,7 @@ def _try_read_var(
See :func:`read_var` for description of input arguments.
"""
breakpoint()
if var_name in self._aux_requires and self.check_compute_var(var_name):
return self.compute_var(
var_name=var_name,
Expand Down

0 comments on commit 86e07bd

Please sign in to comment.