Skip to content

Commit

Permalink
fixed error in heat flux instertion code that was there from the begi…
Browse files Browse the repository at this point in the history
…nning
  • Loading branch information
janmandel committed Jan 18, 2011
1 parent 598e065 commit b964224
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions wrfv2_fire/phys/module_fr_sfire_atm.F
Expand Up @@ -65,6 +65,7 @@ SUBROUTINE fire_tendency( &
REAL :: xlv_i
REAL :: z_w
REAL :: fact_g, fact_c
REAL :: alfg_i, alfc_i

REAL, DIMENSION( its:ite,kts:kte,jts:jte ) :: hfx,qfx

Expand All @@ -85,6 +86,8 @@ SUBROUTINE fire_tendency( &

cp_i = 1./cp ! inverse of specific heat
xlv_i = 1./xlv ! inverse of latent heat
alfg_i = 1./alfg
alfc_i = 1./alfc

!!write(msg,'(8e11.3)')cp,cp_i,xlv,xlv_i,alfg,alfc,z1can
!!call message(msg)
Expand Down Expand Up @@ -113,11 +116,11 @@ SUBROUTINE fire_tendency( &

! --- heat flux

fact_g = cp_i * EXP( - alfg * z_w )
fact_g = cp_i * EXP( - alfg_i * z_w )
IF ( z_w < z1can ) THEN
fact_c = cp_i
ELSE
fact_c = cp_i * EXP( - alfc * (z_w - z1can) )
fact_c = cp_i * EXP( - alfc_i * (z_w - z1can) )
END IF
hfx(i,k,j) = fact_g * grnhfx(i,j) + fact_c * canhfx(i,j)

Expand All @@ -127,11 +130,11 @@ SUBROUTINE fire_tendency( &

! --- vapor flux

fact_g = xlv_i * EXP( - alfg * z_w )
fact_g = xlv_i * EXP( - alfg_i * z_w )
IF (z_w < z1can) THEN
fact_c = xlv_i
ELSE
fact_c = xlv_i * EXP( - alfc * (z_w - z1can) )
fact_c = xlv_i * EXP( - alfc_i * (z_w - z1can) )
END IF
qfx(i,k,j) = fact_g * grnqfx(i,j) + fact_c * canqfx(i,j)

Expand Down

0 comments on commit b964224

Please sign in to comment.