WPS隻是WRF運用實際資料模拟的準備過程,這就好比開車要先上車。講完前處理過程之後 WRF模式之WPS的配置運作,就要開始模拟了。
模拟之前同樣需要設定參數,這裡的參數通過 namelist.input 檔案控制,正常的 namelist.input 檔案内容如下:
&time_control
run_days = 1,
run_hours = 0,
run_minutes = 0,
run_seconds = 0,
start_year = 2015, 2015,
start_month = 10, 10,
start_day = 04, 04,
start_hour = 00, 00,
start_minute = 00, 00,
start_second = 00, 00,
end_year = 2015, 2015,
end_month = 10, 10,
end_day = 05, 05,
end_hour = 00, 00,
end_minute = 00, 00,
end_second = 00, 00,
interval_seconds = 21600
input_from_file = .true.,.true.,
history_interval = 10, 5, # 表示多長時間輸出一次結果
frames_per_outfile = 36, 36, # 表示多少個結果輸出到一個檔案
restart = .false.,
restart_interval = 360,
io_form_history = 2
io_form_restart = 2
io_form_input = 2
io_form_boundary = 2
debug_level = 10
/
&domains
time_step = 45,
time_step_fract_num = 0,
time_step_fract_den = 1,
max_dom = 2,
s_we = 1, 1,
e_we = 241, 424,
s_sn = 1, 1,
e_sn = 220, 421,
s_vert = 1, 1,
e_vert = 48, 48,
sfcp_to_sfcp = .false.
dx = 9000, 3000,
dy = 9000, 3000,
grid_id = 1, 2,
parent_id = 0, 1,
i_parent_start = 0, 50,
j_parent_start = 0, 40,
parent_grid_ratio = 1, 3,
parent_time_step_ratio = 1, 3,
feedback = 0,
smooth_option = 1,
num_metgrid_levels = 27,
num_metgrid_soil_levels = 4,
p_top_requested = 5000,
/
&physics
mp_physics = 17, 17,
gsfcgce_hail = 0,
gsfcgce_2ice = 0,
ra_lw_physics = 1, 1,
ra_sw_physics = 1, 1,
radt = 9, 9,
sf_sfclay_physics = 1, 1,
sf_surface_physics = 2, 2,
bl_pbl_physics = 1, 1,
bldt = 0, 0,
cu_physics = 1, 0,
cudt = 5, 0,
surface_input_source = 1,
num_soil_layers = 4,
maxiens = 1,
maxens = 3,
maxens2 = 3,
maxens3 = 16,
ensdim = 144,
/
&fdda
/
&dynamics
w_damping = 1,
diff_opt = 2,
km_opt = 4,
diff_6th_opt = 2,
diff_6th_factor = 0.12,
damp_opt = 0,
base_temp = 290.
zdamp = 5000., 5000.,
dampcoef = 0.2, 0.2,
khdif = 0, 0,
kvdif = 0, 0,
non_hydrostatic = .true., .true.,
time_step_sound = 6, 6,
h_mom_adv_order = 5, 5,
v_mom_adv_order = 5, 5,
h_sca_adv_order = 5, 5,
v_sca_adv_order = 5, 5,
moist_adv_opt = 3,
scalar_adv_opt = 3,
momentum_adv_opt = 3,
chem_adv_opt = 3,
tke_adv_opt = 3,
/
&bdy_control
spec_bdy_width = 5,
spec_zone = 1,
relax_zone = 4,
specified = .true.,
nested = .false., .true.,
/
&grib2
/
&namelist_quilt
nio_tasks_per_group = 0,
nio_groups = 1,
/
複制
一般情況下,在模拟時需要關心的是 &time_control, &domains,&physics部分的參數設定。
&time_control 部分主要控制的是模拟的時間範圍,debug 資訊輸出,輸出格式等資訊。
注意:
&domains 部分的參數設定要和所用初始場以及WPS namelist.wps的一些參數設定相同,否則會出錯。
&physics 部分主要控制的是微實體方案,輻射方案以及積雲對流參數化等的選擇。
&dynamics 部分控制的是動力參數的設定。
&fdda 主要應用于資料同化參數的設定。
還有一些其它部分的參數設定,通常這些部分的參數不需要更改。
大概了解了一下namelist.input的參數設定之後,就可以運作了。再運作之前,先把WPS過程中運作 metgrid.exe 的時候生成了一些 met_em*檔案拷貝或是連結到 WRFV3/run下,當然也可以連結到 WRFV3/test/em_real/ 下。(關于連結和拷貝的指令看這裡 linux常用指令之進階)
開始之前先進入 WRFV3/run 目錄下:
-
連結 met_em* 檔案
ln -sf ../../WPS/met_em.d0* .
注意: 指令後的 . 不能省,這裡的 . 表示目前路徑。
-
初始化氣象要素
./real.exe
運作成功後會生成一些檔案,wrfbdy_d01,wrfinput_d*
-
模拟積分——開始模拟
./wrf.exe
上述方式為串行運作,如果編譯支援并行運算的話,可以執行以下指令:
mpirun -np 4 ./wrf.exe
表示使用4個處理器進行運算。當然, real.exe 也支援并行運算。
然後就等模拟結束就行了。耗時長短與模拟個例時間長短,嵌套層數多少,模拟域範圍大小等因素有關。當然,如果出錯了的話就另說了==
模拟結束之後會生成一系列輸出檔案,比如:wrfout_d01_2015-10-04_00:00:00 等檔案。可能沒有字尾,但是預設的輸出檔案格式為 nc。模拟結束之後就是後處理過程了。
關于模式後處理,之前也提到過一些:
真・WRF模式後處理之Python版
WRF模式後處理
高維資料可視化
後處理過程其實就是處理資料的過程。使用什麼工具或是程式設計語言都可以,沒有限制。隻要你能得到想要的結果就行了。