Skip to content
This repository was archived by the owner on Jun 2, 2025. It is now read-only.

Commit b2d657f

Browse files
authored
mo global data support (#367)
1 parent 3642bd9 commit b2d657f

File tree

2 files changed

+23
-1
lines changed

2 files changed

+23
-1
lines changed

ocf_datapipes/load/nwp/nwp.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ def __init__(
4242
self.open_nwp = open_icon_eu
4343
elif provider.lower() == "icon-global":
4444
self.open_nwp = open_icon_global
45-
elif provider.lower() == "ecmwf":
45+
elif provider.lower() in ("ecmwf", "mo_global"): # same schema so using the same loader
4646
self.open_nwp = open_ifs
4747
elif provider.lower() == "gfs":
4848
self.open_nwp = open_gfs

ocf_datapipes/utils/consts.py

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,7 @@ def __getitem__(self, key):
4646
"excarta",
4747
"merra2",
4848
"merra2_uk",
49+
"mo_global",
4950
]
5051

5152
# ------ UKV
@@ -131,6 +132,24 @@ def __getitem__(self, key):
131132
UKV_STD = _to_data_array(UKV_STD)
132133
UKV_MEAN = _to_data_array(UKV_MEAN)
133134

135+
# These were calculated from 200 random init times (step 0s) from the MO global data
136+
MO_GLOBAL_INDIA_MEAN = {
137+
"temperature_sl": 298.2,
138+
"wind_u_component_10m": 0.5732,
139+
"wind_v_component_10m": -0.2831,
140+
}
141+
142+
MO_GLOBAL_INDIA_STD = {
143+
"temperature_sl": 8.473,
144+
"wind_u_component_10m": 2.599,
145+
"wind_v_component_10m": 2.016,
146+
}
147+
148+
149+
MO_GLOBAL_VARIABLE_NAMES = tuple(MO_GLOBAL_INDIA_MEAN.keys())
150+
MO_GLOBAL_INDIA_STD = _to_data_array(MO_GLOBAL_INDIA_STD)
151+
MO_GLOBAL_INDIA_MEAN = _to_data_array(MO_GLOBAL_INDIA_MEAN)
152+
134153

135154
# ------ GFS
136155
GFS_STD = {
@@ -355,6 +374,7 @@ def __getitem__(self, key):
355374
excarta=EXCARTA_VARIABLE_NAMES,
356375
merra2=MERRA2_VARIABLE_NAMES,
357376
merra2_uk=UK_MERRA2_VARIABLE_NAMES,
377+
mo_global=MO_GLOBAL_VARIABLE_NAMES,
358378
)
359379
NWP_STDS = NWPStatDict(
360380
ukv=UKV_STD,
@@ -364,6 +384,7 @@ def __getitem__(self, key):
364384
excarta=EXCARTA_STD,
365385
merra2=MERRA2_STD,
366386
merra2_uk=UK_MERRA2_STD,
387+
mo_global=MO_GLOBAL_INDIA_STD,
367388
)
368389
NWP_MEANS = NWPStatDict(
369390
ukv=UKV_MEAN,
@@ -373,6 +394,7 @@ def __getitem__(self, key):
373394
excarta=EXCARTA_MEAN,
374395
merra2=MERRA2_MEAN,
375396
merra2_uk=UK_MERRA2_MEAN,
397+
mo_global=MO_GLOBAL_INDIA_MEAN,
376398
)
377399

378400
# --------------------------- SATELLITE ------------------------------

0 commit comments

Comments
 (0)