@idm-plugin/meteo2 0.5.6 → 0.5.8
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.d.ts +1 -0
- package/dist/index.js +4431 -597
- package/dist/index.umd.cjs +12 -2
- package/dist/tropicals/src/index.d.ts +105 -0
- package/package.json +9 -3
|
@@ -0,0 +1,105 @@
|
|
|
1
|
+
export declare enum TropicalModel {
|
|
2
|
+
CMA = "CMA",
|
|
3
|
+
CNTW = "CNTW",
|
|
4
|
+
CNHK = "CNHK",
|
|
5
|
+
JMA = "JMA",
|
|
6
|
+
KMA = "KMA",
|
|
7
|
+
ECMWF = "ECMWF",
|
|
8
|
+
NOAA_AT = "NOAA-AT",
|
|
9
|
+
NOAA_CP = "NOAA-CP",
|
|
10
|
+
NOAA_EP = "NOAA-EP",
|
|
11
|
+
UKM = "UKM",
|
|
12
|
+
IMD = "IMD",
|
|
13
|
+
GFS = "GFS",
|
|
14
|
+
BOM_ACCESS = "BOM-ACCESS",
|
|
15
|
+
BOM_BULLETIN_EAST = "BOM-BULLETIN-EAST",
|
|
16
|
+
BOM_BULLETIN_NORTH = "BOM-BULLETIN-NORTH",
|
|
17
|
+
BOM_BULLETIN_WEST = "BOM-BULLETIN-WEST",
|
|
18
|
+
OTHER = "OTHER"
|
|
19
|
+
}
|
|
20
|
+
/**
|
|
21
|
+
* 台风数据
|
|
22
|
+
*/
|
|
23
|
+
export declare class TropicalHelper {
|
|
24
|
+
/**
|
|
25
|
+
* 台风数据
|
|
26
|
+
* @param vendor
|
|
27
|
+
* @param options
|
|
28
|
+
*/
|
|
29
|
+
static realtimeForecast(vendor?: string, options?: {
|
|
30
|
+
requestId?: string;
|
|
31
|
+
}): Promise<any[]>;
|
|
32
|
+
static sortTropical(tropical: any): Promise<any>;
|
|
33
|
+
static mergeTropicals(withHft?: boolean, withNio?: boolean, options?: {
|
|
34
|
+
requestId?: string;
|
|
35
|
+
}): Promise<any[]>;
|
|
36
|
+
/**
|
|
37
|
+
* 获取热带气旋的移动信息
|
|
38
|
+
* @param tropical
|
|
39
|
+
*/
|
|
40
|
+
static tropicalMovement(tropical: any): Promise<any>;
|
|
41
|
+
static calculateMovement(from: any, to: any): {
|
|
42
|
+
kts: number;
|
|
43
|
+
deg: any;
|
|
44
|
+
};
|
|
45
|
+
/**
|
|
46
|
+
* 估算最大风速半径 (RMW - Radius of Maximum Wind)
|
|
47
|
+
* @param kts 最大风速(节)
|
|
48
|
+
* @param pressure 中心气压(hPa)
|
|
49
|
+
* @param lat 纬度
|
|
50
|
+
*/
|
|
51
|
+
static estimateRMW(kts: number, pressure?: number, lat?: number): number;
|
|
52
|
+
/**
|
|
53
|
+
* 基于台风强度推算风圈基础半径的经验公式
|
|
54
|
+
* @param kts 最大风速(节)
|
|
55
|
+
* @param pressure 中心气压(hPa)
|
|
56
|
+
* @param lat 纬度
|
|
57
|
+
* @returns 风圈半径对象
|
|
58
|
+
*/
|
|
59
|
+
static estimateWindRadii(kts: number, pressure?: number, lat?: number): {
|
|
60
|
+
r7: null;
|
|
61
|
+
r10: null;
|
|
62
|
+
r12: null;
|
|
63
|
+
} | {
|
|
64
|
+
r7: number;
|
|
65
|
+
r10: number | null;
|
|
66
|
+
r12: number | null;
|
|
67
|
+
};
|
|
68
|
+
/**
|
|
69
|
+
* 估算四象限风圈半径的不对称性
|
|
70
|
+
* @param baseRadius 基础风圈半径
|
|
71
|
+
* @param mvKts 移动速度(节)
|
|
72
|
+
* @param mvDeg 移动方向(度)
|
|
73
|
+
* @param hemisphere N 北半球, N 南半球
|
|
74
|
+
* @returns 四象限风圈半径
|
|
75
|
+
*/
|
|
76
|
+
static estimateAsymmetricRadii(baseRadius: number, mvKts?: number, mvDeg?: number, hemisphere?: string): {
|
|
77
|
+
ne: null;
|
|
78
|
+
nw: null;
|
|
79
|
+
se: null;
|
|
80
|
+
sw: null;
|
|
81
|
+
} | {
|
|
82
|
+
ne: number;
|
|
83
|
+
nw: number;
|
|
84
|
+
se: number;
|
|
85
|
+
sw: number;
|
|
86
|
+
};
|
|
87
|
+
/**
|
|
88
|
+
* 为预报数据补充风圈半径
|
|
89
|
+
* @param position 预报点数据
|
|
90
|
+
*/
|
|
91
|
+
static supplementWindRadii(position: any): any;
|
|
92
|
+
/**
|
|
93
|
+
* 台风类型
|
|
94
|
+
* @param kts
|
|
95
|
+
* 0 热带低压 Tropical Depression
|
|
96
|
+
* 1 热带风暴 Tropical Storm
|
|
97
|
+
* 2 强热带风暴 Severe Tropical Storm
|
|
98
|
+
*/
|
|
99
|
+
static parseTropicalType(kts: number): "Tropical Depression" | "Tropical Storm" | "Severe Tropical Storm" | "Typhoon" | "Strong Typhoon" | "Super Typhoon";
|
|
100
|
+
/**
|
|
101
|
+
* @param name
|
|
102
|
+
*/
|
|
103
|
+
static parseTropicalModel(name: string): TropicalModel.CMA | TropicalModel.CNTW | TropicalModel.CNHK | TropicalModel.JMA | TropicalModel.KMA | TropicalModel.ECMWF | TropicalModel.GFS | TropicalModel.OTHER;
|
|
104
|
+
static parseWindCircle(r: any): number | null;
|
|
105
|
+
}
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@idm-plugin/meteo2",
|
|
3
3
|
"private": false,
|
|
4
|
-
"version": "0.5.
|
|
4
|
+
"version": "0.5.8",
|
|
5
5
|
"description": "idm plugin for meteo2(open meteo)",
|
|
6
6
|
"type": "module",
|
|
7
7
|
"keywords": [
|
|
@@ -33,10 +33,16 @@
|
|
|
33
33
|
"moment": "^2.30.1",
|
|
34
34
|
"moment-timezone": "^0.5.47",
|
|
35
35
|
"openmeteo": "^1.1.4",
|
|
36
|
-
"tz-lookup": "^6.1.25"
|
|
36
|
+
"tz-lookup": "^6.1.25",
|
|
37
|
+
"xml2js": "^0.6.2"
|
|
38
|
+
},
|
|
39
|
+
"peerDependencies": {
|
|
40
|
+
"@idm-plugin/geo2": "^1.4.7",
|
|
41
|
+
"@idm-plugin/meteo": "^0.4.7"
|
|
37
42
|
},
|
|
38
43
|
"devDependencies": {
|
|
39
|
-
"@idm-plugin/
|
|
44
|
+
"@idm-plugin/geo2": "^1.4.7",
|
|
45
|
+
"@idm-plugin/meteo": "^0.4.7",
|
|
40
46
|
"@types/jest": "^25.2.2",
|
|
41
47
|
"@types/node": "^18.14.2",
|
|
42
48
|
"@types/tz-lookup": "^6.1.2",
|