Machine Learning Practice 12-Typhoon Forecast and Analysis Based on Historical Data (Typhoon No. 5 Dusurui will land in Fujian in 2023)

Hello everyone, I am Weixue AI. Today, I will introduce to you Machine Learning Practice 12-Typhoon Forecast and Analysis Based on Historical Data. Typhoon Forecast and Analysis is an important meteorological research project aimed at predicting, tracking and analyzing in advance The track, intensity and possible impact of the typhoon on the region. Typhoons are powerful and destructive meteorological disasters that often bring huge storm surges, heavy rains and strong winds to coastal areas, and cause secondary disasters such as floods and landslides.

At 8 a.m. on July 21, 2023, this year's No. 5 typhoon "Dusuri" formed in the ocean east of the Philippines. At 5 pm that day, its center was located on the ocean about 1,270 kilometers east of Manila, Philippines. The maximum wind force near the center was level 8 (18 m/s, tropical storm level), and it may strengthen into a strong typhoon of level 15 in the future.

This article will use historical data to analyze and predict all typhoons generated in Asia during the period 1951-2022, and study the typhoon track.
insert image description here

Causes of typhoons

Typhoons are formed by a series of complex meteorological and oceanic factors. The following are the main causes of typhoons:

Warm sea temperature: Typhoons need warm sea water as an energy source. Usually, seawater temperatures exceeding 26.5 degrees Celsius are conducive to the development of typhoons. Oceans in the tropics and subtropics usually have enough warm waters to support typhoons.

Humid atmospheric conditions: The formation of typhoons requires humid atmospheric conditions, that is, higher water vapor content. Convective clouds form when seawater evaporates into the atmosphere. These clouds gradually grow as more water vapor condenses and eventually form typhoons.

Lack of strong horizontal wind shear: Horizontal wind shear refers to the variation in horizontal wind speed at different altitudes. Typhoons form more easily if the horizontal wind shear is small. Smaller wind shear helps maintain the typhoon's overall structure and rotation.

Initial disturbance: The formation of a typhoon usually requires an initial disturbance or disturbance wave as a start. This disturbance can be a tropical cyclone, a confluence of weather fronts, or the interaction of other weather systems. They are able to provide the initial rotation and updraft that facilitates typhoon development.

Seasonal circulation conditions: The formation of typhoons is usually most active in summer and early autumn, because at this time the circulation conditions in tropical and subtropical regions are more conducive to the formation and strengthening of cyclones.

Significance of typhoon prediction and analysis

Protecting people’s lives and property: By predicting the path and intensity of typhoons, warnings can be issued to affected areas in advance, so that people have time to take protective measures to minimize casualties and property losses that typhoons may cause.

Meteorological scientific research: Typhoon is a complex meteorological system. Studying the formation, development and dissipation process of typhoon is helpful for in-depth understanding of atmospheric circulation and thermodynamic process. Observations and analyzes of typhoons can improve understanding of weather and climate systems and improve weather forecasting models and algorithms.

Provide support for disaster response: Through typhoon prediction and analysis, it can provide scientific basis for emergency management departments to help them formulate disaster response plans and emergency rescue plans. At the same time, it can also predict the disaster situation in the affected area in advance, and provide targeted guidance for the dispatch of rescue forces and the deployment of resources.

Climate Change Research: As global climate change intensifies, the frequency and intensity of typhoons may change. Through long-term observation and research on typhoon prediction and analysis, the impact of climate change on typhoon activities can be explored, and scientific reference and decision support can be provided for coping with climate change.

Typhoon historical data analysis

A table of all typhoon data generated in the Asian region during 1951-2022: typhoon_data.csv

Download link: Link: https://pan.baidu.com/s/1FjMSnngby4qUNL2fVCg-Jg?pwd=rxfs
Extraction code: rxfs

Typhoon index information table: typhoon_info.csv
Download address: Link: Link: https://pan.baidu.com/s/1giaOVpDEx9XHzCkXJs_6XQ?pwd=2a3o
Extraction code: 2a3o

Data field structure

,International number ID,year,month,day,hour,grade,Latitude of the center,Longitude of the center,Central pressure,Maximum sustained wind speed,Direction of the longest radius of 50kt winds or greater,The longeast radius of 50kt winds or greater,The shortest radius of 50kt winds or greater,Direction of the longest radius of 30kt winds or greater,The longeast radius of 30kt winds or greater,The shortest radius of 30kt winds or greater,Indicator of landfall or passage
0,5101,1951,2,19,6,Tropical Depression,200,1385,1010,,,,,,,, 
1,5101,1951,2,19,12,Tropical Depression,200,1385,1010,,,,,,,, 
2,5101,1951,2,19,18,Tropical Depression,230,1421,1000,,,,,,,, 
3,5101,1951,2,20,0,Tropical Cyclone of TS intensity or higher,250,1460,994,,,,,,,, 
4,5101,1951,2,20,6,Tropical Cyclone of TS intensity or higher,276,1506,994,,,,,,,, 
5,5101,1951,2,20,12,Tropical Cyclone of TS intensity or higher,289,1533,994,,,,,,,, 
6,5101,1951,2,20,18,Tropical Cyclone of TS intensity or higher,313,1575,992,,,,,,,, 
7,5101,1951,2,21,0,Tropical Cyclone of TS intensity or higher,326,1621,990,,,,,,,, 

