爱气象,爱气象家园! 

气象家园

 找回密码
 立即注册

QQ登录

只需一步,快速开始

新浪微博登陆

只需一步, 快速开始

搜索
查看: 9453|回复: 8

WRF 添加轨迹计算时出现Segmentation Fault

[复制链接]

新浪微博达人勋

发表于 2019-1-5 14:33:11 | 显示全部楼层 |阅读模式

登录后查看更多精彩内容~

您需要 登录 才可以下载或查看,没有帐号?立即注册 新浪微博登陆

x
大家好!

     我最近在用WRF3.9.1进行模拟计算,主要想使用其中的轨迹计算功能。我使用三层嵌套模拟,根据我的理解,需要建立三个wrfinput_traj_<domain>文件,./real.exe这一步是可以成功的,但是在运行wrf.exe时,转几秒就断掉了。检查rsl.error.0000文件,出现forrtl: severe (174): SIGSEGV, segmentation fault occurred  这个错误。

     我在网上查了相关问题,主要解决方案有两种:一是把时间步长改小;二是在wrf.exe之前使用“ulimit -s unlimited”命令。进行尝试后均没有起作用。
     我之前在用单层嵌套进行试验的时候,只添加wrfinput_traj_d01一个输入文件是可以正常运行的。三层嵌套的时候只有wrfinput_traj_d01也是可以的,但是这样d02和d03就不发进行轨迹计算了。
     不知道大家有没有遇到过这样的情况,或者有没有人使用过WRF里的这个功能,恳求大家的帮助!谢谢!

     下面是我的namelist.input 、rsl.error.0000 以及 wrfinput_traj_d01文件:

namelist.input:
&time_control
run_days                            = 0,
run_hours                           = 24,
run_minutes                         = 0,
run_seconds                         = 0,
start_year                          = 2016, 2016, 2016,
start_month                         = 07,   07,   07,
start_day                           = 08,   08,   08,
start_hour                          = 00,   00,   00,
start_minute                        = 00,   00,   00,
start_second                        = 00,   00,   00,
end_year                            = 2016, 2016, 2016,
end_month                           = 07,   07,   07,
end_day                             = 09,   09,   09,
end_hour                            = 00,   00,   00,
end_minute                          = 00,   00,   00,
end_second                          = 00,   00,   00,
interval_seconds                    = 21600
input_from_file                     = .true.,.true.,.true.,
history_interval                    = 180,  180,   5,
frames_per_outfile                  = 1000, 1000, 1000,
restart                             = .false.,
restart_interval                    = 1000,
io_form_history                     = 2
io_form_auxhist2                    = 2
auxhist2_outname                    = "wrfout_traj_d<domain>"
frames_per_auxhist2                 = 1000
io_form_restart                     = 2
io_form_input                       = 2
io_form_boundary                    = 2
debug_level                         = 9999
/

&domains
time_step                           = 60,
time_step_fract_num                 = 0,
time_step_fract_den                 = 1,
max_dom                             = 3,
e_we                                = 150,    271,   313,
e_sn                                = 150,    271,   223,
e_vert                              = 40,    40,    40,
p_top_requested                     = 5000,
num_metgrid_levels                  = 32,
num_metgrid_soil_levels             = 4,
dx                                  = 18000, 6000,  2000,
dy                                  = 18000, 6000,  2000,
grid_id                             = 1,     2,     3,
parent_id                           = 0,     1,     2,
i_parent_start                      = 1,     30,    100,
j_parent_start                      = 1,     30,    98,
parent_grid_ratio                   = 1,     3,     3,
parent_time_step_ratio              = 1,     3,     3,
feedback                            = 1,
smooth_option                       = 0,
num_traj                            = 1000,
/

&physics
mp_physics                          = 9,     9,     9,
cu_physics                          = 1,     0,     0,
ra_lw_physics                       = 4,     4,     4,
ra_sw_physics                       = 4,     4,     4,
bl_pbl_physics                      = 1,     1,     1,
sf_sfclay_physics                   = 1,     1,     1,
sf_surface_physics                  = 2,     2,     2,
radt                                = 18,    18,    18,
bldt                                = 0,     0,     0,
cudt                                = 5,     5,     5,
icloud                              = 1,
num_soil_layers                     = 4,
num_land_cat                        = 24,
sf_urban_physics                    = 0,     0,     0,
traj_opt                            = 1,
dm_has_traj                         = .true., .true., .true.,
/

&fdda
/

