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

Avoid ebas files for carbon-component with pure statistics #1341

Merged
merged 2 commits into from
Sep 12, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions pyaerocom/data/ebas_config.ini
Original file line number Diff line number Diff line change
Expand Up @@ -178,6 +178,7 @@ matrix=aerosol,pm10,pm25
component=elemental_carbon
instrument=denuder,ecoc_monitor,filter_1pack,filter_2pack,high_vol_sampler,impactor,low_vol_sampler,lvs_denuder_single,lvs_denuder_tandem,lvs_QBQ,lvs_single,lvs_single_twin,lvs_teflon
matrix=pm25,pm10,pm1,aerosol
statistics=arithmetic mean,median

[conceqbc]
component=equivalent_black_carbon
Expand All @@ -188,35 +189,42 @@ matrix=aerosol,pm1,pm10,pm25
component=elemental_carbon
# after discussion with Wenche
matrix=pm25,pm10,aerosol,pm1
statistics=arithmetic mean,median

[concCecpm25]
component=elemental_carbon
matrix=pm25,pm1
statistics=arithmetic mean,median

[conctc]
component=total_carbon
# after discussion with Wenche
matrix=pm25,pm10,aerosol
statistics=arithmetic mean,median

[concoa]
component=organic_carbon
# after discussion with Wenche
matrix=pm25,pm10,aerosol,pm1
scale_factor=1.4
statistics=arithmetic mean,median

[concoc]
component=organic_carbon
# after discussion with Wenche
matrix=pm25,pm10,aerosol,pm1
statistics=arithmetic mean,median

[concCoc]
component=organic_carbon
# after discussion with Wenche
matrix=pm25,pm10,aerosol,pm1
statistics=arithmetic mean,median

[concCocpm25]
component=organic_carbon
matrix=pm25,pm1
statistics=arithmetic mean,median

[concss]
component=sodium
Expand Down Expand Up @@ -432,10 +440,12 @@ matrix=precip
[concCocpm10]
component=organic_carbon
matrix=pm10
statistics=arithmetic mean,median

[concCecpm10]
component=elemental_carbon
matrix=pm10
statistics=arithmetic mean,median

# CAMS2_40 Task4041

Expand Down Expand Up @@ -466,6 +476,7 @@ matrix=air
[concCoc25]
component=organic_carbon
matrix=pm25,pm1
statistics=arithmetic mean,median

[concom25]
component=organic_mass
Expand Down
93 changes: 83 additions & 10 deletions tests/io/test_ebas_varinfo.py
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,15 @@
None,
1.0,
),
("ac550dryaer", None, None, ["filter_absorption_photometer"], None, ["ac550aer", "acrh"], 1),
(
"ac550dryaer",
None,
None,
["filter_absorption_photometer"],
None,
["ac550aer", "acrh"],
1,
),
(
"ac550lt1aer",
["aerosol_absorption_coefficient"],
Expand Down Expand Up @@ -115,8 +123,24 @@
("concso2", ["sulphur_dioxide"], ["air"], None, None, None, 1.0),
("concpm10", ["pm10_mass"], ["pm10"], None, None, None, 1.0),
("concpm25", ["pm25_mass"], ["pm25"], None, None, None, 1.0),
("concso4t", ["sulphate_total"], ["aerosol", "pm10", "pm25"], None, None, None, 1.0),
("concso4c", ["sulphate_corrected"], ["aerosol", "pm10", "pm25"], None, None, None, 1.0),
(
"concso4t",
["sulphate_total"],
["aerosol", "pm10", "pm25"],
None,
None,
None,
1.0,
),
(
"concso4c",
["sulphate_corrected"],
["aerosol", "pm10", "pm25"],
None,
None,
None,
1.0,
),
(
"concbc",
["elemental_carbon"],
Expand All @@ -136,7 +160,7 @@
"lvs_single_twin",
"lvs_teflon",
],
None,
["arithmetic mean", "median"],
None,
1.0,
),
Expand All @@ -149,19 +173,67 @@
None,
1,
),
("conctc", ["total_carbon"], ["pm25", "pm10", "aerosol"], None, None, None, 1.0),
("concoa", ["organic_carbon"], ["pm25", "pm10", "aerosol", "pm1"], None, None, None, 1.4),
("concoc", ["organic_carbon"], ["pm25", "pm10", "aerosol", "pm1"], None, None, None, 1),
("concss", ["sodium"], ["pm10", "aerosol", "pm25", "pm1", "air"], None, None, None, 3.27),
(
"conctc",
["total_carbon"],
["pm25", "pm10", "aerosol"],
None,
["arithmetic mean", "median"],
None,
1.0,
),
(
"concoa",
["organic_carbon"],
["pm25", "pm10", "aerosol", "pm1"],
None,
["arithmetic mean", "median"],
None,
1.4,
),
(
"concoc",
["organic_carbon"],
["pm25", "pm10", "aerosol", "pm1"],
None,
["arithmetic mean", "median"],
None,
1,
),
(
"concss",
["sodium"],
["pm10", "aerosol", "pm25", "pm1", "air"],
None,
None,
None,
3.27,
),
("concnh3", ["ammonia"], ["air"], None, None, None, 1.0),
("concno3", ["nitrate"], ["pm10", "aerosol", "pm25"], None, None, None, 1.0),
("concnh4", ["ammonium"], ["pm10", "aerosol", "pm25"], None, None, None, 1.0),
("concNhno3", ["nitric_acid"], ["air"], None, None, None, 1.0),
("concNtno3", ["sum_nitric_acid_and_nitrate"], ["air+aerosol"], None, None, None, 1.0),
(
"concNtno3",
["sum_nitric_acid_and_nitrate"],
["air+aerosol"],
None,
None,
None,
1.0,
),
("concno2", ["nitrogen_dioxide"], ["air"], None, None, None, 1.0),
("conco3", ["ozone"], ["air"], None, None, None, 1),
("concco", ["carbon_monoxide"], ["air"], None, None, None, 1.0),
("concprcpoxs", ["sulphate_corrected", "sulphate_total"], ["precip"], None, None, None, 1.0),
(
"concprcpoxs",
["sulphate_corrected", "sulphate_total"],
["precip"],
None,
None,
None,
1.0,
),
("concprcpoxn", ["nitrate"], ["precip"], None, None, None, 1.0),
("concprcprdn", ["ammonium"], ["precip"], None, None, None, 1.0),
("wetoxs", None, None, None, None, ["concprcpoxs"], 1),
Expand Down Expand Up @@ -221,6 +293,7 @@ def test_varinfo(
assert info.component == component
assert info.matrix == matrix
assert info.instrument == instrument
print(info.statistics, statistics, info.statistics == statistics)
assert info.statistics == statistics
assert info.requires == requires
assert info.scale_factor == scale_factor
Expand Down