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

enable variable ratpm10pm25 via aeroval #641

Merged
merged 10 commits into from
May 20, 2022
5 changes: 4 additions & 1 deletion pyaerocom/access_testdata.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
from traceback import format_exc

import requests

from pyaerocom import const
from pyaerocom.io import (
ReadAeronetInvV3,
Expand All @@ -22,7 +23,9 @@

class AccessTestData:
#: That's were the testdata can be downloaded from
URL_TESTDATA = "https://pyaerocom-ng.met.no/pyaerocom-suppl/testdata-minimal.tar.gz.ebas_202201"
URL_TESTDATA = (
"https://pyaerocom-ng.met.no/pyaerocom-suppl/testdata-minimal.tar.gz.ebas_202201"
)

#: Directory where testdata will be downloaded into
BASEDIR_DEFAULT = const.OUTPUTDIR
Expand Down
14 changes: 14 additions & 0 deletions pyaerocom/data/variables.ini
Original file line number Diff line number Diff line change
Expand Up @@ -5283,3 +5283,17 @@ minimum = -150
maximum = 150
dimensions = time,lev,station
comments_and_purpose = For physics evaluation and chemistry interpretation above stations' locations.

[ratpm10pm25]
description = ratio of pm10 and pm25
unit = 1
minimum = -150
maximum = 150
dimensions = time,lat,lon

[ratpm25pm10]
description = ratio of pm25 and pm10
unit = 1
minimum = -150
maximum = 150
dimensions = time,lat,lon
jgriesfeller marked this conversation as resolved.
Show resolved Hide resolved
4 changes: 4 additions & 0 deletions pyaerocom/units_helpers.py
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,10 @@
["concoa", "ug C/m3", "ug m-3", 1.0],
["concoc", "ug C/m3", "ug m-3", 1.0],
["conctc", "ug C/m3", "ug m-3", 1.0],
# a little hacky for ratpm10pm25...
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Needed because pyaerocom always tries to convert evrerything into the target unit first

# ["ratpm10pm25", "ug m-3", "1", 1.0],
["concpm25", "ug m-3", "1", 1.0],
["concpm10", "ug m-3", "1", 1.0],
jgriesfeller marked this conversation as resolved.
Show resolved Hide resolved
["concno2", "ug N/m3", "ug m-3", M_NO2 / M_N],
# ["concno3", "ug N/m3", "ug m-3", M_NO3 / M_N],
["concnh3", "ug N/m3", "ug m-3", M_NH3 / M_N],
Expand Down