ERA5下载记录
数据介绍
ERA5数据是由欧洲中期天气预报中心(ECMWF)建立的一套再分析数据。整套数据的前身为ERA-interim,二者的差别可以看这里。目前ERA5的数据集主要包括以下几种:
准备工作
CDS
- 包安装
pip install cdsapi
PS:下载缓慢的换自行换源或者选择fq
数据选择与选择
数据选择
进去后发现有对应的数据介绍,确定好自己的需求进行下载
数据下载:
这里我选择再分析数据:2m露点温度和10m u 向风速
时间范围选择:
这里我选择2015-2020年的逐小时数据
经纬度选择
格式选择:
API_request:
代码正常情况下是可以直接复制下来的,不能复制的话F12选择元素->复制元素,稍微删改就行
<pre class="toolBoxRequestPreviewClass ng-binding" ng-class="{'nocopy-form-not-ok': !$ctrl.cdsForm.$valid || !$ctrl.allModelValid || !$ctrl.selectionsWithinLimit}" style="">import cdsapi
c = cdsapi.Client()
c.retrieve(
'reanalysis-era5-single-levels',
{
'product_type': 'reanalysis',
'format': 'netcdf',
'variable': '2m_dewpoint_temperature',
'year': [
'2015', '2016', '2017',
'2018', '2019', '2020',
],
'month': [
'01', '02', '03',
'04', '05', '06',
'07', '08', '09',
'10', '11', '12',
],
'day': [
'01', '02', '03',
'04', '05', '06',
'07', '08', '09',
'10', '11', '12',
'13', '14', '15',
'16', '17', '18',
'19', '20', '21',
'22', '23', '24',
'25', '26', '27',
'28', '29', '30',
'31',
],
'time': [
'00:00', '01:00', '02:00',
'03:00', '04:00', '05:00',
'06:00', '07:00', '08:00',
'09:00', '10:00', '11:00',
'12:00', '13:00', '14:00',
'15:00', '16:00', '17:00',
'18:00', '19:00', '20:00',
'21:00', '22:00', '23:00',
],
},
'download.nc')</pre>
API下载
我使用的是Jupyter进行的代码运行,选择自己喜欢的IDE就行
代码仅供参考:
import os
import cdsapi
variable=['10m_u_component_of_wind', '10m_v_component_of_wind', '2m_dewpoint_temperature','2m_temperature','boundary_layer_height', 'k_index','surface_pressure', 'total_precipitation']
for i in range(2015,2021):
for v in variable:
filePath=r"G:\\ERA\\new"
filename=filePath+os.sep+str(v)+str(i)+".nc"
c=cdsapi.Client()
c.retrieve('reanalysis-era5-single-levels',{'product_type': 'reanalysis',
'format': 'netcdf',
'variable': v,
'year': i,
'month': [
'01', '02', '03',
'04', '05', '06',
'07', '08', '09',
'10', '11', '12',
],
'day': [
'01', '02', '03',
'04', '05', '06',
'07', '08', '09',
'10', '11', '12',
'13', '14', '15',
'16', '17', '18',
'19', '20', '21',
'22', '23', '24',
'25', '26', '27',
'28', '29', '30',
'31',
],
'time': [
'00:00', '01:00', '02:00',
'03:00', '04:00', '05:00',
'06:00', '07:00', '08:00',
'09:00', '10:00', '11:00',
'12:00', '13:00', '14:00',
'15:00', '16:00', '17:00',
'18:00', '19:00', '20:00',
'21:00', '22:00', '23:00',
],
'area': [
43, 113, 36,
120,
],
},
filename)
PS:下载一般是挺慢的,等待就行;实在等不了,国内目前有个加速下载的,可以自行查看
公益项目 ERA5资料国内镜像(Beta)
AWS上貌似也有镜像的版本
气象数据 | 亚马逊开放数据项目(AWS),可用于下载ERA5数据等
参考:
1.https://blog.csdn.net/weixin_44975806/article/details/100083897
2.https://zhuanlan.zhihu.com/p/359673661
3.https://blog.csdn.net/Shirley_hetao/article/details/113122459
4.https://blog.csdn.net/weixin_44975806/article/details/100083897