Skip to content

Commit f6465ee

Browse files
IFentonjemrobinson
andauthored
Adding configs for downloading a sample dataset (#69)
* 🔧 First pass at adding sample config * 🔧 Add SIC sample download and edit default data * 🚨 Linting * 🔧 Updating split dates for test / train / validate * 🔧 Updating names to follow anemoi convention * Adapting nbsamp to process predownloaded data * ✨ Implementing a test filter, and adding forcings * 🚨 Fixing linter errors * 🚨 Fixing linter errors * ✅ Update code to past tests * ✅ Update code to past tests * 🐛 Update name of example_filter in all files * 🔧 Testing adding filters to local dataset * 🔧 updating files to default download 3 months of data * 🔧 Updating the dates for the era5 config * 🚨 Fixing linter warnings * 🔧 Adding in group_as as it's required for training * 🔧 Updating the test period so it has enough dates to run * 🚚 Renamed config files to match Anemoi pattern * 🔧 Update dataset names inside config files * 🔧 Update file settings to point to new dataset names * 🐛 Nest IceNetSIC downloads under the dataset name to avoid overwriting data when multiple datasets use the same year * ♻️ Separate preprocessors * 🎨 Move filter registration to CLI and rename ExampleFilter to DoublingFilter --------- Co-authored-by: James Robinson <james.em.robinson@gmail.com>
1 parent c05641f commit f6465ee

23 files changed

Lines changed: 151 additions & 146 deletions

ice_station_zebra/config/base.yaml

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,7 @@
11
defaults:
22
- datasets:
3-
- era5-0d5-south-2019-12-24h-v1
4-
- era5-0d5-south-2020-01-24h-v1
5-
- osisaf-sic-south-2019-12-24h-v1
6-
- osisaf-sic-south-2020-01-24h-v1
3+
- samp_sicsouth_osisaf_25k_2020_2020_24h_v1
4+
- samp_weathersouth_era5_0p5_2020_2020_24h_v1
75
- evaluate: default
86
- loggers:
97
- wandb

ice_station_zebra/config/datasets/era5-0d5-south-2019-12-24h-v1.yaml

Lines changed: 0 additions & 62 deletions
This file was deleted.
Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
We use the Anemoi naming convention from https://anemoi.readthedocs.io/projects/registry/en/stable/naming-conventions.html.
2+
3+
purpose-content-source-resolution-start-year-end-year-frequency-version
4+
5+
purpose:
6+
- nbsamp: Test datasets for use in notebooks
7+
- samp: Test datasets for use on the command line
8+
content:
9+
- sicnorth: sea ice concentration (northern hemisphere)
10+
- sicsouth: sea ice concentration (southern hemisphere)
11+
- weathernorth: weather data (northern hemisphere)
12+
- weathersouth: weather data (southern hemisphere)
13+
source:
14+
- era5: ERA5 weather data
15+
- osisaf: OSISAF sea ice data
16+
resolution:
17+
- 0p5: 0.5 degree
18+
- 25k: 25km grid
19+
- start-year:
20+
- YYYY: year code
21+
- end-year:
22+
- YYYY: year code
23+
- frequency:
24+
- 24h: every 24 hours
25+
- version:
26+
- vX: where X increments each time changes are made

ice_station_zebra/config/datasets/osisaf-sic-north-2003-08-24h-v1.yaml renamed to ice_station_zebra/config/datasets/nbsamp_sicnorth_osisaf_25k_2003_2003_24h_v1.yaml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
osisaf-sic-north-2003-08-24h-v1:
2-
name: osisaf-sic-north-2003-08-24h-v1
1+
nbsamp-sicnorth-osisaf-25k-2003-2003-24h-v1:
2+
name: nbsamp-sicnorth-osisaf-25k-2003-2003-24h-v1
33
group_as: osisaf-north
44
description: OSISAF sea ice concentration for northern hemisphere - Summer 2003 (August-September)
55
attribution: EUMETSAT
@@ -16,4 +16,4 @@ osisaf-sic-north-2003-08-24h-v1:
1616

1717
input:
1818
netcdf:
19-
path: ${base_path}/data/preprocessing/${...preprocessor.type}/data/osisaf/${...preprocessor.hemisphere}/siconca/2003.nc
19+
path: ${base_path}/data/preprocessing/${...name}/${...preprocessor.type}/data/osisaf/${...preprocessor.hemisphere}/siconca/2003.nc

ice_station_zebra/config/datasets/osisaf-sic-north-2010-08-24h-v1.yaml renamed to ice_station_zebra/config/datasets/nbsamp_sicnorth_osisaf_25k_2010_2010_24h_v1.yaml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
osisaf-sic-north-2010-08-24h-v1:
2-
name: osisaf-sic-north-2010-08-24h-v1
1+
nbsamp-sicnorth-osisaf-25k-2010-2010-24h-v1:
2+
name: nbsamp-sicnorth-osisaf-25k-2010-2010-24h-v1
33
group_as: osisaf-north
44
description: OSISAF sea ice concentration for northern hemisphere - Summer 2010 (August-September)
55
attribution: EUMETSAT
@@ -16,4 +16,4 @@ osisaf-sic-north-2010-08-24h-v1:
1616

1717
input:
1818
netcdf:
19-
path: ${base_path}/data/preprocessing/${...preprocessor.type}/data/osisaf/${...preprocessor.hemisphere}/siconca/2010.nc
19+
path: ${base_path}/data/preprocessing/${...name}/${...preprocessor.type}/data/osisaf/${...preprocessor.hemisphere}/siconca/2010.nc

ice_station_zebra/config/datasets/osisaf-sic-north-2018-08-24h-v1.yaml renamed to ice_station_zebra/config/datasets/nbsamp_sicnorth_osisaf_25k_2018_2018_24h_v1.yaml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
osisaf-sic-north-2018-08-24h-v1:
2-
name: osisaf-sic-north-2018-08-24h-v1
1+
nbsamp-sicnorth-osisaf-25k-2018-2018-24h-v1:
2+
name: nbsamp-sicnorth-osisaf-25k-2018-2018-24h-v1
33
group_as: osisaf-north
44
description: OSISAF sea ice concentration for northern hemisphere - Summer 2018 (August-September)
55
attribution: EUMETSAT
@@ -16,4 +16,4 @@ osisaf-sic-north-2018-08-24h-v1:
1616

1717
input:
1818
netcdf:
19-
path: ${base_path}/data/preprocessing/${...preprocessor.type}/data/osisaf/${...preprocessor.hemisphere}/siconca/2018.nc
19+
path: ${base_path}/data/preprocessing/${...name}/${...preprocessor.type}/data/osisaf/${...preprocessor.hemisphere}/siconca/2018.nc
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
nbsamp-weathersouth-era5-0p5-2020-2020-24h-v1:
2+
name: nbsamp-weathersouth-era5-0p5-2020-2020-24h-v1
3+
group_as: era5
4+
description: Small ERA5 dataset for testing (0.5 deg, south)
5+
attribution: ECMWF/C3S
6+
licence: CC-BY-4.0
7+
8+
dates:
9+
start: '2020-01-01T00:00:00'
10+
end: '2020-04-30T23:00:00'
11+
frequency: 24h
12+
13+
input:
14+
pipe:
15+
- anemoi-dataset:
16+
join:
17+
- dataset: ${base_path}/data/anemoi/samp-weathersouth-era5-0p5-2020-2020-24h-v1.zarr
18+
select: [ 2t, z_250, z_500 , 10u, 10v, cos_julian_day, sin_julian_day ]
19+
- doubling_filter:
20+
input_field: 2t
21+
output_field: doubled_2t

ice_station_zebra/config/datasets/osisaf-sic-south-2019-12-24h-v1.yaml

Lines changed: 0 additions & 19 deletions
This file was deleted.

ice_station_zebra/config/datasets/osisaf-sic-south-2020-01-24h-v1.yaml renamed to ice_station_zebra/config/datasets/samp_sicsouth_osisaf_25k_2020_2020_24h_v1.yaml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
1-
osisaf-sic-south-2020-01-24h-v1:
2-
name: osisaf-sic-south-2020-01-24h-v1
1+
samp-sicsouth-osisaf-25k-2020-2020-24h-v1:
2+
name: samp-sicsouth-osisaf-25k-2020-2020-24h-v1
33
group_as: osisaf-south
44
description: OSISAF sea ice concentration for southern hemisphere
55
attribution: EUMETSAT
66
licence: CC-BY-4.0
77

88
dates:
99
start: '2020-01-01T00:00:00'
10-
end: '2020-01-31T23:00:00'
10+
end: '2020-04-30T23:00:00'
1111
frequency: 24h
1212

1313
preprocessor:
@@ -16,4 +16,4 @@ osisaf-sic-south-2020-01-24h-v1:
1616

1717
input:
1818
netcdf:
19-
path: ${base_path}/data/preprocessing/${...preprocessor.type}/data/osisaf/${...preprocessor.hemisphere}/siconca/2020.nc
19+
path: ${base_path}/data/preprocessing/${...name}/${...preprocessor.type}/data/osisaf/${...preprocessor.hemisphere}/siconca/2020.nc

ice_station_zebra/config/datasets/era5-0d5-south-2020-01-24h-v1.yaml renamed to ice_station_zebra/config/datasets/samp_weathersouth_era5_0p5_2020_2020_24h_v1.yaml

Lines changed: 15 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
1-
era5-0d5-south-2020-01-24h-v1:
2-
name: era5-0d5-south-2020-01-24h-v1
3-
group_as: era5-south
4-
description: 0.5 degree resolution ERA5 for southern hemisphere
1+
samp-weathersouth-era5-0p5-2020-2020-24h-v1:
2+
name: samp-weathersouth-era5-0p5-2020-2020-24h-v1
3+
group_as: era5
4+
description: Small ERA5 dataset for testing (0.5 deg, south)
55
attribution: ECMWF/C3S
66
licence: CC-BY-4.0
77

88
dates:
99
start: '2020-01-01T00:00:00'
10-
end: '2020-01-31T23:00:00'
10+
end: '2020-04-30T23:00:00'
1111
frequency: 24h
1212

1313
input:
@@ -20,43 +20,31 @@ era5-0d5-south-2020-01-24h-v1:
2020
area: "0/-180/-90/180" # southern hemisphere
2121
levtype: sfc
2222
param:
23+
- 2t
24+
- sp
2325
- 10u
2426
- 10v
25-
- 2d
26-
- 2t
27-
- lsm
2827
- msl
29-
- sdor
30-
- skt
31-
- slor
32-
- sp
33-
- tcw
34-
- z
3528
- mars:
3629
use_cdsapi_dataset: "reanalysis-era5-complete"
3730
class: ea
3831
expver: "0001"
3932
grid: "0.5 / 0.5"
4033
area: "0/-180/-90/180" # southern hemisphere
4134
level:
35+
- 10
4236
- 250
4337
- 500
44-
- 850
4538
- 1000
4639
levtype: pl
4740
param:
41+
- z
42+
- t
43+
- q
4844
- u
4945
- v
50-
- q
51-
- t
52-
- z
53-
- accumulations:
54-
use_cdsapi_dataset: "reanalysis-era5-complete"
55-
accumulation_period: 6
56-
class: ea
57-
expver: "0001"
58-
grid: "0.5 / 0.5"
59-
area: "0/-180/-90/180" # southern hemisphere
46+
- forcings:
6047
param:
61-
- cp
62-
- tp
48+
- cos_julian_day
49+
- sin_julian_day
50+
template: \${input.join.0.mars}

0 commit comments

Comments
 (0)