Page 1 of 1

Where does WRF calculate velocity?

PostPosted: Thu Nov 02, 2017 7:37 am
by emilyp

I am trying to find the part of the code where WRF updates the velocity u and v (or ru and rv). In particular I want to know exactly how rv is calculated from rv_tend. I assumed it was in rk_tendency but can't find where the 4D variables are actually updated at the end of the timestep.

Any help much appreciated!

Re: Where does WRF calculate velocity?

PostPosted: Tue May 29, 2018 1:16 pm
by sudheer717

The main code is in WRFV3/dyn_em/module_em.F

This is the place where ru_tend is updated in the above file.

# line number around 810

Code: Select all
DO j = jts,MIN(jte,jde-1)
   DO k = kts,kte-1
    DO i = its,ite
      ! multiply by my to uncouple u
      IF(rk_step == 1)ru_tendf(i,k,j) = ru_tendf(i,k,j) +  u_save(i,k,j)*msfuy(i,j)
      ! divide by my to couple u
      ru_tend(i,k,j) = ru_tend(i,k,j) + ru_tendf(i,k,j)/msfuy(i,j)

Then, it goes into module_big_step_utilities_em.F file for actually calculating the velocities. Search for rv(i,k,j) inside the file.