Skip to content

Commit e3bf612

Browse files
axel-lauerhb326valeriupredoibettina-gier
authored
Extension of ESA CCI OZONE CMORizer (#4125)
Co-authored-by: Birgit Hassler <[email protected]> Co-authored-by: Valeriu Predoi <[email protected]> Co-authored-by: Bettina Gier <[email protected]>
1 parent 72f1c80 commit e3bf612

5 files changed

Lines changed: 458 additions & 94 deletions

File tree

esmvaltool/cmorizers/data/cmor_config/ESACCI-OZONE.yml

Lines changed: 29 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,16 +5,40 @@ attributes:
55
tier: 2
66
type: sat
77
project_id: OBS6
8-
source: "https://cds.climate.copernicus.eu/datasets/satellite-ozone-v1"
8+
source: "https://cds.climate.copernicus.eu/datasets/satellite-ozone-v1 and https://webdav.aeronomie.be/guest/o3_cci/webdata/Nadir_Profiles/L3/IASI_MG_FORLI/"
99
reference: "esacci-ozone"
1010
comment: ""
1111

1212
variables:
13-
toz:
13+
# Note: Do not change variable names, these are used to handle the different
14+
# datasets in the formatting script esacci_ozone.py.
15+
toz_gto_ecv:
16+
version: L3-GTO-ECV
1417
mip: AERmon
18+
output: toz
1519
raw: total_ozone_column
16-
filename: C3S-L3_OZONE-O3_PRODUCTS-MERGED_UV-MERGED-ALG-MONTHLY-v2000.nc #The filename needs also "YYYYMM-" as prefix added during the cmorization
17-
o3:
20+
filename: "{year}{month}-C3S-L3_OZONE-O3_PRODUCTS-MERGED_UV-MERGED-ALG-MONTHLY-v2000.nc"
21+
o3_sage_omps:
22+
version: L3-SAGE-OMPS
1823
mip: AERmon
24+
output: o3
1925
raw: merged_ozone_concentration
20-
filename: C3S-L3_OZONE-O3_PRODUCTS-CONC_MZM-MERGED-ALG-MONTHLY-v0008.nc #The filename needs also "YYYYMM-" as prefix added during the cmorization
26+
filename: "{year}{month}-C3S-L3_OZONE-O3_PRODUCTS-CONC_MZM-MERGED-ALG-MONTHLY-v0008.nc"
27+
o3_megridop:
28+
version: L3-MEGRIDOP
29+
mip: AERmon
30+
output: o3
31+
raw: merged_ozone_concentration
32+
filename: "{year}{month}-C3S-L3_OZONE-O3_PRODUCTS-CONC_LLG-MERGED-ALG-MONTHLY-v0004.nc"
33+
o3_iasi:
34+
version: L3-IASI
35+
mip: AERmon
36+
output: o3
37+
raw: O3_partial_column_profile
38+
filename: "IASI_FORLI_O3_MERGED_{year}{month}*_V1.0.nc"
39+
toz_iasi:
40+
version: L3-IASI
41+
mip: AERmon
42+
output: toz
43+
raw: O3_total_column
44+
filename: "IASI_FORLI_O3_MERGED_{year}{month}*_V1.0.nc"

esmvaltool/cmorizers/data/datasets.yml

Lines changed: 27 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -573,34 +573,54 @@ datasets:
573573
ESACCI-OZONE:
574574
tier: 2
575575
source: https://cds.climate.copernicus.eu/datasets/satellite-ozone-v1
576-
last_access: 2025-02-11
576+
last_access: 2026-02-12
577577
info: |
578578
Download the data from:
579579
GTO-ECV total column (variable toz)
580580
Select the following from the CDS:
581581
https://cds.climate.copernicus.eu/datasets/satellite-ozone-v1?tab=download
582+
Put all files under a single directory (no subdirectories with years).
582583
583584
Processing Level = "Level 3"
584585
Variable = "Atm. mole content of ozone"
585-
Vertical aggregation = "Total column"
586-
Sensor = "MERGED-UV"
586+
Vertical aggregation = "Total columns UV"
587+
Sensor = "GTO-ECV"
587588
Year = select all (1995-2023)
588589
Month = select all (1-12)
589590
Version = "v2000"
590591
591592
SAGE-CCI-OMPS (variable o3)
592593
Select the following options from the same link:
593594
https://cds.climate.copernicus.eu/datasets/satellite-ozone-v1?tab=download
595+
Put all files under a single directory (no subdirectories with years).
594596
595597
Processing Level = "Level 3"
596598
Variable = "Mole concentration of ozone in air"
597-
Vertical aggregation = " Vertical profiles from limb sensors"
598-
Sensor = " CMZM (Monthly zonal mean merged concentration product from limb
599-
sensors ACE, GOMOS, MIPAS, OMPS, OSIRIS, SAGE-2 and SCIAMACHY)"
599+
Vertical aggregation = "Vertical profiles from limb sensors"
600+
Sensor = "SAGE-CCI-OMPS_CONC"
600601
Year = select all (1984-2022)
601602
Month = select all (1-12)
602603
Version = "v0008"
603-
Put all files under a single directory (no subdirectories with years).
604+
605+
MEGRIDOP (variable o3)
606+
Select the following options from the same link:
607+
https://cds.climate.copernicus.eu/datasets/satellite-ozone-v1?tab=download
608+
Put all files under a single directory (no subdirectories with years).
609+
610+
Processing Level = "Level 3"
611+
Variable = "Mole concentration of ozone in air"
612+
Vertical aggregation = "Vertical profiles from limb sensors"
613+
Sensor = "MEGRIDOP_CONC"
614+
Year = select all (2001-2022)
615+
Month = select all (1-12)
616+
Version = "v0004"
617+
618+
IASI (variables o3, toz)
619+
Download from BIRA WebDAV server: https://webdav.aeronomie.be
620+
Path: /guest/o3_cci/webdata/Nadir_Profiles/L3/IASI_MG_FORLI/<yyyy>
621+
Username: o3_cci_public
622+
No password (leave empty)
623+
Download each year <yyyy> into the same folder
604624
605625
ESACCI-SEAICE:
606626
tier: 2

