Scheduled Downtime
On Friday 21 April 2023 @ 5pm MT, this website will be down for maintenance and expected to return online the morning of 24 April 2023 at the latest

Segmentation Fault in "psim_stable" routine

This post was from a previous version of the WRF&MPAS-A Support Forum. New replies have been disabled and if you have follow up questions related to this post, then please start a new thread from the forum home page.

jgilbert

New member
I am running into a segmentation fault while running wrf.exe. I've included the backtrace at the end of this post.

Some background that may help diagnose this issue:
1. I am trying to run with a "p_top_requested" of 87692.00 Pa (~1100 m domain height) - running with "p_top_requested = 5000," works fine.
2. I am specifying the vertical levels according to the following:
"""
e_vert = 60, 60, 60, 60, 60,
p_top_requested = 87692.00,
auto_levels_opt = 2,
dzbot = 5, ! Note: Inner 2 domains are LES, smallest dx=dy=10m, setting surface dz <= dx per online guidance
dzstretch_s = 1.5,
dzstretch_u = 1.3,
"""
3. The variables "zolzz" and "zol0" (line 575,576 of module_sf_sfclayrev.F) are NAN coming into the "psim_stable" calls at line 597. I haven't tracked down why they are getting set to NANs yet.

It's clear the issue has to do with how I am specifying my vertical levels, but I'm not sure why. Any help would be appreciated.

Thanks,
John
*****
BT provided below:

Program received signal SIGSEGV: Segmentation fault - invalid memory reference.

Backtrace for this error:
#0 0x2aaaaf7cf62f in ???
#1 0x26efc94 in __module_sf_sfclayrev_MOD_psim_stable
at /p/home/jgilbert/git-repos/WRF/phys/module_sf_sfclayrev.f90:1224
#2 0x26f4020 in __module_sf_sfclayrev_MOD_sfclayrev1d
at /p/home/jgilbert/git-repos/WRF/phys/module_sf_sfclayrev.f90:608
#3 0x26fbcd3 in __module_sf_sfclayrev_MOD_sfclayrev
at /p/home/jgilbert/git-repos/WRF/phys/module_sf_sfclayrev.f90:248
#4 0x1fded24 in __module_surface_driver_MOD_surface_driver
at /p/home/jgilbert/git-repos/WRF/phys/module_surface_driver.f90:1891
#5 0x17f58b1 in __module_first_rk_step_part1_MOD_first_rk_step_part1
at /p/home/jgilbert/git-repos/WRF/dyn_em/module_first_rk_step_part1.f90:512
#6 0x1305700 in solve_em_
at /p/home/jgilbert/git-repos/WRF/dyn_em/solve_em.f90:925
#7 0x11d20d5 in solve_interface_
at /p/home/jgilbert/git-repos/WRF/share/solve_interface.f90:140
#8 0x47388c in __module_integrate_MOD_integrate
at /p/home/jgilbert/git-repos/WRF/frame/module_integrate.f90:329
#9 0x473e66 in __module_integrate_MOD_integrate
at /p/home/jgilbert/git-repos/WRF/frame/module_integrate.f90:366
#10 0x473e66 in __module_integrate_MOD_integrate
at /p/home/jgilbert/git-repos/WRF/frame/module_integrate.f90:366
#11 0x473e66 in __module_integrate_MOD_integrate
at /p/home/jgilbert/git-repos/WRF/frame/module_integrate.f90:366
#12 0x473e66 in __module_integrate_MOD_integrate
at /p/home/jgilbert/git-repos/WRF/frame/module_integrate.f90:366
#13 0x40697d in __module_wrf_top_MOD_wrf_run
at ../main/module_wrf_top.f90:324
#14 0x405a3e in wrf
at /p/home/jgilbert/git-repos/WRF/main/wrf.f90:29
#15 0x405a93 in main
at /p/home/jgilbert/git-repos/WRF/main/wrf.f90:6
 
Is there any special reason you need to set p_top at such a low level (~876hPa) ? With such a setting of 60 vertical intervals, the model level will be extremely thin, which will induce problems for integration. In addition, the default absorbing layer below model TOP is set to 5000m for WRF. With such a low model top, the absorbing layer cannot work as expected.
Please reset the model top to a reasonable value.
 
Ming:

Thanks for the response. Adjusting the p_top value eliminated the segmentation fault, so I'm able to move forward.

That said, the thickness of my model levels near the surface is unchanged, so the root cause of the segfault is still unclear to me. It's likely there is some other parameter I am did not properly set.

Thanks again,
John
 
John,
Changing p_top will also change your levels near the surface (suppose you run REAL to generate eta levels). As I said previously, a very low p_top will cause severe problems in model dynamics (damping, integration stability, etc).
 
Top