1、设置namelist.wps文件
设置时间及范围,静态地理数据路径,下载fnl数据。
mpirun -np 40 ./geogrid.exe
ls -lah geo_em.d01.nc
2、输入数据地址
./link_grib.csh ~/your path/wrf/data/fnl_data/fnl
3、给予Vtable
ln -sf ungrib/Variable_Tables/Vtable.GFS Vtable
4、运行ungrib和metgrid
mpirun -np 40 ./ungrib.exe
ls -lah FILE*
mpirun -np 40 ./metgrid.exe
二、然后运行WRF-Chem,生成wrfinput
1、设置namelist.input文件
修改时间及范围与namelist.wps文件一致
2、同时设置&chem部分的chem_opt=0, 0, 0
ln -sf ~/kanggq/wrf/wrf_output/met_em* .
mpirun -np 40 ./real.exe
生成wrfinput。
3、随后处理排放清单:
3.1、下载meic2wrf-masterGitHub - jinfan0931/meic2wrf: Interpolating & distributing MEIC 0.25*0.25 emission inventory onto WRF-Chem gridshttps://github.com/jinfan0931/meic2wrf
根据需要安装环境,使用conda安装即可。
3.2、下载MEIC排放清单MEIC – MEICModelhttp://meicmodel.org.cn/?page_id=560
3.3、修改meic2wrf_noGUI.py中的MEIC路径及wrfinput路径和输出文件的路径。几层嵌套运行几次。
3.4、运行:
python3 ./ meic2wrf_noGUI.py
3.5、生成wrfchemi_<hr>z_d*文件
4、生成生物排放
4.1、下载megan2及输入数据。WRF-Chem Tools for the Community | Atmospheric Chemistry Observations & Modeling (ucar.edu)https://www2.acom.ucar.edu/wrf-chem/wrf-chem-tools-community
4.2、修改Makefile(这里是Intel编译器,根据自己编译器进行修改)
FC = ifort
NETCDF_DIR=/opt/app/wrf/lib
AR_LIBS= -lnetcdff -lnetcdf
4.3、进行make
4.4、修改megan_bio_emiss.inp文件中的(几层嵌套运行几次)
domains = 3,
start_lai_mnth = 1,
end_lai_mnth = 12,
wrf_dir = '/home/your path/wrf/WRF-4.1/run',
megan_dir = '/home/your path/megan/input',
4.5运行:
./megan_bio_emiss < megan_bio_emiss.inp > bioemiss.out
4.6、生成wrfbiochemi_d0*文件
随后将wrfchemi_<hr>z_d*文件与wrfbiochemi_d0*文件复制到WRF/run路径下
5、重新设置namelist.input
添加:
auxinput5_inname = 'wrfchemi_<hr>z_d<domain>',
auxinput6_inname = 'wrfbiochemi_d<domain>',
auxinput5_interval_m = 60,
io_form_auxinput5 = 2,
io_form_auxinput6 = 2,
同时设置&chem部分的chem_opt及其他选项!
5.1、随后再运行real.exe
mpirun -np 40 ./real.exe
5.2、生成带chem部分的wrfinput文件后
6.1、修改Makefile(这里是Intel编译器,根据自己使用的编译器进行修改)
FC = ifort
NETCDF_DIR=//opt/app/wrf/lib
AR_FILES= -lnetcdff -lnetcdf
F90 = $(FC)
LIBS = -L$(NETCDF_DIR)/lib $(AR_FILES)
INCLUDE_MODULES = -I$(NETCDF_DIR)/include
6.2、前往,下载全球模式输出数据来修改初始场和边界场,时间及范围要大过自己模拟区域及时间。
CAM-Chem Download (ucar.edu)https://www.acom.ucar.edu/cam-chem/cam-chem.shtml
6.3、修改CBMZ-MOSAIC_8bins.inp或其他inp文件中domain和wrfinput文件路径和CAM-chem文件路径
do_bc = .true.
do_ic = .true.
domain = 1
dir_wrf = '/home/your path/wrf-chem/run/'
dir_moz = '/home/your path/mozbc/input/mozart4_inputs/'
fn_moz = 'hb0069.nc'
6.4、随后运行:
./mozbc < CBMZ-MOSAIC_8bins.inp > OUT.log
7、运行成功后就可以运行wrf了。
mpirun -np 40 ./wrf.exe
不报错就大功告成了!