2024年2月22日发(作者:)
WRF-FLEXPART安装运行
一. 进入
修改NETCDF路径,选择编译器
make -f serial 编译,出现flexwrf31_pgi_serial可执行文件编译成功。
(不成功重新编译前先make -f clean,再编译)
二. 运行
nce修改参数
$ ln -sf ../src/flexpart_wrf 添加链接,注意路径
$ vi pathnames
$ vi AVAILABLE
$ vi ../run/options/COMMAND
$ vi ../run/options/RELEASES
$ vi ../run/options/RECEPTORS
$ vi ../run/options/SPECIES (有需要的话可以修改,一般不用修改)
$ vi ../run/options/OUTGRID
./flexwrf31_pgi_serial /home/yyzhang/flexwrf/src_flexwrf_v3.1/
(不写路径默认转nce)
Error:
1. 编译命令make -f serial
别忘了serial
90-S-0038-Symbol, nf_netcdf4, has not been explicitly declared (write_ncheader.f90)
PGF90-S-0038-Symbol, nf_def_var_deflate, has not been explicitly declared (write_ncheader.f90)
解决过程:
1.先看netcdf路径给的对不对
FLEXPART官网的交流区有人遇到过这个问题,官网给的解答是因为找不到文件,需要检查makefile中的netcdf路径是否正确,如下:
Your error message is a sign that the the module was not available. This
is not part of FLEXPART WRF, it comes from the netCDF library. Make sure you have
development kit of netCDF libs and that your include path in the makefile is correct.
2.给的对的话
4.1.1与4.1.3版本的中开头都是;
! NetCDF-3.
!
! netcdf version 3 fortran interface
这与它的版本(4+)是不对应的,而编译Flexwrf时的makefile中netcdf的版本选的是4,所以Flexwrf读取的时候只能找到3版本的inc文件而找不到4版本的inc文件,所以会报错。我是使用3.6.3版本的netcdf解决了这个问题。
或者还是用netcdf4.1.3但是在makefile中选择版本的时候选3也是可以编译成功的(但是后面转的时候有可能出错说找不到lnetcdff什么的)。
但是!!3+与4+版本的netcdf在makefile中有一个地方不同需要修改:
PGI_LDFLAGS = -fastsse -mcmodel=medium -lnetcdf这一行
4+版本的netcdf应该写medium –lnetcdff
3+版本的netcdf应该写medium –lnetcdf
这是因为4以上版本的netcdf中文件名都叫lnetcdff,4以下版本的netcdf中文件名都叫lnetcdf。
90 *.o -o flexwrf31_pgi_serial -L/home/yyzhang/netcdf/lib/lib -fastsse -mcmodel=medium
-lnetcdff
/usr/bin/ld: cannot find –lnetcdff
Netcdf路径只写到/netcdf不写到/lib。别看上面的例子,例子给的不对有误导。
not open input data file=wrfout………….nc
路径给对,给到wrfout所在文件夹就行
把wrfout文件改名加.nc (flexwrf读取wrfout默认在文件名后加.nc)
5. FILE CONTAINING ####
#### LANDUSE INVENTORY DOES NOT EXIST ####
#### IT IS NEEDED FOR DRY DEPOSITION ####
#### COPY DATA FROM src_flexwrf_v3.0/data ####
#### IN YOUR CURRENT DIRECTORY ####
#### OR USE A DIFFERENT SPECIES
把data中东西cp到当前目录下
6. *** readwind -- unable to locate date/time in met file
indj, itime = 2 50
file = /home/xxf/src_flexwrf_v3.1/wrfout/wrfout_d01_2014-10-01_00:00:
官网解答:Your file only contains one timestep (frame) but flexpart expects it to have
more than one.
Your specifies that you only include one frame per file so you should
have a total of 13 output files from WRF. Each of these files need to be listed in your
AVAILABLE file with corresponding dates/times.
意思就是wrfout应该一小时输出一个文件,不能把所有的都输出到一个文件里
7.
Wrfout文件没有从010000开始
8.
PGFIO-F-225/list-directed read/unit=1/lexical error-- unknown token type.
2 NUMTABLE number of variable properties. The
following lines are fixed format 必须是2
----------------
INFORMATION: SUBGRIDSCALE TERRAIN EFFECT IS
NOT PARAMETERIZED DURING THIS SIMULATION.
----------------
test_xyindex_to_ll_wrf -- lgrid, rmserr (km) = 0 1.05E-01
# of vertical levels in WRF data
n_bottom_top & "true" nuvz: 27 27
nwz & "augmented" nuvz: 28 28
nwzmax, nuvzmax, nzmax : 61 61 61
nconvlevmax, nconvlev : 60 26
nx, ny, nxmax, nymax : 22 30 334 334
Mother domain:
east-west range: 0.0 567000.0 Grid distance: 27000.0
south-north range: 0.0 783000.0 Grid distance: 27000.0
Allocating fields for nested and global output (x,y): 22
30
3600 SECONDS SIMULATED: 4456 PARTICLES: Uncertainty: 0.000
0.000 0.000
7200 SECONDS SIMULATED: 8804 PARTICLES: Uncertainty: 0.000
0.000 0.000
10800 SECONDS SIMULATED: 13152 PARTICLES: Uncertainty:
0.000 0.000 0.000
14400 SECONDS SIMULATED: 17500 PARTICLES: Uncertainty:
0.000 0.000 0.000
18000 SECONDS SIMULATED: 21846 PARTICLES: Uncertainty:
0.000 0.000 0.000
21600 SECONDS SIMULATED: 26194 PARTICLES: Uncertainty:
0.000 0.000 0.000
25200 SECONDS SIMULATED: 30542 PARTICLES: Uncertainty:
0.000 0.000 0.000
28800 SECONDS SIMULATED: 34890 PARTICLES: Uncertainty:
0.000 0.000 0.000
32400 SECONDS SIMULATED: 39238 PARTICLES: Uncertainty:
0.000 0.000 0.000
36000 SECONDS SIMULATED: 43586 PARTICLES: Uncertainty:
0.000 0.000 0.000
39600 SECONDS SIMULATED: 47934 PARTICLES: Uncertainty:
0.000 0.000 0.000
43200 SECONDS SIMULATED: 52282 PARTICLES: Uncertainty:
0.000 0.000 0.000
46800 SECONDS SIMULATED: 56630 PARTICLES: Uncertainty:
0.000 0.000 0.000
50400 SECONDS SIMULATED: 60978 PARTICLES: Uncertainty:
0.000 0.000 0.000
54000 SECONDS SIMULATED: 65326 PARTICLES: Uncertainty:
0.000 0.000 0.000
57600 SECONDS SIMULATED: 69672 PARTICLES: Uncertainty:
0.000 0.000 0.000
61200 SECONDS SIMULATED: 74020 PARTICLES: Uncertainty:
0.000 0.000 0.000
64800 SECONDS SIMULATED: 78368 PARTICLES: Uncertainty:
0.000 0.000 0.000
68400 SECONDS SIMULATED: 82716 PARTICLES: Uncertainty:
0.000 0.000 0.000
72000 SECONDS SIMULATED: 87064 PARTICLES: Uncertainty:
0.000 0.000 0.000
75600 SECONDS SIMULATED: 91412 PARTICLES: Uncertainty:
0.000 0.000 0.000
79200 SECONDS SIMULATED: 95750 PARTICLES: Uncertainty:
0.000 0.000 0.000
82800 SECONDS SIMULATED: 99755 PARTICLES: Uncertainty:
0.000 0.000 0.000
CONGRATULATIONS: YOU HAVE SUCCESSFULLY COMPLETED A FLEXPART_WRF
MODEL RUN!


发布评论