@idm-plugin/meteo2 0.0.5 → 0.0.6

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.
@@ -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,81 @@ export declare class MeteoHelper2 {
58
87
  * @private
59
88
  */
60
89
  private prepare;
90
+ private timezoneOffset;
91
+ /**
92
+ * 预报数据
93
+ *
94
+ * Weather Model | National Weather Provider | Origin Country | Resolution | Forecast Length | Update frequency
95
+ * ICON | Deutscher Wetterdienst (DWD) | Germany | 2 - 11 km | 7.5 days | Every 3 hours
96
+ * GFS & HRRR NOAA | United States | 3 - 25 km | 16 days | Every hour
97
+ * ARPEGE & AROME | Météo-France | France | 1 - 25 km | 4 days | Every hour
98
+ * IFS & AIFS | ECMWF European Union | 25 km | 15 days | Every 6 hours
99
+ * UKMO | UK Met Office | United Kingdom | 2 - 10 km | 7 days | Every hour
100
+ * MSM & GSM | JMA Japan | 5 - 55 km | 11 days | Every 3 hours
101
+ * MET Nordic | MET Norway | Norway | 1 km | 2.5 days| Every hour
102
+ * HARMONIE | KNMI | Netherlands | 2 km | 2.5 days | Every hour
103
+ * HARMONIE | DMI | Denmark | 2 km | 2.5 days | Every 3 hours
104
+ * GEM |Canadian Weather Service | Canada | 2.5 km | 10 days | Every 6 hours
105
+ * GFS GRAPES | China Meteorological Administration (CMA) | China | 15 km | 10 days | Every 6 hours
106
+ * ACCESS-G | Australian Bureau of Meteorology (BOM) | Australia | 15 km | 10 days | Every 6 hours
107
+ * COSMO 2I & 5M | AM ARPAE ARPAP | Italy | 2 km | 3 days | Every 3 hours
108
+ *
109
+ * @param lat
110
+ * @param lng
111
+ * @param datetime
112
+ * @param simplify
113
+ * @param withDaily
114
+ * @param withHourly
115
+ * @param options
116
+ */
61
117
  spotForecast(lat: number, lng: number, datetime: moment.Moment | undefined, simplify?: boolean, withDaily?: boolean, withHourly?: boolean, options?: OMOptions): Promise<{
62
118
  weather: any[];
63
119
  marine: any[];
64
120
  }>;
121
+ /**
122
+ * 历史再分析数据
123
+ * @see https://open-meteo.com/en/docs/historical-weather-apihttps://open-meteo.com/en/docs/historical-weather-api
124
+ *
125
+ * Best match (ECMWF IFS & ERA5)
126
+ *
127
+ * Data Set | Region | Spatial Resolution | Temporal Resolution | Data Availability | Update frequency
128
+ * ECMWF IFS | Global | 9 km | Hourly | 2017 to present | Daily with 2 days delay
129
+ * ERA5 | Global | 0.25° (~25 km) | Hourly | 1940 to present | Daily with 5 days delay
130
+ * ERA5-Land | Global | 0.1° (~11 km) | Hourly | 1950 to present | Daily with 5 days delay
131
+ * ERA5-Ensemble | Global | 0.5° (~55 km) | 3-Hourly | 1940 to present | Daily with 5 days delay
132
+ * CERRA | Europe | 5 km | Hourly | 1985 to June 2021 | -
133
+ * ECMWF IFS Assimilation Long-Window | Global | 9 km | 6-Hourly | 2024 to present | Daily with 2 days delay
134
+ *
135
+ * @param lat
136
+ * @param lng
137
+ * @param startDate
138
+ * @param endDate
139
+ * @param withMarine
140
+ * @param options
141
+ */
65
142
  spotHistorical(lat: number, lng: number, startDate: moment.Moment | string, endDate: moment.Moment | string, withMarine?: boolean, options?: OMOptions): Promise<{
66
143
  weather: any[];
67
144
  marine: any[] | undefined;
68
145
  }>;
146
+ /**
147
+ * 气候态数据
148
+ *
149
+ * Climate Model | Origin | Run by | Resolution
150
+ * CMCC-CM2-VHR4 | Italy | Fondazione Centro Euro-Mediterraneo sui Cambiamenti Climatici, Lecce (CMCC) | 30 km
151
+ * FGOALS_f3_H | China | Chinese Academy of Sciences, Beijing (CAS) | 28 km
152
+ * HiRAM_SIT_HR | Taiwan | Research Center for Environmental Changes, Academia Sinica, Nankang, Taipei (AS-RCEC) | 25 km
153
+ * MRI_AGCM3_2_S | Japan | Meteorological Research Institute, Tsukuba, Ibaraki (MRI) | 20 km
154
+ * EC_Earth3P_HR | Europe | EC-Earth consortium, Rossby Center, Swedish Meteorological and Hydrological Institute/SMHI, Norrkoping, Sweden | 29 km Model
155
+ * MPI_ESM1_2_XR | Germany | Max Planck Institute for Meteorology, Hamburg 20146, Germany | 51 km Model
156
+ * NICAM16_8S | Japan | Japan Agency for Marine-Earth Science and Technology, Kanagawa 236-0001, Japan (MIROC) | 31 km Model
157
+ *
158
+ * @param lat
159
+ * @param lng
160
+ * @param startDate
161
+ * @param endDate
162
+ * @param options
163
+ */
164
+ spotClimate(lat: number, lng: number, startDate: moment.Moment | string, endDate: moment.Moment | string, options?: OMOptions): Promise<{
165
+ weather: any[];
166
+ }>;
69
167
  }
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@idm-plugin/meteo2",
3
3
  "private": false,
4
- "version": "0.0.5",
4
+ "version": "0.0.6",
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
- "openmeteo": "^1.1.4"
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",