Repository: metno/pyaerocom (language: python)

Issue:
Rename coarse to pm10 and fine to pm25
**Describe the bug**
 - Pyaerocom version: up to 0.21.0.dev0

The variable `concso4coarse` is only defined in ebas and in use for the emep-model.
In ebas, it reads from the pm10 or aerosol matrix without subtracting pm25, so it is not coarse.
The emep model does not know about sulphate larger than pm25, neither coarse nor pm10 exists.
The glob_defaults.py rename the concso4coarse to SO4_PM10.

The same is true for `concnh4coarse` and `concsscoarse`.
In the same commit, also the name `fine` was introduced for `concnh4fine` and `concso4fine` which isn't used elsewhere. `fine` should be named consistently `pm25`

**Expected behavior**
concso4coarse is named concso4pm10 everywhere in pyaerocom
coarse is named pm10 in all pyaerocom-names
fine is named pm25 in all pyaerocom-names
concso4coarse/concso4pm10 is no longer used in comparison with the emep-model.



Discussion / hints:
`concsscoarse` will not be touched, all variables `concsspm10` `concsspm25`, `concsscoarse` exist.

- `concso4coarse` -> `concso4pm10` (display text was `SO4 in PM10`)
- `concnh4coarse` -> `concnh4pm10` (display text was `SO4 in PM10`)
- `concso4fine` -> `concso4pm25`
- `concnh4fine` -> `concnh4pm25`

Fix patch:
diff --git a/pyaerocom/aeroval/data/var_web_info.ini b/pyaerocom/aeroval/data/var_web_info.ini
index 5c0311e00..92cc308da 100644
--- a/pyaerocom/aeroval/data/var_web_info.ini
+++ b/pyaerocom/aeroval/data/var_web_info.ini
@@ -374,12 +374,12 @@ menu_name = NO3 PM25
 vertical_type = 3D
 category = Particle concentrations
 
-[concnh4coarse]
+[concnh4pm10]
 menu_name = NH4 PM10
 vertical_type = 3D
 category = Particle concentrations
 
-[concnh4fine]
+[concnh4pm25]
 menu_name = NH4 PM2.5
 vertical_type = 3D
 category = Particle concentrations
@@ -394,12 +394,12 @@ menu_name = SO4 sea salt corrected
 vertical_type = 3D
 category = Particle concentrations
 
-[concso4coarse]
+[concso4pm10]
 menu_name = SO4 PM10
 vertical_type = 3D
 category = Particle concentrations
 
-[concso4fine]
+[concso4pm25]
 menu_name = SO4 PM2.5
 vertical_type = 3D
 category = Particle concentrations
diff --git a/pyaerocom/data/ebas_config.ini b/pyaerocom/data/ebas_config.ini
index 0e323a68c..e9014b9fa 100644
--- a/pyaerocom/data/ebas_config.ini
+++ b/pyaerocom/data/ebas_config.ini
@@ -116,12 +116,12 @@ component=sulphate_corrected,sulphate_total
 # after discussion with Wenche
 matrix=aerosol,pm10,pm25
 
-[concso4coarse]
+[concso4pm10]
 component=sulphate_corrected,sulphate_total
 # after discussion with Wenche
 matrix=aerosol,pm10
 
-[concso4fine]
+[concso4pm25]
 component=sulphate_corrected,sulphate_total
 # after discussion with Wenche
 matrix=pm25, pm1
@@ -131,14 +131,6 @@ component=sulphate_corrected,sulphate_total
 # after discussion with Wenche
 matrix=aerosol,pm10,pm25
 
-[concso4pm10]
-component=sulphate_corrected,sulphate_total
-matrix=pm10
-
-[concso4pm25]
-component=sulphate_corrected,sulphate_total
-matrix=pm25
-
 [concso2]
 component=sulphur_dioxide
 # main-air-chem,
@@ -268,11 +260,11 @@ matrix=pm25,pm1
 component=ammonium
 matrix=pm10,aerosol,pm25
 
