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

Outputting Local Variables in Parameterization Scheme to Output Files

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.

dhaliczer

New member
Greetings,

I am wanting to output a number of local variables from the Kain Fritsch Parameterization Scheme to the wrfout files. The steps I have taken so far include looking at the Registry.EM_COMMON file and found that they are not listed in there. I then started to take a look to see if others have done this and found some guidance for other physics schemes in these forums. To my understanding, the procedure works along the lines of this:

For Cu_Physics option 1 (KF Scheme), I opened up the module_cu_kfeta.f90 to find the variables I would like to output to the files (PLCL, TLCL, ZLCL, TDPT, DTLCL, WKLCL, WKL, WLCL, TENV, and CLDHGT). They are local variables with the declaration of REAL with no dimensions, however, CLDHGT does have dimensions.

One would then need to go through the following steps:
1. Declare the variables in the subroutine KF_eta_CPS.
2. Add these variables to all of the calls for the cumulus all the way back down to solve_em.F.
3. Add these variables to the registry with the correct format.

I probably missed a couple of steps in there, but would this be the right approach? I appreciate any advice or input that anyone has. Thank you so much and I appreciate the time!

Best,
David Haliczer
 
Hi David,
If you haven't already, take a look at this FAQ that gives some generic information on outputting a local variable. Another suggestion is to find a variable that is NOT local and is an output variable in the Kain Fritsch scheme and follow the path through the code to output that variable, and do the same for your local variable. Take a look at the process I described in this post.
 
Hi Kelly,
I just wanted to give a quick update. So currently, I’m trying to output the variables to the rsl file. I went into the physics file module_cu_kfeta.F and tried the following:

1. From Line 2405-2429, I put in an IPRNT=.true. followed by a write(message,*) statement and the variables that I would like followed by the call wrf_message(message).
2. I also put a print statement followed by the variables.

In each of these cases, I recompiled, but this did not yield any results and are no where to be found in the rsl file. I also tried turning up the debug level in the namelist to see if they would print out, but that did not work.

I was wondering if they are possibly in a completely different file than the rsl? Does this have to do with the wrf_message subroutine? I appreciate any insight or guidance. Thanks!

Best,
David Haliczer
 
Hi David,
The results should print out to the rsl files (maybe not in rsl.out.0000, but in one of the rsl.out.* files). I would suggest just putting in a simple print statement to make sure the model is actually entering the area where you're wanting to put in prints. Something like
Code:
print *, "I am here"

Then you can run a short simulation and grep for the phrase "I am here" in your rsl files. If that works, then I would also suggest just using a print statement to output the variables you want. For e.g.,
Code:
print *, "variable_name = ", variable

I also often put my initials in the print statement so that I can search for them easily and find my changes in the code if I need them later.
 
Top