&dynamics
w_damping                           = 0,
diff_opt                            = 1,      1,      1,
km_opt                              = 4,      4,      4,
diff_6th_opt                        = 0,      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.,
moist_adv_opt                       = 1,      1,      1,     
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,
/

rsl.error.0000(最后几行):
d01 2016-07-08_00:00:00 module_start: phy_init: Before call to cu_init
d01 2016-07-08_00:00:00 module_start: phy_init: Before call to shcu_init
d01 2016-07-08_00:00:00 module_start: phy_init: Before call to mp_init
d01 2016-07-08_00:00:00 module_start: phy_init: Before call to fg_init
d01 2016-07-08_00:00:00 module_start: phy_init: Before call to fdob_init
d01 2016-07-08_00:00:00 start_domain_em: After call to phy_init
d01 2016-07-08_00:00:00 start_em: calling lightning_init
d01 2016-07-08_00:00:00 start_em: after calling lightning_init
d01 2016-07-08_00:00:00 calling inc/HALO_EM_INIT_1_inline.inc
d01 2016-07-08_00:00:00 calling inc/HALO_EM_INIT_2_inline.inc
d01 2016-07-08_00:00:00 calling inc/HALO_EM_INIT_3_inline.inc
d01 2016-07-08_00:00:00 calling inc/HALO_EM_INIT_4_inline.inc
d01 2016-07-08_00:00:00 calling inc/HALO_EM_INIT_5_inline.inc
d01 2016-07-08_00:00:00 calling inc/PERIOD_BDY_EM_INIT_inline.inc
d01 2016-07-08_00:00:00 calling inc/PERIOD_BDY_EM_MOIST_inline.inc
d01 2016-07-08_00:00:00 calling inc/PERIOD_BDY_EM_TKE_inline.inc
d01 2016-07-08_00:00:00 calling inc/PERIOD_BDY_EM_SCALAR_inline.inc
d01 2016-07-08_00:00:00 calling inc/PERIOD_BDY_EM_CHEM_inline.inc
d01 2016-07-08_00:00:00 calling inc/HALO_EM_INIT_1_inline.inc
d01 2016-07-08_00:00:00 calling inc/HALO_EM_INIT_2_inline.inc
d01 2016-07-08_00:00:00 calling inc/HALO_EM_INIT_3_inline.inc
d01 2016-07-08_00:00:00 calling inc/HALO_EM_INIT_4_inline.inc
d01 2016-07-08_00:00:00 calling inc/HALO_EM_INIT_5_inline.inc
d01 2016-07-08_00:00:00 calling inc/PERIOD_BDY_EM_INIT_inline.inc
d01 2016-07-08_00:00:00 calling inc/PERIOD_BDY_EM_MOIST_inline.inc
d01 2016-07-08_00:00:00 calling inc/PERIOD_BDY_EM_TKE_inline.inc
d01 2016-07-08_00:00:00 calling inc/PERIOD_BDY_EM_SCALAR_inline.inc
d01 2016-07-08_00:00:00 calling inc/PERIOD_BDY_EM_CHEM_inline.inc
trajectory_init(02): default start time = 2016-07-08_01:00:00
trajectory_init(02): default stop  time = 2016-07-08_14:00:00
d01 2016-07-08_00:00:00 trajectory_init(02): traj 001 i,j,z_bot,z_top,lev =   33  33   4179.885       20574.50       6179.885
d01 2016-07-08_00:00:00 trajectory_init(02): traj cnt =      1     1
d01 2016-07-08_00:00:00 trajectory_init(02): trj,k,z(k-1:k),traj_k =   1 12   5987.690       6291.330       11.63297
forrtl: severe (174): SIGSEGV, segmentation fault occurred
Image              PC                Routine            Line        Source            
wrf.exe            0000000002C7F3B9  Unknown               Unknown  Unknown
wrf.exe            0000000002C7DD30  Unknown               Unknown  Unknown
wrf.exe            0000000002C3B412  Unknown               Unknown  Unknown
wrf.exe            0000000002BD2CB3  Unknown               Unknown  Unknown
wrf.exe            0000000002BD971B  Unknown               Unknown  Unknown
libpthread.so.0    00002AAB3C51B9F0  Unknown               Unknown  Unknown
wrf.exe            000000000123F598  Unknown               Unknown  Unknown
wrf.exe            00000000019C93F9  Unknown               Unknown  Unknown
wrf.exe            00000000017E9669  Unknown               Unknown  Unknown
wrf.exe            00000000012FBED1  Unknown               Unknown  Unknown
wrf.exe            00000000012EE80A  Unknown               Unknown  Unknown
wrf.exe            00000000005B618C  Unknown               Unknown  Unknown
wrf.exe            00000000004F9011  Unknown               Unknown  Unknown
wrf.exe            00000000004F8FC7  Unknown               Unknown  Unknown
wrf.exe            00000000004F8F56  Unknown               Unknown  Unknown
libc.so.6          00002AAB3C74BBE5  Unknown               Unknown  Unknown
wrf.exe            00000000004F8E69  Unknown               Unknown  Unknown