-[concnh4coarse]
+[concnh4pm10]
 component=ammonium
 matrix=pm10,aerosol
 
-[concnh4fine]
+[concnh4pm25]
 component=ammonium
 matrix=pm25,pm1
 
@@ -625,4 +617,4 @@ requires=vmro3
 requires=concprcpoxs
 
 [proxywetpm25]
-requires=concprcpoxs
\ No newline at end of file
+requires=concprcpoxs
diff --git a/pyaerocom/data/emep_variables.ini b/pyaerocom/data/emep_variables.ini
index c828f6bba..4523ad0a8 100644
--- a/pyaerocom/data/emep_variables.ini
+++ b/pyaerocom/data/emep_variables.ini
@@ -55,8 +55,7 @@ concdust = "SURF_ug_DUST"
 conchno3 = "SURF_ug_HNO3"
 concnh3 = "SURF_ug_NH3"
 concnh4 = "SURF_ug_NH4_F"
-concnh4coarse = "SURF_ug_NH4_F"
-concnh4fine = "SURF_ug_NH4_F"
+concnh4pm25 = "SURF_ug_NH4_F"
 concno2 = "SURF_ug_NO2"
 concno3c = "SURF_ug_NO3_C"
 concno3f = "SURF_ug_NO3_F"
@@ -70,8 +69,7 @@ concrdn = "SURF_ugN_RDN"
 concso2 = "SURF_ug_SO2"
 concso4 = "SURF_ug_SO4"
 concso4c = "SURF_ug_SO4"
-concso4coarse = "SURF_ug_SO4"
-concso4fine = "SURF_ug_SO4"
+concso4pm25 = "SURF_ug_SO4"
 concss = "SURF_ug_SS"
 # concsspm25=SURF_ug_SEASALT_F
 concssf = "SURF_ug_SEASALT_F"
@@ -108,4 +106,4 @@ concoxn = "SURF_ugN_OXN"
 vmrno = "SURF_ppb_NO"
 
 #Data used for Pollen data
-concspores = "SURF_ug_FUNGAL_SPORES"
\ No newline at end of file
+concspores = "SURF_ug_FUNGAL_SPORES"
diff --git a/pyaerocom/data/variables.ini b/pyaerocom/data/variables.ini
index 23dd82cb5..8183349da 100644
--- a/pyaerocom/data/variables.ini
+++ b/pyaerocom/data/variables.ini
@@ -2772,26 +2772,18 @@ var_type = mass concentration
 description=Mass concentration of sulphate
 unit = ug m-3
 
-[concso4coarse]
-description=Mass concentration of sulphate
+[concso4pm10]
+description=Mass concentration of sulphate in PM10
 unit = ug m-3
 
-[concso4fine]
-description=Mass concentration of sulphate
+[concso4pm25]
+description=Mass concentration of sulphate in PM25
 unit = ug m-3
 
 [SO4ugSm3]
 description=Mass concentration of sulphate
 unit = ug S m-3
 
-[concso4pm25]
-description=Mass concentration of sulphate
-unit = ug m-3
-
-[concso4pm10]
-description=Mass concentration of sulphate
-unit = ug m-3
-
 [concso2]
 description= Mass concentration of SO2
 unit = ug m-3
@@ -2978,11 +2970,11 @@ unit = ug m-3
 description=Mass concentration of ammonium
 unit = ug m-3
 
-[concnh4fine]
-description=Mass concentration of ammonium
+[concnh4pm25]
+description=Mass concentration of ammonium in PM25
 unit = ug m-3
 
-[concnh4coarse]
+[concnh4pm10]
 description=Mass concentration of ammonium
 unit = ug m-3
 
diff --git a/pyaerocom/io/mscw_ctm/emep_variables.toml b/pyaerocom/io/mscw_ctm/emep_variables.toml
index 050c6974f..da910bb58 100644
--- a/pyaerocom/io/mscw_ctm/emep_variables.toml
+++ b/pyaerocom/io/mscw_ctm/emep_variables.toml
@@ -55,8 +55,7 @@ concdust = "SURF_ug_DUST"
 conchno3 = "SURF_ug_HNO3"
 concnh3 = "SURF_ug_NH3"
 concnh4 = "SURF_ug_NH4_F"
