WRF runtime error

Introduction to the forum

WRF runtime error

Postby dawnsnow » Wed Jul 13, 2016 4:08 am

I added several new variables into WRF version 3.7 and run the model. When I inserted several write statements in subroutines for checking variable values, model run without problem.
But when I run the model after removing write statement that I added, model has run time error.

Model running is dependent on write statement. I just inserted write statement for checking variable during
the run process and they are not changing other calculation at all but they influence model results. I did not use big dimension of variable so memory requirement is not big, I think. I don't understand why model running is dependent on write statement.
If you have any idea about this, please give me advice.

Thanks in advance.
Posts: 1
Joined: Mon Jul 04, 2016 8:33 am

Re: WRF runtime error

Postby kwthomas » Fri Sep 09, 2016 4:17 pm


Having a program behavior change with the addition or removal of a WRITE statement is one of the most difficult problems to debug. The bottom line is that there is something wrong with the code. Adding/deleting a WRITE statement changes the way that memory is organized in the executable. One way, it happens to work, but for the wrong reasons. The other way, the program crashes.

Likely causes are an array out of bounds or a mismatch in subroutine arguments that just doesn't get caught. Another possibility is a compiler optimization error.

Compile optimization problems do exist. For example, on STAMPEDE (TACC computer), using the default "ifort", the compile of file "module_bl_temf.f90" will never finish at opt 3. It must be compiled at opt 2.

You might try doing a "clean -a", then a "configure -d". The "-d" sets up a debug "configure.wrf" file. If that doesn't help, use "-D" instead of "-d", which checks more. Look for the work "debug" in "configure" to see more specifics.

Good luck.
Kevin W. Thomas
Center for Analysis and Prediction of Storms
University of Oklahoma
Posts: 168
Joined: Thu Aug 07, 2008 6:53 pm

Return to Welcome to the WRF User's Forum

Who is online

Users browsing this forum: No registered users and 1 guest