该文章主要完成:
1、定制下载ERA5数据
2、nc数据提取为各个单波段影像
3、提取后的各个波段进行栅格运算和保存
1、定制下载ERA5数据
ERA在线编译器下载ERA5数据:利用数据平台的在线编译器toolbox-editor,编写脚本文件,将GRIB格式数据转为nc格式进行下载,脚本如下:
API下载ERA5数据
import cdsapi
c = cdsapi.Client()
for i in range (2019,2020):
print (i)
c.retrieve(
'reanalysis-era5-single-levels-monthly-means',
{
'product_type': 'monthly_averaged_reanalysis',
'variable': 'total_precipitation',
'year': str(i),
'month': [
'01', '02', '03',
'04', '05', '06',
'07', '08', &#