[Wrf-users] Bug fix to WRF-NMM v3.0

Kemp, Eric M. Eric.Kemp at ngc.com
Mon Apr 14 09:13:20 MDT 2008


Dear WRF-NMM community:

I have found a bug in the newly released distribution.  In subroutine BUCKETS (dyn_nmm/BUCKETS.F), there are
calls made to function FPVS0 (phys/module_mp_etanew.F) to calculate saturation vapor pressure.  FPVS0 uses
lookup tables to complete the calculation, and the lookup tables must first be initialized by calling subroutine
GPVS (also in phys/module_mp_etanew.F).  Currently this subroutine is only called if the Eta microphysics are being used; for other microphysics options, FPVS0 returns bogus answers.

This bug can be corrected by modifying dyn_nmm/BUCKETS.F

Near line 77:

! EMK BEGIN BUG FIX
!      USE MODULE_MP_ETANEW,ONLY: C1XPVS,C1XPVS0,C2XPVS,C2XPVS0          &
!                                ,FPVS,FPVS0,NX,TBPVS,TBPVS0
      USE MODULE_MP_ETANEW,ONLY: C1XPVS,C1XPVS0,C2XPVS,C2XPVS0          &
                                ,FPVS,FPVS0,NX,TBPVS,TBPVS0 &
                                ,GPVS ! Initializes lookup table
! EMK END BUG FIX

Near line 148:

      IF(FIRST_PASS)THEN
        FIRST_PASS=.FALSE.
!
        EPSILON=R_D/R_V
        ONE_MINUS_EPSILON=1.-EPSILON
        R_FACTOR=1./EPSILON-1.
        CP_FACTOR=CPV/CP-1.

        ! EMK BEGIN BUG FIX
        call gpvs ! Make sure saturation vapor pressure lookup table
                  ! is initialized
        ! EMK END BUG FIX
      ENDIF


Happy computing,

-Eric


Eric M. Kemp
Meteorologist
Northrop Grumman Information Technology
Intelligence Group (TASC)
4801 Stonecroft Boulevard
Chantilly, VA 20151
(703) 633-8300 x7078 (lab)
(703) 633-8300 x8278 (office)
(703) 449-3400       (fax)
eric.kemp at ngc.com

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mailman.ucar.edu/pipermail/wrf-users/attachments/20080414/43e8c406/attachment.html


More information about the Wrf-users mailing list