How to add debug lines inside a module

Ideas, problems or suggestions regarding the WRF software.

How to add debug lines inside a module

Postby alberto » Thu Jul 04, 2013 12:05 pm

Hello everybody,

I am trying to add debug lines inside the module_wind_fitch.F, and the compile.
I managed to do this in module_wind_generic.F, both inside the /phys/ directory, by using the following commands:

WRITE(message,*)'blablablabl'
CALL wrf_message(message)

and also
CALL wrf_debug(100,' Additional stuff'//messsage)

But trying this inside the fitch module produces no output in my rsl.* files, I checked my debug level, and it is set properly at 100,. I don't have running problems, but I need to see steps inside the new things I added to check if they work properly.

Sincerely,
Alberto Striedinger
alberto
 
Posts: 54
Joined: Mon Mar 25, 2013 7:48 am

Re: How to add debug lines inside a module

Postby green_tea » Sun Dec 01, 2013 9:56 am

Me too, I meet this problem, have you resolved it ?
green_tea
 
Posts: 3
Joined: Thu Nov 28, 2013 1:09 am

Re: How to add debug lines inside a module

Postby green_tea » Mon Dec 02, 2013 10:16 am

Ok, the problem is resolved.
Set the debug_level value as 455 in namelist.input, or what ever number you want.
Then add in the program where you want to print:
CALL get_wrf_debug_level(debug_level_yu)
if (debug_level_yu.eq.455) then
WRITE( message , * ) 'fro_yu test on file, timestep = ', itimestep
CALL wrf_message ( message )
print *,'fro_yu test on screen'
endif

You must declare the variable debug_level_yu at the beginning:
integer debug_level_yu

Then in rsl.out.0000 you will have:
fro_yu test on file, timestep = 2
fro_yu test on screen
green_tea
 
Posts: 3
Joined: Thu Nov 28, 2013 1:09 am


Return to Software Engineering

Who is online

Users browsing this forum: No registered users and 2 guests

cron