ERA5(在分析数据)在线导出

简介

ERA5是第五代ECMWF再分析,用于分析过去80年的全球气候和天气。数据从 1940 年开始提供。ERA5取代了ERA-Interim再分析。

再分析利用物理定律将模型数据与全球观测数据结合起来,形成一个全球完整一致的数据集。这一原理被称为数据同化,它以数值天气预报中心使用的方法为基础,每隔若干小时(ECMWF 为 12 小时)将先前的预报与新获得的观测数据以最佳方式结合起来,对大气状态做出新的最佳估计,称为分析,并据此发布最新的改进预报。再分析以同样的方式工作,但分辨率降低,以便提供几十年前的数据集。再分析没有及时发布预报的限制,因此有更多的时间来收集观测数据,当时间进一步追溯时,还可以摄取原始观测数据的改进版本,这些都有利于提高再分析产品的质量。

ERA5提供了大量大气、海洋波浪和陆地表面数量的每小时估计值。不确定性估计值是由一个基本的 10 成员集合以每三小时一次的间隔进行采样的。为方便起见,预先计算了集合平均值和扩散值。这种不确定性估计与现有观测系统的信息内容密切相关,而观测系统随着时间的推移已经发生了很大变化。它们还显示了与流量有关的敏感区域。为了方便许多气候应用,还预先计算了月平均值,但没有提供集合平均值和频差的月平均值。

ERA5每天更新,延迟时间约为5天。如果在早期版本(称为 ERA5T)中发现严重缺陷,该数据可能与 2 至 3 个月后的最终版本不同。如果出现这种情况,我们会通知用户。

这里提供的数据集是ERA5完整数据集的一个重新网格化子集,采用原始分辨率。它通过旋转磁盘在线提供,可确保快速、方便地访问。它应能满足大多数常见应用的要求。

ERA5所有数据集的概述可在本文中找到。本指南提供了有关以原始分辨率访问ERA5数据的信息。

再分析数据已重新划分为 0.25 度的常规纬-纬网格,不确定性估计数据为 0.5 度(海浪数据分别为 0.5 度和 1 度)。主要有四个子集:小时和月度产品,包括压力级(高层气场)和单一级别(大气、海洋波浪和陆地表面量)。

目前的条目是 “ERA5 从 1940 年至今的单级每小时数据”。

通过www.DeepL.com/Translator(免费版)翻译

网址:https://cds.climate.copernicus.eu/cdsapp#!/dataset/reanalysis-era5-land?tab=form

选择数据

在这里插入图片描述

可以根据代码下载和导出数据

在这里插入图片描述
但需要配置

 pip install csdapi

同时根据这个网址https://cds.climate.copernicus.eu/api-how-to,配置一个名为.cdsapirc的文件,不然会报错,里面内容为:
url: https://cds.climate.copernicus.eu/api/v2
key: 242098:811f15ef-4ae4-41d9-92fb-a187a0

key是自己的,自行注册可得!
在这里插入图片描述
这样还是要下载才能分析,现在是在线分析方案,速度较快。

在线导出方案

打开https://cds.climate.copernicus.eu/toolbox-editor在线运行一下代码即可实现在线绘图以及导出csv数据或者栅格。

import cdstoolbox as ct

layout = {
    'input_ncols': 3,
}

variables = {
    'Total Precipitation': 'total_precipitation',

    'Near-Surface Air Temperature': '2m_temperature',
    'Eastward Near-Surface Wind': '10m_u_component_of_wind',
    'Northward Near-Surface Wind': '10m_v_component_of_wind',
    'Sea Level Pressure': 'mean_sea_level_pressure',
    'Sea Surface Temperature': 'sea_surface_temperature',
}


@ct.application(title='Extract a time series and plot graph', layout=layout)
@ct.input.dropdown('var', label='Variable', values=variables.keys(), description='Sample variables')
@ct.input.text('lon', label='Longitude', type=float, default=115.5, description='Decimal degrees')
@ct.input.text('lat', label='Latitude', type=float, default=20.2, description='Decimal degrees')
@ct.output.livefigure()
def plot_time_series(var, lon, lat):
    """
    Application main steps:

    - set the application layout with 3 columns for the input and output at the bottom
    - retrieve a variable over a defined time range
    - select a location, defined by longitude and latitude coordinates
    - compute the daily average
    - show the result as a timeseries on an interactive chart

    """

    # Time range
    data = ct.catalogue.retrieve(
        'reanalysis-era5-single-levels',
        {
            'variable': variables[var],
            'grid': ['3', '3'],
            'product_type': 'reanalysis',
            'year': [

             '2021', '2022','2023',
            ],
            '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', '06:00', '12:00', '18:00'],
        }
    )

    # Location selection

    # Extract the closest point to selected lon/lat (no interpolation).
    # If wrong number is set for latitude, the closest available one is chosen:
    # e.g. if lat = 4000 -> lat = 90.
    # If wrong number is set for longitude, first a wrap in [-180, 180] is made,
    # then the closest one present is chosen:
    # e.g. if lon = 200 -> lon = -160.
    data_sel = ct.geo.extract_point(data, lon=lon, lat=lat)

    # Daily mean on selection
    data_daily = ct.climate.daily_mean(data_sel)

    fig = ct.chart.line(data_daily)
        #导出为CSV格式
    csv_data=ct.cdm.to_csv(data_daily)
    return fig ,csv_data

点击运行run

在这里插入图片描述

导出时序数据(以案例为例子,不是本博客代码(运行有点慢))

在这里插入图片描述

结果

在这里插入图片描述

  • 22
    点赞
  • 26
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值