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

nwp_diagnostics not working in V4.0

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.


Setting nwp_diagnostics=1 is causing WRF V4.0 to crash. The theta-m fix has been applied.

Tile Strategy is not specified. Assuming 1D-Y
WRF TILE 1 IS 214 IE 267 JS 181 JE 225
*** Error in `./wrf.exe': malloc(): smallbin double linked list corrupted: 0x000000000808b320 ***
We will take a look at this issue and get back to you once we know for sure of the problem.

Ming Chen
I just run a quick test with the option nwp_diagnostics = 1. Everything works fine.
I run WRFV4.0, USE_THETA_M =1 and HYPSOMETRIC_OPT = 2, initial and boundary conditions are derived from GFS.

Please double check your case and let me know if you still have the issue.

Ming Chen
I tried recompiling but that didn't help. I can confirm that those are the options I am using. The compiler is ifort version 16.0.0. I don't have this problem with v3.9.1.
Can you rebuild WRF with the debug option, i.e.,

./clena -a
./configure -D
./compile em_real

Then rerun this case. Note that with the -D option, the model will run very slow but once the case crashed, RSL files will list the code and line where the model stopped. This will give you hints to figure out possible problems.

Another option is that you can rebuild WRF with other compilers like gfortran, then rerun the case to see how it works.

Ming Chen
It is looking like an MPI bug. I tried compiling with debugging - it ran. When running our standard executable (compiled with option 20, Intel dmpar), a very small (21 x 21 x 51) domain ran with a few processors. But even a modest domain of 61 x 61 x 51 points failed if more than one processor was used. If only one proc was used, it ran.
I would like to revisit this topic. I'm still having trouble using nwp_diagnostics with grid nesting with WRF 4.0.2. If I configure with the -D option, or if I run only the parent grid, there is no error. Running optimized WRF with a nested grid fails.
Do you have another compiler to try? If you only have Intel, do you have a newer version of it, such as 17.0.1 or other versions? Intel 17.0.1 is the one we use here. Also, when you set nwp_diagnostics to 1, do you also turn on do_radar_ref (=1)? You probably need to turn this option on for certain microphysics options.
The problem is tripable in the WRF 3.9 line with recent Intel compilers. I got complaints about the "refl_10cm"
array out of bounds.

As mentioned above, setting "do_radar_ref" to 1 should be done. This fixes things.

Hopefully, the WRF code will be modified in the next release to handle this problem properly.
Yes, setting do_radar_ref=1 solved the problem for me. In limited testing, I haven't had any further crashing. I recommend that the requirement about do_radar_ref be added to the description in the User's Guide and also to module_check_a_mundo.F. Additionally, it appears that nwp_diagnostics will not work with adaptive time stepping.