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

Vertical Eddy Viscocity for MYJ Model

MirkoDHP

New member
Hello everyone,

I'm trying to obtain the vertical eddy viscosity to calculate turbulent fluxes (w'u' = -Km du/dz or w'v' = -Km dv/dz ), however, I'm failing to obtain Km or the eddy viscosity to calculate the fluxes.

I have been reading the forum and I found some threads related to this topic (such as T1, T2, or T3), but I haven't found a straightforward solution for MYJ in those threads. Looking at the module_bl_myjpbl.F, it is clear that MYJ does not output EXCH_M (only EXCH_H which is for heat).

I have edited the Registry.EM to obtain different variables such as EXCH_M, XKMV, or XKHV, but all of them are zero. The only ones that are not zero are EXCH_H, XKMH, and XKHH (the last two are horizontal eddy viscosities). I think XKHV should be equal to EXCH_H, but I'm still missing EXCH_M.

I know that one solution is to edit the MYJ module to output EXCH_M as it does with EXCH_H. However, I have to create many variables in order to perform this calculation, which for me is strange because I have seen many publications where they use MYJ and they plot the turbulent fluxes. Most of them, don't mention that they edited the codes.

Am I doing something wrong? Is there any solution to obtain Km or EXCH_M with MYJ? This is the namelist that I'm using (My simulation is only until 1km resolution, I understand for values lower than that I have to avoid PBL schemes):

Code:
&domains
 /

 &physics
 ...
 sf_sfclay_physics                   = 2,     2,     2, 2,2,2,
 sf_surface_physics                  = 2,     2,     2, 2, 2,2,
 bl_pbl_physics                      = 2,     2,     2, 2, 2,2,
 bldt                                = 0,     0,     0, 0, 0,0,
 ...
 sf_urban_physics                    = 0,     0,     0, 0,0,0,
 maxiens                             = 1,
 maxens                              = 3,
 maxens2                             = 3,
 maxens3                             = 16,
 ensdim                              = 144,
 sst_update                          = 1,
 /

 &fdda
 /

 &dynamics
...
 /

 &bdy_control
...
 /

 &grib2
 /

 &namelist_quilt
 nio_tasks_per_group = 0,
 nio_groups = 1,
 /

Thank you everyone in advance,
 
Last edited:
Hi,

exch_m is a diagnostic variable for momentum. It is not used outside the scheme

exch_m can be calculated with this line


EXCH_M(I,K+1,J)=AKMK(KFLIP)*DELTAZ

You can find this line in the myjurb and qnsepbl schemes that are based on MYJ
 
Hi,

exch_m is a diagnostic variable for momentum. It is not used outside the scheme

exch_m can be calculated with this line


EXCH_M(I,K+1,J)=AKMK(KFLIP)*DELTAZ

You can find this line in the myjurb and qnsepbl schemes that are based on MYJ
Thank you for your help :), I really appreciate it.

I will edit the module_bl_myjpbl.F with that line. One question, I was testing WRF3.9.1.1, and in that version (as in WRFV4.4.1), EXCH_H is defined as EXCH_H(I,K,J)=AKHK(KFLIP)*DELTAZ, but I just noticed that in WRFV3.4.1 EXCH_H is defined as EXCH_H(I,K+1,J)=AKHK(KFLIP)*DELTAZ (similar to the line that you just provided). Is this something that I should take care or it is just a change in the notation of the vertical levels between versions?

Also ( and I don't know if this is correct) do I have to add EXCH_M for the subroutine MYJPBLINIT like this? Is this necessary?:

Code:
      SUBROUTINE MYJPBLINIT(RUBLTEN,RVBLTEN,RTHBLTEN,RQVBLTEN,          &
     &                      TKE_MYJ,EXCH_H,RESTART,ALLOWED_TO_READ,     &
     &                      IDS,IDE,JDS,JDE,KDS,KDE,                    &
     &                      IMS,IME,JMS,JME,KMS,KME,                    &
     &                      ITS,ITE,JTS,JTE,KTS,KTE                 )
!-----------------------------------------------------------------------
      IMPLICIT NONE
!-----------------------------------------------------------------------
      LOGICAL,INTENT(IN) :: ALLOWED_TO_READ,RESTART
      INTEGER,INTENT(IN) :: IDS,IDE,JDS,JDE,KDS,KDE,                    &
     &                      IMS,IME,JMS,JME,KMS,KME,                    &
     &                      ITS,ITE,JTS,JTE,KTS,KTE

      REAL,DIMENSION(IMS:IME,KMS:KME,JMS:JME),INTENT(OUT) ::    EXCH_H, &
     &                                                         RUBLTEN, &
     &                                                         RVBLTEN, &
     &                                                        RTHBLTEN, &
     &                                                        RQVBLTEN, &
     &                                                         TKE_MYJ, &
                                                                 EXCH_M
      INTEGER :: I,J,K,ITF,JTF,KTF
!-----------------------------------------------------------------------
!-----------------------------------------------------------------------

      JTF=MIN0(JTE,JDE-1)
      KTF=MIN0(KTE,KDE-1)
      ITF=MIN0(ITE,IDE-1)

      IF(.NOT.RESTART)THEN
        DO J=JTS,JTF
        DO K=KTS,KTF
        DO I=ITS,ITF
          TKE_MYJ(I,K,J)=EPSQ2
          RUBLTEN(I,K,J)=0.
          RVBLTEN(I,K,J)=0.
          RTHBLTEN(I,K,J)=0.
          RQVBLTEN(I,K,J)=0.
          EXCH_H(I,K,J)=0.
          EXCH_M(I,K,J)=0.
        ENDDO
        ENDDO
        ENDDO
      ENDIF

      END SUBROUTINE MYJPBLINIT

Thank you!
 
please follow the formula in the version you used. Since WRFv4.0, the vertical coordinate is changed, which affects some codes. Personally I won't recommend mixing codes from different versions.
 
Top