pyaerocom icon indicating copy to clipboard operation
pyaerocom copied to clipboard

aeroval contour plotting: variable aliases are not supported

Open jgriesfeller opened this issue 2 years ago • 3 comments

The aeroval contour plotting does not support model data that has been read via a variable alias defined in aliases.ini(https://github.com/metno/pyaerocom/blob/main-dev/pyaerocom/data/aliases.ini).

details and example config will follow

jgriesfeller avatar Nov 15 '23 10:11 jgriesfeller

to reproduce one has to add the line concCocpm25 = concCoc25 to aliases.ini, then run aeroval e.g. on the model EMEP.cams2.40.p2 with the variable concCocpm25

The error is then this:

 File "/home/jang/data/Python3/pyaerocom/pyaerocom/aeroval/experiment_processor.py", line 129, in run
    engine.run(model_list=model_list, var_list=var_list)
  File "/home/jang/data/Python3/pyaerocom/pyaerocom/aeroval/modelmaps_engine.py", line 46, in run
    files = self._run_model(model, var_list)
            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/jang/data/Python3/pyaerocom/pyaerocom/aeroval/modelmaps_engine.py", line 85, in _run_model
    _files = self._process_map_var(model_name, var, self.reanalyse_existing)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/jang/data/Python3/pyaerocom/pyaerocom/aeroval/modelmaps_engine.py", line 130, in _process_map_var
    check_var_ranges_avail(data, var)
  File "/home/jang/data/Python3/pyaerocom/pyaerocom/aeroval/helpers.py", line 58, in check_var_ranges_avail
    raise ValueError(
ValueError: Mismatch between variable name of input model_data (concCoc25) and var_name concCocpm25

coming from here (which does not test for aliases): https://github.com/metno/pyaerocom/blob/89501477f70e4d47ef994e7e2d71e6b37839683d/pyaerocom/aeroval/helpers.py#L55

jgriesfeller avatar Nov 15 '23 12:11 jgriesfeller

duplicate to #902. Closing therefore.

jgriesfeller avatar Dec 04 '23 11:12 jgriesfeller

wrong issue closed

jgriesfeller avatar Dec 04 '23 11:12 jgriesfeller

This issue is stale because it has been open for 365 days with no activity. This issue will be closed in 14 days if no action is taken.

github-actions[bot] avatar Jan 15 '25 01:01 github-actions[bot]

This issue was closed because it has been inactive for 14 days since being marked as stale.

github-actions[bot] avatar Jan 30 '25 01:01 github-actions[bot]