metno / pyaerocom

Python tools for climate and air quality model evaluation
https://pyaerocom.readthedocs.io/
GNU General Public License v3.0
25 stars 13 forks source link

illogical signatures and input tests in mscw/addtional-variables #1240

Closed heikoklein closed 3 months ago

heikoklein commented 3 months ago

Describe the bug Several functions in https://github.com/metno/pyaerocom/blob/main-dev/pyaerocom/io/mscw_ctm/additional_variables.py have illogical signatures and/or input-parameter tests, all marked with # pragma: no cover.

Some minor cases, which are stricter than really required:

avaldebe commented 3 months ago

xr.DataArray is a mutable object. Therefore, we should be careful to not to modify the input variable. Also, some of these functions would benefit from an assertion on the input units