1 SUBROUTINE set_wrf_debug_level ( level )
4 INTEGER , INTENT(IN) :: level
5 wrf_debug_level = level
7 END SUBROUTINE set_wrf_debug_level
9 SUBROUTINE get_wrf_debug_level ( level )
12 INTEGER , INTENT(OUT) :: level
13 level = wrf_debug_level
15 END SUBROUTINE get_wrf_debug_level
17 SUBROUTINE wrf_debug( level , str )
21 INTEGER , INTENT (IN) :: level
22 INTEGER :: debug_level
23 CHARACTER (LEN=256) :: time_str
24 CHARACTER (LEN=256) :: grid_str
25 CHARACTER (LEN=512) :: out_str
27 CALL get_wrf_debug_level( debug_level )
28 IF ( level .LE. debug_level ) THEN
31 CALL wrf_message( str )
33 ! TBH: This fails on pgf90 6.1-4 when built with OpenMP and using more
34 ! TBH: than one thread. It works fine multi-threaded on AIX with xlf
35 ! TBH: 10.1.0.0 . Hence the cpp nastiness.
36 ! new behavior: include domain name and time-stamp
37 CALL get_current_time_string( time_str )
38 CALL get_current_grid_name( grid_str )
39 out_str = TRIM(grid_str)//' '//TRIM(time_str)//' '//TRIM(str)
40 CALL wrf_message( TRIM(out_str) )
44 END SUBROUTINE wrf_debug