使用GFS数据驱动WRF模式场--2层嵌套 全过程学习记录

使用GFS数据驱动WRF模式

实验要求

  • 2层嵌套,第一层为450x450个网格点,第二层为630x630个网格点
  • 经纬向网格间距:第一层为10km,第二层为3.3333km
  • 中心纬度为,中心经度为150°E
  • 时间为2022年02月17日0时-6时

Down GFS data

数据下载网址:

https://nomads.ncep.noaa.gov/pub/data/nccf/com/gfs/prod/gfs.20220217/00/atmos/

数据:分辨率为1°x1°,每3个小时报一次。时间为2022年2月17日0时开始

gfs.t00z.pgrb2.1p00.f000                     17-Feb-2022 03:36   40M  
gfs.t00z.pgrb2.1p00.f003                     17-Feb-2022 03:37   43M  
gfs.t00z.pgrb2.1p00.f006                     17-Feb-2022 03:39   43M  

使用downthemall 批量下载:

image-20220225164054792

Upload GFS data to linux server

WPS前处理

1、链接到GFS Vtable

首先使用cd 命令,换到该数据所处路径下。然后使用命令进行链接:

cd  /Users/WRF/GFS_practice/
ln -sf ungrib/Variable_Tables/Vtable.GFS Vtable

然后,使用命令cd到WPS路径下将你下载的GFS数据进行链接,使用命令如下:

cd  /Users/WRF/WPS/
./link_grib.csh ../GFS_practice/gfs.t00z.pgrb2.1p00.f*

成功后在该文件下应该会出现一个vtable的文件

image-20220225172308492

下面几步操作还是在WPS路径下

2、ungrid

打开namelist.wps进行编辑,把时间改成你数据对应的时间范围:

image-20220225172600869

运行./ungrib.exe命令,显示如下表示成功

image-20220225172708174

3、geogrid

确保你有陆地数据,编辑namelist.wps中的geogrid部分。

&geogrid
 parent_id         =   1,      1,      2,
 parent_grid_ratio =   1,      3,      3,
 i_parent_start    =   1,      122,    200,
 j_parent_start    =   1,      123,    180,
 e_we              =   450,    631,   1781,    
 e_sn              =   450,    631,   1781,
 geog_data_res     = 'default', 'default',  'default',
 dx = 10000,
 dy = 10000,
 map_proj  = 'mercator',
 ref_lat   =  0.00,
 ref_lon   = 150.00,
 truelat1  =  15.0,
 truelat2  =  30.0,
 stand_lon = 150.00,
  geog_data_path = '/Software/Models/WRF/WPS_GEOG',

确保区域位于正确的位置,运行以下代码进行查看:

ncl util/plotgrids_new.ncl

image-20220225231754022

确认好区域位置后,进行geogrid,运行命令:./geogrid.exe,运行成功显示如下内容:

image-20220225232037085

同时,你会得到如下文件:

image-20220225232100244

4、Metgrid

下面进行插值,将数据插值到模式区域,这里不需要对namelis.wps进行修改。运行命令:

./metgrid.exe

image-20220225232333579

同时会得到相应插值后的nc格式的文件:

image-20220225232413818

以上,WPS前处理完成。下面进行WRF处理。

WRF后处理

主要以下三步:

  • 1、链接在WPS中插值出的数据
  • 2、运行./real.exe
  • 3、运行./wrf.exe

链接插值的nc数据

使用cd命令切换到WRF/run/ 下,首先需要链接刚刚插值的数据:

ln -sf ../../../GFSout/met_em.* .

第二步,对namelist.input进行编辑,部分内容需要与WPS下的namelist.wps内容一致

 &time_control
 run_days                            = 0,
 run_hours                           = 06,
 run_minutes                         = 0,
 run_seconds                         = 0,
 start_year                          = 2022, 2022, 2022,
 start_month                         = 02,   02,   02,
 start_day                           = 17,   17,   17,
 start_hour                          = 00,   00,   00,
 end_year                            = 2022, 2022, 2022,
 end_month                           = 02,   02,   02,
 end_day                             = 17,   17,   17,
 end_hour                            = 06,   06,   06,
 interval_seconds                    = 21600
 input_from_file                     = .true.,.true.,.true.,
 history_interval                    = 60,  60,   60,    # 设置输出的时间,每一小时一个
 frames_per_outfile                  = 1000, 1000, 1000,
 restart                             = .false.,
 restart_interval                    = 1440,
 io_form_history                     = 2
 io_form_restart                     = 2
 io_form_input                       = 2
 io_form_boundary                    = 2
 /

 &domains
 time_step                           = 60,
 time_step_fract_num                 = 0,
 time_step_fract_den                 = 1,
 max_dom                             = 2,
 e_we              =   450,    631,   1781,    
 e_sn              =   450,    631,   1781,
 e_vert                              = 33,    33,   33,
 p_top_requested                     = 5000,
 num_metgrid_levels                  = 34,
 num_metgrid_soil_levels             = 4,
 dx                                  =  10000,  3333.33,
 dy                                  =  10000,  3333.33,
 grid_id                             = 1,     2,     3,
 parent_id         =   1,      1,      2,
 parent_grid_ratio =   1,      3,      3,
 i_parent_start    =   1,      122,    200,
 j_parent_start    =   1,      123,    180,
 parent_time_step_ratio              = 1,     3,     3,
 feedback                            = 1,
 smooth_option                       = 0
 /

运行./real.exe

编辑好之后,确保与WPS前处理中的namelist.wps中的保证一致后,运行命令:./real.exe

image-20220225233725399

同时,会得到如下三个文件:

image-20220225233757565

运行./wrf.exe

之后,运行wrf.exe,生成以下文件表示成功

image-20220226163941686

Note:

如果设置的起始终止时间比较久,可以上传到学院集群中进行运行。或者编辑一个.sh脚本文件,放在服务器后台运行。

验证模式数据

对跑出来的数据进行验证,检验区域是否正确。使用ncview进行查看:

image-20220226163848832

可以发现,与之间使用ncl命令查看的区域是一致的。本文只是学习记录过程, 部分地方可能存在问题欢迎大家指正!

  • 5
    点赞
  • 30
    收藏
    觉得还不错? 一键收藏
  • 打赏
    打赏
  • 1
    评论
引用\[1\]和\[2\]提到了关于Python在WRF自动化运行方面的应用。其中,Python可以用于自动下载GFS实时预报资料,自动运行WRF预报系统,以及自动发送邮件提示WRF运行结果。引用\[3\]提到了Python基础知识,包括安装和基础语法,常用的气象数据处理库,以及气象绘图基础。综合这些引用内容,可以得出结论:wrf-python是指使用Python编程语言进行WRF模型的自动化运行和数据处理的工具。它可以帮助用户实现自动下载预报资料、运行WRF模型、处理模型输出数据以及绘制气象图像等功能。 #### 引用[.reference_title] - *1* [【案例实践】WRF-Python融合技术:WRF 模式前后处理、自动化运行、数据处理、可视化绘图](https://blog.csdn.net/weixin_49857990/article/details/128327638)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v91^control_2,239^v3^insert_chatgpt"}} ] [.reference_item] - *2* *3* [Python在WRF模型自动化运行及前后处理中的应用](https://blog.csdn.net/WangYan2022/article/details/126246836)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v91^control_2,239^v3^insert_chatgpt"}} ] [.reference_item] [ .reference_list ]

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

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

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

简朴-ocean

继续进步

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

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

余额充值