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

CMORizer for ESACCI-SEAICE #3821

Open
wants to merge 9 commits into
base: main
Choose a base branch
from
Open
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
2 changes: 2 additions & 0 deletions doc/sphinx/source/input.rst
Original file line number Diff line number Diff line change
Expand Up @@ -333,6 +333,8 @@ A list of the datasets for which a CMORizers is available is provided in the fol
+------------------------------+------------------------------------------------------------------------------------------------------+------+-----------------+
| ESACCI-OZONE | toz, tozStderr, tro3prof, tro3profStderr (Amon) | 2 | NCL |
+------------------------------+------------------------------------------------------------------------------------------------------+------+-----------------+
| ESACCI-SEAICE | siconc (SIday, SImon) | 2 | Python |
+------------------------------+------------------------------------------------------------------------------------------------------+------+-----------------+
| ESACCI-SEA-SURFACE-SALINITY | sos (Omon) | 2 | Python |
+------------------------------+------------------------------------------------------------------------------------------------------+------+-----------------+
| ESACCI-SOILMOISTURE | sm (Eday, Lmon), smStderr (Eday) | 2 | Python |
Expand Down
23 changes: 23 additions & 0 deletions esmvaltool/cmorizers/data/cmor_config/ESACCI-SEAICE.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
---
# Common global attributes for Cmorizer output
attributes:
dataset_id: ESACCI-SEAICE
version: L4-SICONC-RE-SSMI-12.5kmEASE2-fv3.0
tier: 2
modeling_realm: sat
project_id: OBS6
source: 'ftp://anon-ftp.ceda.ac.uk/neodc/esacci/sea_ice_'
reference: 'esacci-seaice'
comment: ''

# Variables to cmorize (here use only filename prefix)
variables:
# daily and monthly frequency
siconc:
short_name: siconc
mip1: SIday
mip2: SImon
raw: ice_conc
frequency1: day
frequency2: mon
file: ESACCI-SEAICE-L4-SICONC-RE_SSMI_12.5kmEASE2-{region}-{year}*-fv3.0.nc
9 changes: 9 additions & 0 deletions esmvaltool/cmorizers/data/datasets.yml
Original file line number Diff line number Diff line change
Expand Up @@ -529,6 +529,15 @@ datasets:
limb_profiles/l3/merged/merged_monthly_zonal_mean/v0002
Put all files under a single directory (no subdirectories with years).

ESACCI-SEAICE:
tier: 2
source: ftp://anon-ftp.ceda.ac.uk/neodc/esacci/sea_ice/data/
last_access: 2024-11-07
info: |
Download the data from:
sea_ice_concentration/L4/ssmi_ssmis/12.5km/v3.0/*/
Put all files under a single directory (no subdirectories with years / months).

ESACCI-SOILMOISTURE:
tier: 2
source: ftp://anon-ftp.ceda.ac.uk/neodc/esacci/soil_moisture/data/
Expand Down
52 changes: 52 additions & 0 deletions esmvaltool/cmorizers/data/downloaders/datasets/esacci_seaice.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
"""Script to download ESACCI-SEAICE."""
from datetime import datetime

from dateutil import relativedelta

from esmvaltool.cmorizers.data.downloaders.ftp import CCIDownloader


def download_dataset(config, dataset, dataset_info, start_date, end_date,
overwrite):
"""Download dataset.

Parameters
----------
config : dict
ESMValTool's user configuration
dataset : str
Name of the dataset
dataset_info : dict
Dataset information from the datasets.yml file
start_date : datetime
Start of the interval to download
end_date : datetime
End of the interval to download
overwrite : bool
Overwrite already downloaded files
"""
if start_date is None:
start_date = datetime(1991, 1, 1)
if end_date is None:
end_date = datetime(2020, 12, 31)

downloader = CCIDownloader(
config=config,
dataset=dataset,
dataset_info=dataset_info,
overwrite=overwrite,
)
downloader.ftp_name = 'sea_ice'
downloader.connect()

regions = ('NH', 'SH')
basepath = 'sea_ice_concentration/L4/ssmi_ssmis/12.5km/v3.0'

loop_date = start_date
while loop_date <= end_date:
for region in regions:
path = (f'{basepath}/{region}/{loop_date.year}/'
f'{loop_date.month:02d}')
downloader.set_cwd(path)
downloader.download_folder('.', sub_folder=region)
loop_date += relativedelta.relativedelta(months=1)
Loading
Loading