Data Loading Analysis

import numpy as np
import pandas as pd
import matplotlib.pyplot as plt
import folium
import seaborn as sns

data = pd.read_csv("typhoon_data.csv", index_col=0)
info = pd.read_csv("typhoon_info.csv", index_col=0)

print(data.shape)
data.sample(5)
print(info.shape)
info.sample(5)

print(len(data["International number ID"].unique()))
vc = data["International number ID"].value_counts()

# 数据处理
data[data["year"] < 1977]["grade"].unique()
data[data["year"] >= 1977]["grade"].unique()
data = data[data["year"] >= 1977]


typhoons = data["International number ID"].unique() # Unique IDs of typhoons
info[info["Name"].str.strip() == "MAEMI"]

We know that this year's No. 5 typhoon "Dusuri" was formed in the ocean east of the Philippines, and its position is roughly at 132.8° east longitude and 13.9° north latitude

Now we look for the path of the typhoon generated near 132,1300:

similar_data = data[((data["Latitude of the center"] < 140) & (data["Latitude of the center"] > 110)) & \
                   ((data["Longitude of the center"] < 1440) & (data["Longitude of the center"] > 1240))]
similar_data.to_csv("similar_data.csv")

Generated in similar_data.csv to find multiple typhoons generated near here:
insert image description here

Select one of the four typhoon analysis paths, and view the 1911 typhoon, which means the No. 11 typhoon Bailu in 2019, and generate a path analysis map:

Trajectory diagram:


maemi_data = data.copy()[data["International number ID"]==1911]

maemi_data["Elapsed Hour"] = (maemi_data["day"]-4)*24 + maemi_data["hour"]
maemi_data.head()

maemi_data = maemi_data.drop(["International number ID", "year", "month", "day", "hour"], axis=1)
maemi_data.head()

maemi_data["Longitude of the center"] /= 10
maemi_data["Latitude of the center"] /= 10

fig = plt.figure(figsize=(3,3))
plt.xlim(120, 170)
plt.ylim(5, 55)
plt.plot(maemi_data["Longitude of the center"], maemi_data["Latitude of the center"], "red")
plt.show()

insert image description here

Scatterplot

scale = maemi_data["The longeast radius of 30kt winds or greater"].fillna(60)
fig = plt.figure(figsize=(5,5))
plt.xlim(120, 170)
plt.ylim(5, 55)
plt.plot(maemi_data["Longitude of the center"], maemi_data["Latitude of the center"], "black", linewidth=1)
plt.scatter(maemi_data["Longitude of the center"], maemi_data["Latitude of the center"], s=scale/3, c=maemi_data["Maximum sustained wind speed"])
plt.show()

insert image description here

map wind circle

import matplotlib.cm as cm

c = maemi_data.copy()["Maximum sustained wind speed"]
cmap = cm.jet

def rgb_to_hex(rgb):
    return '#%02x%02x%02x' % rgb
m = folium.Map(location=[38.9, 153.2], zoom_start=3, width=600, height=600)
for i in range(len(maemi_data)):
    color = cmap(c.iloc[i]/c.max())
    color = tuple([int(c*255) for c in color[:3]])
    color = rgb_to_hex(color)
    folium.Circle(location=[maemi_data.iloc[i]["Latitude of the center"], maemi_data.iloc[i]["Longitude of the center"]],
                 radius=scale.iloc[i]*1852,  #  nautical mile to meter
                 fill=True,
                 color="black",
                 fill_color=color).add_to(m)
m.save('map.html')  # 保存地图为HTML文件
import webbrowser
webbrowser.open('map.html', new=2)  # 在浏览器中打开地图

insert image description here

Changes in air pressure and wind force at the typhoon center

plt.title("Typhoon's Central Pressure in hPa")
plt.plot(maemi_data["Elapsed Hour"],maemi_data["Central pressure"])
plt.xlabel("Elapsed Hour")
plt.ylabel("Central Pressure")
plt.legend()
plt.show()


plt.title("Typhoon's Wind Speed in knot(kt)")
plt.plot(maemi_data["Elapsed Hour"],maemi_data["Maximum sustained wind speed"])
plt.xlabel("Elapsed Hour")
plt.ylabel("Maximum sustained wind speed")
plt.legend()
plt.show()


sns.heatmap(maemi_data.corr(), annot=True)
plt.show()

insert image description here
insert image description here

Summarize

Typhoon prediction is based on multi-source data and analysis methods. Through the prediction of typhoon path, intensity and possible impact, it provides early warning and decision support for relevant areas, so as to minimize the possible casualties and property losses caused by typhoon. However, due to the complexity and uncertainty of typhoons, continuous observation and improved forecasting techniques are still important directions to improve forecasting accuracy.

"Du Su Rui" is very likely to land in southern Fujian, Fujian. "Du Su Rui" will move west by north at a speed of 10-15 kilometers per hour and turn northwest. coastal.

Guess you like

Origin blog.csdn.net/weixin_42878111/article/details/131876030