Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DataCoverageError when running pyaeroval ana.run with var_list and multiple obs-setups #1246

Closed
heikoklein opened this issue Jul 7, 2024 · 0 comments · Fixed by #1249
Closed
Labels
bug 🐛 Something isn't working
Milestone

Comments

@heikoklein
Copy link
Member

Describe the bug

  • Pyaerocom version: 0.19++

  • Configuration file (if applicable):
    cfg_emep-ex.py.gz

  • Error message (if applicable):

Traceback (most recent call last):
  File "/home/heikok/Programme/Python/pyaerocom/pyaerocom/colocation/colocator.py", line 369, in run
    vars_to_process = self.prepare_run(var_list)
                      ^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/heikok/Programme/Python/pyaerocom/pyaerocom/colocation/colocator.py", line 340, in prepare_run
    vars_to_process = self._filter_var_matches_varlist(vars_to_process, var_list)
                      ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/heikok/Programme/Python/pyaerocom/pyaerocom/colocation/colocator.py", line 473, in _filter_var_matches_varlist
    _subset = self._filter_var_matches_var_name(vars_to_process, var_name)
              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/heikok/Programme/Python/pyaerocom/pyaerocom/colocation/colocator.py", line 693, in _filter_var_matches_var_name
    raise DataCoverageError(var_name)
pyaerocom.exceptions.DataCoverageError: concNno2

It works in this example if one selects exactly the obs-network by name, e.g. obs_name="EBAS-d-tc", but in setups with more than 2 obs-networks where one wants to select a var_list of two variables from different obs-networks, this approach no longer works. It gets even more complicated, if variables only exist for certain time-steps in different obs-networks or require data from other obs-ids to calculate.

To Reproduce
Steps to reproduce the behavior:

  1. create a configuration with different obs-vars in different obs-setups, here, "EBAS-d-tc" and "EBAS-d-ox"
  2. ensure that ana.run() is working
  3. rerun experiment with only one obs-variable ana.run(var_list=["concNno2"])

Expected behavior
The user can select variables in var_list without specifying the obs-name. The experiment is only run for these variable, and don't give an exeption if this variable is not available in all obs-networks (a warning is ok).

Additional context
Reported by sevaral users, e.g. @michaelgau
Independent of raise_exeptions=True/False

@heikoklein heikoklein added the bug 🐛 Something isn't working label Jul 7, 2024
@heikoklein heikoklein added this to the m2024-08 milestone Jul 7, 2024
@heikoklein heikoklein changed the title DataCoverageError when running pyaeroval ana.run with var_list fails with multiple obs-setups DataCoverageError when running pyaeroval ana.run with var_list and multiple obs-setups Jul 7, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug 🐛 Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant