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

Modifying Kessler microphysics scheme: Adding new mixing variable qp.

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.

Jslaten

New member
Hello all,


Our team is making modification to the Kessler Microphysics scheme in WRF 4.3 (most current release on github). The goal is to include a new mixing ratio of a gas release which we denote 'qp' for this scenario. My problem since I unfortunately don't fully understand the Kessler scheme I want to make sure I am including the variable in the appropriate way so as WRF-Real will use it.

I will try to be as thorough as possible so as anyone else wanting to do anything similar in the future can hopefully follow along.

The first step will be into include the qp variable into the 'Registry/Registry.EM_COMMON' file from the main wrf directory.
This can be most easily done by searching for 'QVAPOR' in the Moist Scalars section
Code:
state   real    qp             ikjftb   moist       1         -     \
 482   i0rhusdf=(bdy_interp:dt)   "QPLUME"           "Plume gas mixing Ratio"     "kg kg-1"

Then we have included the variable in the package declaration section.

Code:
package   kesslerscheme   mp_physics==1                -             moist:qv,qc,qr,qp # JS

The actual Kessler Scheme is located in 'phys/module_mp_kessler.F'

To be concise the only real modifications we have made our to include the qp variable thusly
Code:
 MODULE module_mp_kessler
   
  CONTAINS
   !----------------------------------------------------------------
      SUBROUTINE kessler( t, qv, qc, qr, qp, rho, pii              & ! JS
                         ,dt_in, z, xlv, cp                        &
                        ,EP2,SVP1,SVP2,SVP3,SVPT0,rhowater        &
                        ,dz8w                                     &
                        ,RAINNC, RAINNCV                          &
                        ,ids,ide, jds,jde, kds,kde                & ! domain dims
                        ,ims,ime, jms,jme, kms,kme                & ! memory dims
                        ,its,ite, jts,jte, kts,kte                & ! tile   dims
                                                                  )

Code:
     REAL, DIMENSION( ims:ime , kms:kme , jms:jme ),              &
           INTENT(INOUT) ::                                       &
                                                              t , &
                                                              qv, &
                                                              qc, &
                                                              qr, &
                                                              qp   ! JS
So then the next time we include qp is in the update step

Code:
        qv(i,k,j) = amax1(qv(i,k,j) - product + ern,0.) + qp(i,k,j) ! JS

Finally my question is , is this the appropriate way to include this variable into the Kessler scheme so as it is calculated in the density?

* I didn't include all the times to modify anytime the kessler scheme is called.
 
Top