@idm-plugin/meteo2 0.0.5 → 0.0.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.js +1515 -223
- package/dist/index.umd.cjs +6 -1
- package/dist/openmeteo/src/index.d.ts +99 -0
- package/package.json +5 -2
|
@@ -45,10 +45,39 @@ export declare class MeteoHelper2 {
|
|
|
45
45
|
private readonly debug;
|
|
46
46
|
private readonly FORECAST;
|
|
47
47
|
private readonly HISTORICAL;
|
|
48
|
+
private readonly CLIMATE;
|
|
48
49
|
constructor(apikey: string, debug?: boolean);
|
|
49
50
|
range(start: number, stop: number, step: number): number[];
|
|
51
|
+
/**
|
|
52
|
+
* 大气数据
|
|
53
|
+
* @param params
|
|
54
|
+
* @param options
|
|
55
|
+
*/
|
|
50
56
|
weatherForecast(params: any, options?: OMOptions): Promise<any[]>;
|
|
57
|
+
/**
|
|
58
|
+
* 海洋数据
|
|
59
|
+
*
|
|
60
|
+
* Data Set | Region | Spatial Resolution | Temporal Resolution | Data Availability | Update frequency
|
|
61
|
+
* MeteoFrance MFWAM | Global | 0.08° (~8 km) | 3-Hourly | October 2021 with 10 day forecast | Every 12 hours
|
|
62
|
+
* MeteoFrance SMOC Currents, Tides & SST | Global | 0.08° (~8 km) | Hourly | January 2022 with 10 day | forecast Every 24 hours
|
|
63
|
+
* ECMWF WAM | Global | 0.25° (~25 km) | 3-Hourly | March 2024 with 10 day forecast | Every 6 hours
|
|
64
|
+
* NCEP GFS Wave | Global | 0.25° (~25 km) | Hourly | June 2024 with 16 day forecast | Every 6 hours
|
|
65
|
+
* NCEP GFS Wave | Latitude 52.5°N - 15°S | 0.16° (~16 km) | Hourly | October 2024 with 16 day forecast | Every 6 hours
|
|
66
|
+
* DWD GWAM | Europe | 0.05° (~5 km) | Hourly | August 2022 with 8 day forecast | Twice daily
|
|
67
|
+
* DWD EWAM | Global | 0.25° (~25 km) | Hourly | August 2022 with 4 day forecast | Twice daily
|
|
68
|
+
* ERA5-Ocean | Global | 0.5° (~50 km) | Hourly | 1940 to present | Daily with 5 days delay
|
|
69
|
+
*
|
|
70
|
+
* @param params
|
|
71
|
+
* @param options
|
|
72
|
+
*/
|
|
51
73
|
marineForecast(params: any, options?: OMOptions): Promise<any[]>;
|
|
74
|
+
/**
|
|
75
|
+
* 解析请求数据
|
|
76
|
+
* @param rsps
|
|
77
|
+
* @param params
|
|
78
|
+
* @param options
|
|
79
|
+
* @private
|
|
80
|
+
*/
|
|
52
81
|
private parseWeatherData;
|
|
53
82
|
/**
|
|
54
83
|
* 完善start_hour/end_hour 或者是forecast_days变量,二选一
|
|
@@ -58,12 +87,82 @@ export declare class MeteoHelper2 {
|
|
|
58
87
|
* @private
|
|
59
88
|
*/
|
|
60
89
|
private prepare;
|
|
90
|
+
private toStdLng;
|
|
91
|
+
private timezoneOffset;
|
|
92
|
+
/**
|
|
93
|
+
* 预报数据
|
|
94
|
+
*
|
|
95
|
+
* Weather Model | National Weather Provider | Origin Country | Resolution | Forecast Length | Update frequency
|
|
96
|
+
* ICON | Deutscher Wetterdienst (DWD) | Germany | 2 - 11 km | 7.5 days | Every 3 hours
|
|
97
|
+
* GFS & HRRR NOAA | United States | 3 - 25 km | 16 days | Every hour
|
|
98
|
+
* ARPEGE & AROME | Météo-France | France | 1 - 25 km | 4 days | Every hour
|
|
99
|
+
* IFS & AIFS | ECMWF European Union | 25 km | 15 days | Every 6 hours
|
|
100
|
+
* UKMO | UK Met Office | United Kingdom | 2 - 10 km | 7 days | Every hour
|
|
101
|
+
* MSM & GSM | JMA Japan | 5 - 55 km | 11 days | Every 3 hours
|
|
102
|
+
* MET Nordic | MET Norway | Norway | 1 km | 2.5 days| Every hour
|
|
103
|
+
* HARMONIE | KNMI | Netherlands | 2 km | 2.5 days | Every hour
|
|
104
|
+
* HARMONIE | DMI | Denmark | 2 km | 2.5 days | Every 3 hours
|
|
105
|
+
* GEM |Canadian Weather Service | Canada | 2.5 km | 10 days | Every 6 hours
|
|
106
|
+
* GFS GRAPES | China Meteorological Administration (CMA) | China | 15 km | 10 days | Every 6 hours
|
|
107
|
+
* ACCESS-G | Australian Bureau of Meteorology (BOM) | Australia | 15 km | 10 days | Every 6 hours
|
|
108
|
+
* COSMO 2I & 5M | AM ARPAE ARPAP | Italy | 2 km | 3 days | Every 3 hours
|
|
109
|
+
*
|
|
110
|
+
* @param lat
|
|
111
|
+
* @param lng
|
|
112
|
+
* @param datetime
|
|
113
|
+
* @param simplify
|
|
114
|
+
* @param withDaily
|
|
115
|
+
* @param withHourly
|
|
116
|
+
* @param options
|
|
117
|
+
*/
|
|
61
118
|
spotForecast(lat: number, lng: number, datetime: moment.Moment | undefined, simplify?: boolean, withDaily?: boolean, withHourly?: boolean, options?: OMOptions): Promise<{
|
|
62
119
|
weather: any[];
|
|
63
120
|
marine: any[];
|
|
64
121
|
}>;
|
|
122
|
+
/**
|
|
123
|
+
* 历史再分析数据
|
|
124
|
+
* @see https://open-meteo.com/en/docs/historical-weather-apihttps://open-meteo.com/en/docs/historical-weather-api
|
|
125
|
+
*
|
|
126
|
+
* Best match (ECMWF IFS & ERA5)
|
|
127
|
+
*
|
|
128
|
+
* Data Set | Region | Spatial Resolution | Temporal Resolution | Data Availability | Update frequency
|
|
129
|
+
* ECMWF IFS | Global | 9 km | Hourly | 2017 to present | Daily with 2 days delay
|
|
130
|
+
* ERA5 | Global | 0.25° (~25 km) | Hourly | 1940 to present | Daily with 5 days delay
|
|
131
|
+
* ERA5-Land | Global | 0.1° (~11 km) | Hourly | 1950 to present | Daily with 5 days delay
|
|
132
|
+
* ERA5-Ensemble | Global | 0.5° (~55 km) | 3-Hourly | 1940 to present | Daily with 5 days delay
|
|
133
|
+
* CERRA | Europe | 5 km | Hourly | 1985 to June 2021 | -
|
|
134
|
+
* ECMWF IFS Assimilation Long-Window | Global | 9 km | 6-Hourly | 2024 to present | Daily with 2 days delay
|
|
135
|
+
*
|
|
136
|
+
* @param lat
|
|
137
|
+
* @param lng
|
|
138
|
+
* @param startDate
|
|
139
|
+
* @param endDate
|
|
140
|
+
* @param withMarine
|
|
141
|
+
* @param options
|
|
142
|
+
*/
|
|
65
143
|
spotHistorical(lat: number, lng: number, startDate: moment.Moment | string, endDate: moment.Moment | string, withMarine?: boolean, options?: OMOptions): Promise<{
|
|
66
144
|
weather: any[];
|
|
67
145
|
marine: any[] | undefined;
|
|
68
146
|
}>;
|
|
147
|
+
/**
|
|
148
|
+
* 气候态数据
|
|
149
|
+
*
|
|
150
|
+
* Climate Model | Origin | Run by | Resolution
|
|
151
|
+
* CMCC-CM2-VHR4 | Italy | Fondazione Centro Euro-Mediterraneo sui Cambiamenti Climatici, Lecce (CMCC) | 30 km
|
|
152
|
+
* FGOALS_f3_H | China | Chinese Academy of Sciences, Beijing (CAS) | 28 km
|
|
153
|
+
* HiRAM_SIT_HR | Taiwan | Research Center for Environmental Changes, Academia Sinica, Nankang, Taipei (AS-RCEC) | 25 km
|
|
154
|
+
* MRI_AGCM3_2_S | Japan | Meteorological Research Institute, Tsukuba, Ibaraki (MRI) | 20 km
|
|
155
|
+
* EC_Earth3P_HR | Europe | EC-Earth consortium, Rossby Center, Swedish Meteorological and Hydrological Institute/SMHI, Norrkoping, Sweden | 29 km Model
|
|
156
|
+
* MPI_ESM1_2_XR | Germany | Max Planck Institute for Meteorology, Hamburg 20146, Germany | 51 km Model
|
|
157
|
+
* NICAM16_8S | Japan | Japan Agency for Marine-Earth Science and Technology, Kanagawa 236-0001, Japan (MIROC) | 31 km Model
|
|
158
|
+
*
|
|
159
|
+
* @param lat
|
|
160
|
+
* @param lng
|
|
161
|
+
* @param startDate
|
|
162
|
+
* @param endDate
|
|
163
|
+
* @param options
|
|
164
|
+
*/
|
|
165
|
+
spotClimate(lat: number, lng: number, startDate: moment.Moment | string, endDate: moment.Moment | string, options?: OMOptions): Promise<{
|
|
166
|
+
weather: any[];
|
|
167
|
+
}>;
|
|
69
168
|
}
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@idm-plugin/meteo2",
|
|
3
3
|
"private": false,
|
|
4
|
-
"version": "0.0.
|
|
4
|
+
"version": "0.0.7",
|
|
5
5
|
"description": "idm plugin for meteo2(open meteo)",
|
|
6
6
|
"type": "module",
|
|
7
7
|
"keywords": [
|
|
@@ -31,11 +31,14 @@
|
|
|
31
31
|
"@log4js-node/log4js-api": "^1.0.2",
|
|
32
32
|
"got": "11",
|
|
33
33
|
"moment": "^2.30.1",
|
|
34
|
-
"
|
|
34
|
+
"moment-timezone": "^0.5.47",
|
|
35
|
+
"openmeteo": "^1.1.4",
|
|
36
|
+
"tz-lookup": "^6.1.25"
|
|
35
37
|
},
|
|
36
38
|
"devDependencies": {
|
|
37
39
|
"@types/jest": "^25.2.2",
|
|
38
40
|
"@types/node": "^18.14.2",
|
|
41
|
+
"@types/tz-lookup": "^6.1.2",
|
|
39
42
|
"@typescript-eslint/eslint-plugin": "^5.53.0",
|
|
40
43
|
"@typescript-eslint/parser": "^5.53.0",
|
|
41
44
|
"@vitejs/plugin-vue": "^4.2.3",
|