wrfinput_traj_d01:
&traj_default
traj_def%start_time = '2016-07-08_01:00:00'
traj_def%stop_time = '2016-07-08_14:00:00'
traj_def%dyn_name(1:8) = 'p', 'T', 'z', 'u', 'v', 'w', 'rainprod', 'evapprod'
traj_def%hyd_name(1:6) = 'QCLOUD','QRAIN','QICE','QSNOW','QGRAUP','QHAIL'
/

&traj_spec
traj_type(1)%lon = 81.50
traj_type(1)%lat = 39.70
traj_type(1)%lev = 2000.
traj_type(1)%z_is_agl = .false.

traj_type(2)%lon = 81.60
traj_type(2)%lat = 39.80
traj_type(2)%lev = 2000.
traj_type(2)%z_is_agl = .true.

traj_type(3)%lon = 81.40
traj_type(3)%lat = 39.60
traj_type(3)%lev = 2000.
traj_type(3)%is_stationary = .true.
/



密码修改失败请联系微信:mofangbao

新浪微博达人勋

发表于 2019-1-6 20:56:25 | 显示全部楼层
不知道能不能帮上你,[图片]
密码修改失败请联系微信:mofangbao

新浪微博达人勋

发表于 2019-1-6 21:00:14 | 显示全部楼层
Q8        What is the most common reason for a segmentation fault?
A8        A segmentation fault error often means there is a memory issue. Try typing one of the following to see if it helps:

1. setenv MP_STACK_SIZE 64000000 (OMP_STACKSIZE)
2. If you are using csh or tcsh, try this: limit stacksize unlimited
3. If you are using sh or bash, use this command: ulimit -s unlimited

This may not solve your problem, but the default stack size is often quite small and may result in segmentation faults due to insufficient memory.

If the model seg-faults right at the beginning of the run, it can often mean there is something wrong with the input data. Make sure to check your met_em* files to see if you notice anything odd in various variables.
密码修改失败请联系微信:mofangbao

新浪微博达人勋

 楼主| 发表于 2019-1-7 19:10:46 | 显示全部楼层
poiuy420 发表于 2019-1-6 21:00
Q8        What is the most common reason for a segmentation fault?
A8        A segmentation fault error often mea ...

特别感谢,但是我试过之后还是不行

我猜可能和那个轨迹计算的某一部分有关系吧  但是可查到的东西很少  有点绝望
密码修改失败请联系微信:mofangbao

新浪微博达人勋

发表于 2019-1-17 15:05:02 | 显示全部楼层
马克留用
不知楼楼解决了没?
我也碰到类似的问题,dfi只d01就ok,d03就segmentation fault
密码修改失败请联系微信:mofangbao

新浪微博达人勋

发表于 2019-1-25 15:15:46 | 显示全部楼层
那个我想问下,你们的wrfinput_traj是怎么生成的,为啥我real不出来
密码修改失败请联系微信:mofangbao

新浪微博达人勋

 楼主| 发表于 2019-2-3 18:26:31 | 显示全部楼层
lch1994 发表于 2019-1-25 15:15
那个我想问下,你们的wrfinput_traj是怎么生成的,为啥我real不出来

是要自己添加的
密码修改失败请联系微信:mofangbao

新浪微博达人勋

 楼主| 发表于 2019-2-23 20:29:35 | 显示全部楼层
ljchen1989 发表于 2019-1-17 15:05
马克留用
不知楼楼解决了没?
我也碰到类似的问题,dfi只d01就ok,d03就segmentation fault

没有 暂时放弃了
密码修改失败请联系微信:mofangbao

新浪微博达人勋

发表于 2020-8-4 10:42:20 | 显示全部楼层

我是 d03可以d05就不可以
密码修改失败请联系微信:mofangbao
回复 支持 反对

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册 新浪微博登陆

本版积分规则

Copyright ©2011-2014 bbs.06climate.com All Rights Reserved.  Powered by Discuz! (京ICP-10201084)

本站信息均由会员发表,不代表气象家园立场,禁止在本站发表与国家法律相抵触言论

快速回复 返回顶部 返回列表