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

Add EFFC variable to output

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.

neel14

Member
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.
 
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/tutorial/202001/gill_registry.pdf
 
Hello Ma'am,

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

Code:
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

  • log.compile
    839.6 KB · Views: 39
  • module_microphysics_driver.F
    160.5 KB · Views: 46
  • module_mp_morr_two_moment.F
    163.7 KB · Views: 46
  • Registry.EM_COMMON
    393.9 KB · Views: 49
  • solve_em.F
    255.6 KB · Views: 46
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.
 
Ming Chen said:
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
 
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.
 
Top