WRF | ERA5驱动所需要素下载以及注意事项

文摘   2024-10-25 12:45   北京  

WRF | ERA5驱动所需要素下载以及注意事项

个人信息

公众号:气python风雨

Image Name

关注我获取更多学习资料,第一时间收到我的Python学习资料,也可获取我的联系方式沟通合作

前言

近期由于需要使用era5作为初始场运行wrf,写一下笔记吧

不过这点前辈们已经写得很完整了,本次纯当记录

Image Name

最近排队下载实在慢的很

变量需要

高空数据需要以下变量:

'geopotential', 'relative_humidity', 'specific_humidity', 'temperature', 'u_component_of_wind', 'v_component_of_wind'

地面数据需要以下变量:

'surface_pressure', 'mean_sea_level_pressure', '10m_u_component_of_wind', '10m_v_component_of_wind', '2m_temperature', 'sea_surface_temperature', 'skin_temperature', '2m_dewpoint_temperature', 'snow_depth', 'sea_ice_cover', 'land_sea_mask', 'soil_type', 'soil_temperature_level_1', 'soil_temperature_level_2', 'soil_temperature_level_3', 'soil_temperature_level_4', 'volumetric_soil_water_layer_1', 'volumetric_soil_water_layer_2', 'volumetric_soil_water_layer_3', 'volumetric_soil_water_layer_4'

下载脚本

高空变量

import cdsapi

c = cdsapi.Client()

c.retrieve(
    'reanalysis-era5-pressure-levels',
    {
        'product_type''reanalysis',
        'format''grib',
        'variable': [
            'geopotential''relative_humidity''temperature','specific_humidity',
            'u_component_of_wind''v_component_of_wind','vertical_velocity'
        ],
        'pressure_level': [
            '1''2''3',
            '5''7''10',
            '20''30''50',
            '70''100''125',
            '150''175''200',
            '225''250''300',
            '350''400''450',
            '500''550''600',
            '650''700''750',
            '775''800''825',
            '850''875''900',
            '925''950''975',
            '1000',
        ],
        'year''2024',       ### 时间范围设置
        'month''09',
        'day': ['01','02','03','04'],
        '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': [                 ##区域设置
            50.0070.0012.00,
            130.00,
        ],

    },
    'ERA5-2024-09_01-04_pl.grib')   ### 文件名设置

地表变量

import cdsapi

c = cdsapi.Client()

c.retrieve(
    'reanalysis-era5-single-levels',
    {
        'product_type''reanalysis',
        'format''grib',
        'variable': [
         '10m_u_component_of_wind','10m_v_component_of_wind','2m_dewpoint_temperature',
            '2m_temperature','forecast_albedo',
            'forecast_surface_roughness','high_cloud_cover',
            'land_sea_mask','low_cloud_cover',
            'mean_sea_level_pressure','medium_cloud_cover',
            'sea_ice_cover','sea_surface_temperature',
            'skin_temperature','snow_albedo',
            'snow_depth','surface_pressure',
            'total_cloud_cover',
            'total_column_water','total_column_water_vapour',
            'soil_temperature_level_1','soil_temperature_level_2',
            'soil_temperature_level_3','soil_temperature_level_4','volumetric_soil_water_layer_1','volumetric_soil_water_layer_2',
            'volumetric_soil_water_layer_3','volumetric_soil_water_layer_4'
        ],
        'year''2024',
        'month''09',
        'day': ['01','02','03','04'],
        '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': [                 ##区域设置
            50.0070.0012.00,
            130.00,
        ],
    },
    'ERA5-2024-09_01-04-sl.grib')

注意事项

  1. 1. 在链接 Vtable 时注意需要是Vtable.ECMWF

  2. 2. 在链接下载的era5数据时直接高空、地面一起链接

  3. 3. namelist.input中num_metgrid_levels = 38,这与GFS、fnl的34层不同

  4. 4. 如果碰到- FATAL CALLED
    FATAL CALLED FROM FILE: 

    LINE: 3415
    mismatch landmask ivgtyp
    这种报错,则将namelist.input中的surface_input_source = 3 改为1

小结

理论上era5确实会比GFS这种预报数据要准,但是并没有(对于个别个例而言)

数值模拟发展到现在这种地步,对我来说已经有一定程度的黑盒的感觉,不过对大佬来说应该不是黑盒

如果遇到问题欢迎评论区交流

参考

https://blog.csdn.net/weixin_44237337/article/details/123377008

https://github.com/magicleung/Run-WRF-model-driven-by-ERA5/blob/main/README.md


气python风雨
主要发一些涉及大气科学的Python文章与个人学习备忘录
 最新文章