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

Print the current simulation time in WRF

zhengzich

New member
Hello everyone, I hope I can get your help from here.

I am modifying the relevant code in WRF and want to output intermediate variables in rsl (the VPRM part in module_ghg_fluxes.F). Now I want to output the current simulation time when the program is running. For example, if I start simulation from January 1st, output the current simulation time when calling VPRM. Like at 01:00:00 on January 2.

Of course, if possible, it is a better choice to output intermediate variables to wrfout, but I did not succeed, I have friends who understand, I hope you can give me some advice, or please tell me where there is a manual for reference
 
Hi,
Take a look at the Runtime I/O section in the WRF Users' Guide. Perhaps that may help you. If not, can you explain specifically which variables you'd like to output? Outputting something to the rsl files will simply just print them, but it isn't data you can use afterward.
 
Thank you for your reply!

You are right that output to rsl can be a way to view, but it cannot be viewed and further used, and can cause a lot of data storage problems.

What I want to output is the intermediate variable in the VPRM part, such as Pscale, Wscale, etc., in the VPRM calculation process.

In the process of calculating VPRM, I found that the input data of some dates may cause the result error, which leads to a large number of 0 values in GEE and RE, but this is not consistent with the actual situation.
 
Okay, I see. Since those variables are local variables, you will need to modify the code to have them output. If I were you, I'd find one of the variables that does already output in the history (especially if it's in module_ghg_fluxes.F) and use that as a template to do something similar for the variables you want. You'll need to start with where they are locally inside a subroutine, make them INOUT variables, and then look for what routines call that subroutine and just add them to those calls - then figure out what routines call THAT subroutine, etc. until you reach the top of the code. You'll also need to add them to the registry file (maybe registry.chem?) and assign them an 'h' in the IO column, and then recompile the code.

You may also be able to search and find examples of other users doing something similar (probably not for the same variables) in this forum. Because this is chemistry code, I don't know as much about it, so if you run into issues, I'd suggest posting in the WRF-Chem section of the forum for assistance.
 
Top