-concnh4coarse = "SURF_ug_NH4_F"
-concnh4fine = "SURF_ug_NH4_F"
+concnh4pm25 = "SURF_ug_NH4_F"
 concno2 = "SURF_ug_NO2"
 concno3c = "SURF_ug_NO3_C"
 concno3f = "SURF_ug_NO3_F"
@@ -70,8 +69,7 @@ concrdn = "SURF_ugN_RDN"
 concso2 = "SURF_ug_SO2"
 concso4 = "SURF_ug_SO4"
 concso4c = "SURF_ug_SO4"
-concso4coarse = "SURF_ug_SO4"
-concso4fine = "SURF_ug_SO4"
+concso4pm25 = "SURF_ug_SO4"
 concss = "SURF_ug_SS"
 # concsspm25=SURF_ug_SEASALT_F
 concssf = "SURF_ug_SEASALT_F"
@@ -106,4 +104,4 @@ concecFine = "SURF_ug_ECFINE"
 concecCoarse = "SURF_ug_ECCOARSE"
 concoxn = "SURF_ugN_OXN"
 vmrno = "SURF_ppb_NO"
-concspores = "SURF_ug_FUNGAL_SPORES"
\ No newline at end of file
+concspores = "SURF_ug_FUNGAL_SPORES"


Test patch:
diff --git a/tests/io/mscw_ctm/test_reader.py b/tests/io/mscw_ctm/test_reader.py
index aa1ff4784..478f27a13 100644
--- a/tests/io/mscw_ctm/test_reader.py
+++ b/tests/io/mscw_ctm/test_reader.py
@@ -116,12 +116,10 @@
     "concCocFine": "SURF_ugC_PM_OM25",
     "concecCoarse": "SURF_ug_ECCOARSE",
     "concecFine": "SURF_ug_ECFINE",
-    "concnh4coarse": "SURF_ug_NH4_F",
-    "concnh4fine": "SURF_ug_NH4_F",
+    "concnh4pm25": "SURF_ug_NH4_F",
     "concoxn": "SURF_ugN_OXN",
     "concso4c": "SURF_ug_SO4",
-    "concso4coarse": "SURF_ug_SO4",
-    "concso4fine": "SURF_ug_SO4",
+    "concso4pm25": "SURF_ug_SO4",
     "vmrno": "SURF_ppb_NO",
 }
 
diff --git a/tests/io/test_read_ebas.py b/tests/io/test_read_ebas.py
index 2acbe76ad..205764d20 100644
--- a/tests/io/test_read_ebas.py
+++ b/tests/io/test_read_ebas.py
@@ -300,15 +300,15 @@ def test_PROVIDES_VARIABLES(reader: ReadEbas):
         "wetoxn",
         "pr",
         "prmm",
-        "concnh4fine",
+        "concnh4pm25",
         "concCocpm10",
         "concNno",
         "concCecpm10",
         "concno3pm10",
         "concSso2",
-        "concso4fine",
-        "concso4coarse",
-        "concnh4coarse",
+        "concso4pm25",
+        "concso4pm10",
+        "concnh4pm10",
         "concno3pm25",
         "vmrnh3",
         "proxydryoxn",
diff --git a/tests/test_varcollection.py b/tests/test_varcollection.py
index 18cdf6474..88ceb4c9b 100644
--- a/tests/test_varcollection.py
+++ b/tests/test_varcollection.py
@@ -83,7 +83,7 @@ def test_VarCollection_get_var_error(collection: VarCollection):
         ("*blaaaaaaa*", 0),
         ("dep*", 9),
         ("od*", 26),
-        ("conc*", 95),
+        ("conc*", 93),
     ],
 )
 def test_VarCollection_find(collection: VarCollection, search_pattern: str, num: int):