esmvaltool/cmorizers/data/downloaders/datasets/esacci_ozone.py

Lines changed: 84 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,15 @@
1-
"""Script to download ESACCI-OZONE from the CDS."""
1+
"""Script to download ESACCI-OZONE from the CDS and BIRA WebDAV."""
22

33
import gzip
44
import logging
55
import shutil
66
import zipfile
7+
from datetime import datetime
78

89
import cdsapi
10+
from dateutil import relativedelta
11+
12+
from esmvaltool.cmorizers.data.downloaders.wget import WGetDownloader
913

1014
logger = logging.getLogger(__name__)
1115

@@ -26,28 +30,61 @@ def download_dataset(
2630
the ECMWF account needs to be saved in user's ${HOME} directory.
2731
- All the files will be saved in Tier2/ESACCI-OZONE.
2832
"""
29-
cds_url = "https://cds.climate.copernicus.eu/api"
30-
3133
if dataset == "ESACCI-OZONE":
34+
output_folder = (
35+
original_data_dir / f"Tier{dataset_info['tier']}" / dataset
36+
)
37+
output_folder.mkdir(parents=True, exist_ok=True)
38+
39+
cds_url = "https://cds.climate.copernicus.eu/api"
40+
41+
if start_date is None:
42+
gto_year1 = 1995
43+
omps_year1 = 1984
44+
megridop_year1 = 2001
45+
else:
46+
gto_year1 = start_date.year
47+
omps_year1 = start_date.year
48+
megridop_year1 = start_date.year
49+
if end_date is None:
50+
gto_year2 = 2024
51+
omps_year2 = 2023
52+
megridop_year2 = 2023
53+
else:
54+
gto_year2 = end_date.year
55+
omps_year2 = end_date.year
56+
megridop_year2 = end_date.year
57+
3258
requests = {
33-
"toz": {
59+
"toz_gto_ecv": {
3460
"processing_level": "level_3",
3561
"variable": "atmosphere_mole_content_of_ozone",
36-
"vertical_aggregation": "total_column",
37-
"sensor": ["merged_uv"],
38-
"year": [str(y) for y in range(1995, 2024)],
62+
"vertical_aggregation": "total_columns_uv",
63+
"sensor": ["gto_ecv"],
64+
"year": [str(y) for y in range(gto_year1, gto_year2)],
3965
"month": [f"{m:02d}" for m in range(1, 13)],
4066
"version": ["v2000"],
4167
},
42-
"o3": {
68+
"o3_sage_omps": {
4369
"processing_level": "level_3",
4470
"variable": "mole_concentration_of_ozone_in_air",
4571
"vertical_aggregation": "vertical_profiles_from_limb_sensors",
46-
"sensor": ["cmzm"],
47-
"year": [str(y) for y in range(1984, 2023)],
72+
"sensor": ["sage_cci_omps_conc"],
73+
"year": [str(y) for y in range(omps_year1, omps_year2)],
4874
"month": [f"{m:02d}" for m in range(1, 13)],
4975
"version": ["v0008"],
5076
},
77+
"o3_sage_megridop": {
78+
"processing_level": "level_3",
79+
"variable": "mole_concentration_of_ozone_in_air",
80+
"vertical_aggregation": "vertical_profiles_from_limb_sensors",
81+
"sensor": ["megridop_conc"],
82+
"year": [
83+
str(y) for y in range(megridop_year1, megridop_year2)
84+
],
85+
"month": [f"{m:02d}" for m in range(1, 13)],
86+
"version": ["v0004"],
87+
},
5188
}
5289

5390
client = cdsapi.Client(cds_url)
@@ -88,5 +125,41 @@ def download_dataset(
88125
with open(output_folder / file_path.stem, "wb") as f_out:
89126
shutil.copyfileobj(f_in, f_out)
90127

128+
# download IASI data from BIRA WebDAV (IASI data not available on CDS)
129+
# all the files will be saved by in ${RAWOBS}/Tier2/ESACCI-OZONE
130+
131+
if start_date is None:
132+
start_date = datetime(2008, 1, 1)
133+
if end_date is None:
134+
end_date = datetime(2023, 12, 31)
135+
136+
downloader = WGetDownloader(
137+
original_data_dir=original_data_dir,
138+
dataset=dataset,
139+
dataset_info=dataset_info,
140+
overwrite=overwrite,
141+
)
142+
143+
basepath = "https://webdav.aeronomie.be/guest/o3_cci/webdata/Nadir_Profiles/L3/IASI_MG_FORLI"
144+
145+
wget_options = [
146+
"-e robots=off", # ignore robots.txt
147+
"--no-parent", # don't ascend to the parent directory
148+
"--accept=nc", # download only *.nc files
149+
"--user=o3_cci_public", # user name
150+
"--password=", # empty password (no password needed for public access)
151+
]
152+
153+
loop_date = start_date
154+
while loop_date <= end_date:
155+
year = loop_date.year
156+
157+
# directory on server to download
158+
remotepath = f"{basepath}/{year}"
159+
downloader.download_folder(remotepath, wget_options)
160+
161+
loop_date += relativedelta.relativedelta(years=1)
162+
91163
else:
92-
raise ValueError(f"Unknown dataset: {dataset}")
164+
errmsg = f"Unknown dataset: {dataset}"
165+
raise ValueError(errmsg)

0 commit comments

Comments
 (0)