Add EFFC variable to output

Topics specifically related to the wrf.exe program
Post Reply
neel14
Posts: 86
Joined: Fri Mar 15, 2019 6:52 am

Add EFFC variable to output

Post by neel14 » Mon Jan 04, 2021 4:50 am

Hi everyone,
I want to output the cloud droplet effective radius (EFFC) from the Morrison scheme (mp_physics =10) to the wrf output. How should I proceed?
Kindly help me out. Any help is highly appreciated.

Ming Chen
Posts: 1290
Joined: Mon Apr 23, 2018 9:42 pm

Re: Add EFFC variable to output

Post by Ming Chen » Tue Jan 05, 2021 5:07 pm

EFFC is a local variable used in the Morrison scheme. To output this variable, you need to define it as a state variable in Registry.EM_COMMON, then pass this variable from the physics to the microphysics driver, and from the microphysics driver to the solver (i.e., solve_em.F).
If you are familiar with Fortran, the above steps will not be a big issue. I guess you may need to understand what is state variable and how it works with Registry. The document below is helpful. Please take a look and let me know if you have any question.
https://www2.mmm.ucar.edu/wrf/users/tut ... gistry.pdf
WRF Help Desk

neel14
Posts: 86
Joined: Fri Mar 15, 2019 6:52 am

Re: Add EFFC variable to output

Post by neel14 » Tue Jan 12, 2021 4:50 pm

Hello Ma'am,

I have made some changes but getting error with solve_em.F

Code: Select all

solve_em.f90(4590): error #6460: This is not a field name that is defined in the encompassing structure.   [EFFC]
	  &        ,EFFC=grid%EFFC)
------------------------------^
solve_em.f90(4385): error #8284: If the actual argument is scalar, the dummy argument shall be scalar unless the actual argument is of type character or is an element of an array that is not assumed shape, pointer, or polymorphic.   [EFFC]
     CALL microphysics_driver(                                            &
----------^
compilation aborted for solve_em.f90 (code 1)
I am not very much aware adept with the WRF code structure. Please suggest changes.

Neeldip
Attachments
solve_em.F
(255.57 KiB) Downloaded 3 times
Registry.EM_COMMON
(393.88 KiB) Downloaded 2 times
module_mp_morr_two_moment.F
(163.69 KiB) Downloaded 5 times
module_microphysics_driver.F
(160.47 KiB) Downloaded 3 times
log.compile
(839.6 KiB) Downloaded 2 times

Ming Chen
Posts: 1290
Joined: Mon Apr 23, 2018 9:42 pm

Re: Add EFFC variable to output

Post by Ming Chen » Wed Jan 13, 2021 6:36 pm

EFFC shouldn't be a scalar variable. You need to understand the physical meaning of EFFC and how it works in the code. More important, you also need to understand how Registry works. For example, what does the code do with the definition of "ikjftb" for a state variable, and what variable should be scalar variable and what shouldn't.

As a first try, please change the definition in Registry as:
state real EFFC ikj misc 1 - h "EFFC" "EFFC physics meaning" "EFFC unit"

Then type ./clean -a and recompile. I notice you made some other changes in Registry, too. Please make sure these changes follow the rules of WRF.
WRF Help Desk

neel14
Posts: 86
Joined: Fri Mar 15, 2019 6:52 am

Re: Add EFFC variable to output

Post by neel14 » Sat Jan 16, 2021 9:48 am

Ming Chen wrote:
Wed Jan 13, 2021 6:36 pm
EFFC shouldn't be a scalar variable. You need to understand the physical meaning of EFFC and how it works in the code. More important, you also need to understand how Registry works. For example, what does the code do with the definition of "ikjftb" for a state variable, and what variable should be scalar variable and what shouldn't.

As a first try, please change the definition in Registry as:
state real EFFC ikj misc 1 - h "EFFC" "EFFC physics meaning" "EFFC unit"

Then type ./clean -a and recompile. I notice you made some other changes in Registry, too. Please make sure these changes follow the rules of WRF.
Thank you for the suggestion Ma'am. I indeed want to learn more about the model, this is my first time working with the registry.
The model output now shows the EFFC variable with the registry modification suggested by you. But if you see any other mistakes/errors in the other codes, please let me know.

Neeldip

Ming Chen
Posts: 1290
Joined: Mon Apr 23, 2018 9:42 pm

Re: Add EFFC variable to output

Post by Ming Chen » Wed Jan 20, 2021 10:12 pm

I suppose the code works now with EFFC included in the wrfout file. Please let me know if I am wrong.
In this case I would say that the codes work just as expected. If something is wrong, the case will fail again. If it runs to the end, it indicates that everything is fine.
WRF Help Desk

Post Reply

Return to “wrf.exe”