Skip to content

Commit ba178b0

Browse files
authored
Merge pull request #66 from open-meteo/65-add-seasonal-data-to-maps
feat: Add new seasonal data sources SEAS5 and EC46 from ECMWF
2 parents 1c565e3 + fe0af26 commit ba178b0

File tree

5 files changed

+81
-1
lines changed

5 files changed

+81
-1
lines changed

package-lock.json

Lines changed: 9 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

scripts/generate-colorscales.ts

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -141,6 +141,17 @@ const colorScaleDefinitions: Record<string, ColorScaleDefinition> = {
141141
interpolationMethod: 'linear',
142142
unit: 'C°'
143143
},
144+
temperature_2m_anomaly: {
145+
min: -5,
146+
max: 5,
147+
steps: 20,
148+
colors: [
149+
{ colors: ['blue', 'white'], steps: 10 },
150+
{ colors: ['white', 'red'], steps: 10 }
151+
],
152+
interpolationMethod: 'linear',
153+
unit: 'K'
154+
},
144155
thunderstorm: {
145156
min: 0,
146157
max: 100,

src/domains.ts

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -304,6 +304,34 @@ export const domainOptions: Array<Domain> = [
304304
model_interval: 3,
305305
windUVComponents: true
306306
},
307+
{
308+
value: 'ecmwf_seas5_monthly',
309+
label: 'ECMWF SEAS5',
310+
grid: {
311+
type: 'gaussian',
312+
nx: 421120,
313+
ny: 1,
314+
zoom: 3.2,
315+
gaussianGridLatitudeLines: 320
316+
},
317+
time_interval: 24 * 30,
318+
model_interval: 24 * 30,
319+
windUVComponents: true
320+
},
321+
{
322+
value: 'ecmwf_ec46_weekly',
323+
label: 'ECMWF EC46',
324+
grid: {
325+
type: 'gaussian',
326+
nx: 421120,
327+
ny: 1,
328+
zoom: 3.2,
329+
gaussianGridLatitudeLines: 320
330+
},
331+
time_interval: 24 * 7,
332+
model_interval: 24,
333+
windUVComponents: true
334+
},
307335

308336
// GEM
309337
{

src/utils/color-scales.ts

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -861,6 +861,36 @@ export const colorScales: ColorScales = {
861861
interpolationMethod: 'linear',
862862
unit: 'C°'
863863
},
864+
temperature_2m_anomaly: {
865+
min: -5,
866+
max: 5,
867+
steps: 20,
868+
scalefactor: 2,
869+
colors: [
870+
[0, 0, 255],
871+
[28, 28, 255],
872+
[57, 57, 255],
873+
[85, 85, 255],
874+
[113, 113, 255],
875+
[142, 142, 255],
876+
[170, 170, 255],
877+
[198, 198, 255],
878+
[227, 227, 255],
879+
[255, 255, 255],
880+
[255, 255, 255],
881+
[255, 227, 227],
882+
[255, 198, 198],
883+
[255, 170, 170],
884+
[255, 142, 142],
885+
[255, 113, 113],
886+
[255, 85, 85],
887+
[255, 57, 57],
888+
[255, 28, 28],
889+
[255, 0, 0]
890+
],
891+
interpolationMethod: 'linear',
892+
unit: 'K'
893+
},
864894
thunderstorm: {
865895
min: 0,
866896
max: 100,

src/utils/variables.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,9 @@ export const variableOptions = [
115115
{ value: 'soil_moisture_10_to_40cm', label: 'Soil Moisture (10-40 cm)' },
116116
{ value: 'soil_moisture_27_to_81cm', label: 'Soil Moisture (27-81 cm)' },
117117
{ value: 'soil_moisture_40_to_100cm', label: 'Soil Moisture (40-100 cm)' },
118-
{ value: 'soil_moisture_100_to_200cm', label: 'Soil Moisture (100-200 cm)' }
118+
{ value: 'soil_moisture_100_to_200cm', label: 'Soil Moisture (100-200 cm)' },
119+
120+
{ value: 'temperature_2m_anomaly', label: 'Temperature (2m) Anomaly' }
119121
];
120122

121123
for (const pl of pressureLevels) {

0 commit comments

Comments
 (0)