包含泰国国内经纬度格点区域的陆地(岸上)2米气温数据,数据以每小时为单位。数据来自于 Corpernicus Climate Data Store 获取,在 ERA5-Land hourly data from 1950 to present 上提供。在本文中,泰国地区的纬度范围为[5.77434, 20.43353],经度范围为[97.96852, 105.22908]。有关数据的更多详细信息,请参考 ERA5-Land hourly data from 1950 to present 。
以下是使用Python通过 CDS API 进行数据查询的示例,在月度请求中。脚本可以在 here 中找到。
import cdsapi
c = cdsapi.Client()
month_list = [str(num).zfill(2) for num in range(1, 13)]
day_list = [str(num).zfill(2) for num in range(1, 32)]
time_list = [str(num).zfill(2) + ":00" for num in range(0, 24)]
year_list = [str(num) for num in range(2000, 2022)]
for year in year_list:
for month in month_list:
c.retrieve('reanalysis-era5-land',
{
'variable': [
'2m_temperature']
,
'year': year,
'month' : month,
'day': day_list,
'time': time_list,
'format': 'grib',
'area': [
20.43, 97.96, 5.77,
105.22,
],
},
f'{year}_{month}_hourly_2m_temp_TH.grib')
直接从API输出的文件格式为.grib,为了方便进一步的分析工作,我已将其转换为.parquet格式。要将GRIB格式转换为pandas数据帧,您可以使用 xrray 和 cfgrib 库来帮助,如下面的示例代码片段所示。
import xarray as xr
import cfgrib
ds = xr.open_dataset('2022_12_31_hourly_2m_temp_TH.grib', engine='cfgrib')
df = ds.to_dataframe().reset_index()
Climate Data Store Product Licensing
这些数据是使用Copernicus气候变化服务的信息生成的,并且包含修改过的Copernicus气候变化服务的数据,数据时段为1999年12月31日至2023年5月8日
Muñoz Sabater, J. (2019): ERA5陆地每小时数据从1950年至今。Copernicus气候变化服务(C3S)气候数据存储(CDS)。DOI: 10.24381/cds.e2161bac (于2023年5月13日访问)
Copernicus气候变化服务(C3S)(2022年):ERA5陆地每小时数据从1950年至今。Copernicus气候变化服务(C3S)气候数据存储(CDS)。DOI: 10.24381/cds.e2161bac (于2023年5月13日访问)