为了更好的理解WRF运行过程中的各种参数设置,就找了一篇资料比较好找、分辨率没那么高的个例,自己来实际临摹一下这个模拟的过程。详细的记录了模拟的整个过程,包括WRFdomain设置模拟范围,WRF前处理、模拟流程,namelist.wps和namelist.input设置参数详情,ncdump查看wrfout结果的头文件,最后和原文对比500hPa形势可以看出模拟效果较好。(硕士论文比期刊文献描述的要详细一些)
参考文献:黄玉蓉. 2013年“菲特”台风的数值模拟研究[D].上海海洋大学,2015.
NCEP再分析资料FNL资料:为模式提供三维大气初始条件和随时间变化的边界条件。https://rda.ucar.edu/datasets/ds083.2/index.html#!access.
观测、模拟跨度:2013年10月5日20时-7日14时
登录后按所需时间选Grib1或Grib2(2007年以后)。点击web file listing和complete file list。选择需要的时次。
(也可以手动下载)点击python下载得到.py文件,在共享文件夹下运行,输入密码后可直接等待.
参考:https://blog.csdn.net/weixin_42487488/article/details/114035586
官网的下载网址: https://www.esrl.noaa.gov/gsd/wrfportal/DomainWizard.html
mkdir WRFDomainWizard/
cd WRFDomainWizard/
unzip WRFDomainWizard.zip
设置环境变量
chmod +x run_DomainWizard #使运行程序生效
run_DomainWizard #运行
######### set envirment for WRFDomainWizard #####
export PATH=/home/tian/WRF/WRFDomainWizard:$PATH
区域中心外侧网格(125°E,25°N),水平方向500×500,水平格距9km(先计算外层嵌套模拟)
内侧网格(118.74°E,22.3°N),水平方向721×721,水平格距3km
模拟垂直分层41层,层顶10hPa
外层网格时间步长90s,内侧网格时间步长30s
namelist.wps【&geogrid】和namelist.input【&domains】在文件夹里面生成
原文如下:
&share
wrf_core = 'ARW',
max_dom = 2,
start_date = '2013-10-05_00:00:00','2013-10-05_00:00:00',
end_date = '2013-10-07_18:00:00','2013-10-07_18:00:00',
interval_seconds = 21600
io_form_geogrid = 2,
/
&geogrid
parent_id = 1, 1,
parent_grid_ratio = 1, 3,
i_parent_start = 1, 16,
j_parent_start = 1, 32,
e_we = 150, 217,
e_sn = 150, 217,
geog_data_res = 'default','default',
dx = 30000,
dy = 30000,
map_proj = 'lambert',
ref_lat = 25,
ref_lon = 125,
truelat1 = 30.0,
truelat2 = 60.0,
stand_lon = 125,
geog_data_path = '/vol6/home/cxp/share/geog/'
/
&ungrib
out_format = 'WPS',
prefix = 'FILE',
/
&metgrid
fg_name = 'FILE'
io_form_metgrid = 2,
/
ncl util/plotgrids_new.ncl
运行./geogrid.exe生成地形文件geo_em*
./geogrid.exe
查看geo_em*结果文件大小
du -sh geo_em*
到~/WRF/WPS/ungrib/Variable_Tables/文件夹下查找适用于FNL的Vtable文件:Vtable.GFS,再连接到Vtable用于读取FNL变量信息。
ln -sf ungrib/Variable_Tables/Vtable.GFS Vtable
./link_grib.csh /media/sf_WRF/Download/fnl_201310*
./ungrib.exe
注:ungrib.exe和geogrid.exe两个进程无论先后,两者都是metgrid.exe的准备步骤,分别准备模式能用的地理资料和模式能用的气象资料用于初始场和边界条件,之后再met整合。
./metgrid.exe
论文中选用参数化方案:
namelist.input 原文如下:
&time_control
run_days = 2,
run_hours = 18,
run_minutes = 0,
run_seconds = 0,
start_year = 2013, 2013, 2013,
start_month = 10, 10, 10,
start_day = 05, 05, 05,
start_hour = 00, 00, 00,
start_minute = 00, 00, 00,
start_second = 00, 00, 00,
end_year = 2013, 2013, 2013,
end_month = 10, 10, 10,
end_day = 07, 07, 05,
end_hour = 18, 18, 18,
end_minute = 00, 00, 00,
end_second = 00, 00, 00,
interval_seconds = 21600
input_from_file = .true.,.true.,.true.,
history_interval = 360, 360, 3600,
frames_per_outfile = 1, 1, 1,
restart = .false.,
restart_interval = 100000,
io_form_history = 2
io_form_restart = 2
io_form_input = 2
io_form_boundary = 2
debug_level = 0
/
&domains
time_step = 60,
time_step_fract_num = 0,
time_step_fract_den = 1,
max_dom = 2,
e_we = 150, 217, 94,
e_sn = 150, 217, 91,
e_vert = 30, 30, 30,
p_top_requested = 5000,
num_metgrid_levels = 27,
num_metgrid_soil_levels = 4,
dx = 30000, 10000, 10000,
dy = 30000, 10000, 10000,
grid_id = 1, 2, 3,
parent_id = 1, 1, 2,
i_parent_start = 1, 16, 30,
j_parent_start = 1, 32, 30,
parent_grid_ratio = 1, 3, 3,
parent_time_step_ratio = 1, 3, 3,
feedback = 1,
smooth_option = 0
/
&physics
mp_physics = 4, 4, 4,
ra_lw_physics = 1, 1, 1,
ra_sw_physics = 1, 1, 1,
radt = 30, 30, 30,
sf_sfclay_physics = 1, 1, 1,
sf_surface_physics = 2, 2, 2,
bl_pbl_physics = 1, 1, 1,
bldt = 0, 0, 0,
cu_physics = 1, 1, 1,
cudt = 5, 5, 5,
isfflx = 1,
ifsnow = 1,
icloud = 1,
surface_input_source = 1,
num_soil_layers = 6,
sf_urban_physics = 0, 0, 0,
/
&fdda
/
&dynamics
w_damping = 1,
diff_opt = 1, ! 1, 1,
km_opt = 4, 4, 4,
diff_6th_opt = 2, 0, 0,
diff_6th_factor = 0.12, 0.12, 0.12,
base_temp = 290.
damp_opt = 0,
zdamp = 5000., 5000., 5000.,
dampcoef = 0.2, 0.2, 0.2
khdif = 0, 0, 0,
kvdif = 0, 0, 0,
non_hydrostatic = .true., .true., .true.,
scalar_adv_opt = 1, 1, 1,
gwd_opt = 1,
/
&bdy_control
spec_bdy_width = 5,
spec_zone = 1,
relax_zone = 4,
specified = .true., .false.,.false.,
nested = .false.,.true.,.true.,
/
&grib2
/
&namelist_quilt
nio_tasks_per_group = 0,
nio_groups = 1,
/
把WPS生成的met打头的文件拷贝(或链接)到WRF的run文件夹
ln -sf …/…/WPS/met_em.d0* .
./real.exe
生成
生成rsl.out.0000和rsl.error.0000
tail/cat rsl.error.0000可以看是否有错,成功则显示:real_em: SUCCESS COMPLETE REAL_EM INIT
./wrf.exe
ncdump -h wrfout_d01_2013-10-05_00:00:00.nc >headwrfout.log
具体代码见后续。
模拟500hPa高度场,对应UTC。
模式输出时次为0512、0516、0600、0606、0612、0618、0700、0706UTC,加8为北京时。
对比原文中,副高的位置、形状基本一致,气旋登陆的时间相同。但并未输出气旋中心气压强度对比。故500hPa模拟形势的效果令人满意。有时间还可以输出其他变量,和原文中进行一一对比。