网上已经有很多关于WRF的安装教程,emmmm本人安装了7天左右。。。这里只简单写开始运行后的命令(方便我自己记录哈哈哈哈)
1、进入WPS文件夹
(小白们可以先手动找到WPS文件夹位置hhh)
cd ./WPS-4.3.1
ls (我一般会看看底下的文件,个人习惯哦)
2、编写namelist.wps
谁没有经历过无限修改namelist的时候呢,不废话,直接附上可以成功运行的namelist!!(小白试跑时可以借用哈)
&share
wrf_core = 'ARW',
max_dom = 2,
start_date = '2016-11-10_00:00:00','2016-11-10_00:00:00',
end_date = '2016-11-14_18:00:00','2016-11-14_18:00:00',
interval_seconds = 21600
io_form_geogrid = 2,
/
&geogrid
parent_id = 0, 1,
parent_grid_ratio = 1, 3,
i_parent_start = 1, 36,
j_parent_start = 1, 31,
e_we = 130, 175,
e_sn = 106, 130,
!
!!!!!!!!!!!!!!!!!!!!!!!!!!!! IMPORTANT NOTE !!!!!!!!!!!!!!!!!!!!!!!!!!!!
! The default datasets used to produce the HGT_M, GREENFRAC,
! and LU_INDEX/LANDUSEF fields have changed in WPS v3.8. The HGT_M field
! is now interpolated from 30-arc-second USGS GMTED2010, the GREENFRAC
! field is interpolated from MODIS FPAR, and the LU_INDEX/LANDUSEF fields
! are interpolated from 21-class MODIS.
!
! To match the output given by the default namelist.wps.fire in WPS v3.7.1,
! the following setting for geog_data_res may be used:
!
! geog_data_res = 'gtopo_30s+usgs_30s+nesdis_greenfrac+30s','gtopo_2m+usgs_2m+nesdis_greenfrac+2m', [repeat the previous string...]
!
!!!!!!!!!!!!!!!!!!!!!!!!!!!! IMPORTANT NOTE !!!!!!!!!!!!!!!!!!!!!!!!!!!!
!
geog_data_res = 'default','default',
dx = 9000,
dy = 9000,
map_proj = 'lambert',
ref_lat = 41.85,
ref_lon = 114.60,
truelat1 = 30.0,
truelat2 = 60.0,
stand_lon = 114.5,
geog_data_path = '/home/yangluoqi/WRF/WRF-4.3.3/WPS_GEOG/'
/
&ungrib
out_format = 'WPS',
prefix = 'FILE',
/
&metgrid
fg_name = 'FILE'
io_form_metgrid = 2,
/
注意一定要Save!
3、初始化地形和空间格点
./geogrid.exe
(会出现Successful,即为运行成功)
4、(此环节可以在namelist.wps编写中运行,也可后续运行)
找到ncl位置,我是用的conda,这里只简单概述conda下ncl的使用
source activate
conda activate ncl_stable
ncl plotgrids_new.ncl(画嵌套图)
5、ln -sf ungrib/Variable_Tables/Vtable.GFS Vtable
6、./link_grib.csh /home/...FNL/fnl*
找到fnl文件位置,链接
会出现GRIBFILE.AAA等哦~
7、./ungrib.exe
如上。出现Successful为运行成功,出现FILE:YYYY-MM-DD*文件
8、插值到地形文件
./metgrid.exe
一如既往的如上!!!会出现met_em.d01*.nc
9、进入WRF文件夹
cd WRF-4.3.3
修改input,话不多说,直接附上input案例。(可直接跑)
gedit namelist.input
&time_control
run_days = 0,
run_hours = 114,
run_minutes = 0,
run_seconds = 0,
start_year = 2016, 2016,
start_month = 11, 11,
start_day = 10, 10,
start_hour = 00, 00,
end_year = 2016, 2016,
end_month = 11, 11,
end_day = 14, 14,
end_hour = 18, 18,
interval_seconds = 21600
input_from_file = .true.,.true.,
history_interval = 60, 60,
frames_per_outfile = 1000, 1000,
restart = .false.,
restart_interval = 7200,
io_form_history = 2
io_form_restart = 2
io_form_input = 2
io_form_boundary = 2
/
&domains
time_step = 54,
time_step_fract_num = 0,
time_step_fract_den = 1,
max_dom = 2,
e_we = 130, 175,
e_sn = 106, 130,
e_vert = 33, 33,
p_top_requested = 5000,
num_metgrid_levels = 32,
num_metgrid_soil_levels = 4,
dx = 9000, 3000,
dy = 9000, 3000,
grid_id = 1, 2,
parent_id = 0, 1,
i_parent_start = 1, 36,
j_parent_start = 1, 31,
parent_grid_ratio = 1, 3,
parent_time_step_ratio = 1, 3,
feedback = 1,
smooth_option = 0
/
&physics
mp_physics = 3, 3,
ra_lw_physics = 1, 1,
ra_sw_physics = 1, 1,
radt = 30, 30,
sf_sfclay_physics = 1, 1,
sf_surface_physics = 2, 2,
bl_pbl_physics = 1, 1,
bldt = 0, 0,
cu_physics = 1, 1,
cudt = 5, 5,
isfflx = 1,
ifsnow = 1,
icloud = 1,
surface_input_source = 3,
num_land_cat = 21,
sf_urban_physics = 0, 0,
/
&fdda
/
&dynamics
hybrid_opt = 2,
w_damping = 0,
diff_opt = 1, 1,
km_opt = 4, 4,
diff_6th_opt = 0, 0,
diff_6th_factor = 0.12, 0.12,
base_temp = 290.
damp_opt = 0,
zdamp = 5000., 5000.,
dampcoef = 0.2, 0.2,
khdif = 0, 0,
kvdif = 0, 0,
non_hydrostatic = .true., .true.,
moist_adv_opt = 1, 1,
scalar_adv_opt = 1, 1,
/
&bdy_control
spec_bdy_width = 5,
specified = .true.,
/
&grib2
/
&namelist_quilt
nio_tasks_per_group = 0,
nio_groups = 1,
/
Save
10、将met_em.d01*.nc链接到test/em_real下
ln -s */WPS-4.3.1/met_em_.d0* ./
11、初值和边值处理
快结束了哦,此时会开始漫长的等待,一般报错的话是因为input和namelist不对应,或者物理方案冲突等等,建议百度!(但是我的试跑方案应该不会报错的bb们嘿嘿,本人先趟水了55555)
./real.exe
12、./wrf.exe 或 mpirun - np 10./wrf.exe
第二种为并行计算,不超过计算机的物理核上限。
然后就开始等吧,计算速度特别慢!!!算了一下,跑完需要30天!55555555
maybe 我网格设置的大?
不懂不懂