Skip to content

Commit

Permalink
bug fix for HCPCT variable for glacierized grid cells (issue NCAR#140)
Browse files Browse the repository at this point in the history
  • Loading branch information
emilycollier committed Sep 6, 2024
1 parent 848f54a commit 9e7012e
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 6 deletions.
2 changes: 1 addition & 1 deletion drivers/wrf/module_sf_noahmpdrv.F
Original file line number Diff line number Diff line change
Expand Up @@ -1056,7 +1056,7 @@ SUBROUTINE noahmplsm(ITIMESTEP, YR, JULIAN, COSZIN,XLAT,XLONG, & ! IN
FSA, FSR, FIRA, FSH, FGEV, SSOIL, & ! OUT :
TRAD, ESOIL, RUNSF, RUNSB, SAG, SALB, & ! OUT :
QSNBOT,PONDING,PONDING1,PONDING2, T2MB, Q2MB, & ! OUT :
EMISSI, FPICE, CHB2, QMELT & ! OUT :
EMISSI, FPICE, CHB2, QMELT, HCPCT & ! OUT :
#ifdef WRF_HYDRO
, sfcheadrt(i,j) &
#endif
Expand Down
11 changes: 6 additions & 5 deletions src/module_sf_noahmp_glacier.F
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ SUBROUTINE NOAHMP_GLACIER (&
FSA ,FSR ,FIRA ,FSH ,FGEV ,SSOIL , & ! OUT :
TRAD ,EDIR ,RUNSRF ,RUNSUB ,SAG ,ALBEDO , & ! OUT :
QSNBOT ,PONDING ,PONDING1,PONDING2,T2M ,Q2E , & ! OUT :
EMISSI, FPICE, CH2B ,QMELT & ! OUT :
EMISSI, FPICE, CH2B ,QMELT, HCPCT & ! OUT :
#ifdef WRF_HYDRO
, sfcheadrt &
#endif
Expand Down Expand Up @@ -209,7 +209,8 @@ SUBROUTINE NOAHMP_GLACIER (&
REAL :: QDEW !ground surface dew rate [mm/s]
REAL :: QVAP !ground surface evap. rate [mm/s]
REAL :: LATHEA !latent heat [j/kg]
REAL, INTENT(OUT) :: QMELT !internal pack melt due to phase change [mm/s]
REAL, INTENT(OUT) :: QMELT !internal pack melt due to phase change [mm/s]
REAL, DIMENSION(-NSNOW+1:NSOIL), INTENT(OUT) :: HCPCT !heat capacity [j/m3/k]
REAL :: SWDOWN !downward solar [w/m2]
REAL :: BEG_WB !beginning water for error check
REAL :: ZBOT = -8.0
Expand Down Expand Up @@ -245,7 +246,7 @@ SUBROUTINE NOAHMP_GLACIER (&
TAUSS ,QSFC , & !inout
IMELT ,SNICEV ,SNLIQV ,EPORE ,QMELT ,PONDING, & !out
SAG ,FSA ,FSR ,FIRA ,FSH ,FGEV , & !out
TRAD ,T2M ,SSOIL ,LATHEA ,Q2E ,EMISSI, CH2B ) !out
TRAD ,T2M ,SSOIL ,LATHEA ,Q2E ,EMISSI, CH2B, HCPCT ) !out

SICE = MAX(0.0, SMC - SH2O)
SNEQVO = SNEQV
Expand Down Expand Up @@ -358,7 +359,7 @@ SUBROUTINE ENERGY_GLACIER (NSNOW ,NSOIL ,ISNOW ,DT ,QSNOW ,RHOAIR , & !i
TAUSS ,QSFC , & !inout
IMELT ,SNICEV ,SNLIQV ,EPORE ,QMELT ,PONDING, & !out
SAG ,FSA ,FSR ,FIRA ,FSH ,FGEV , & !out
TRAD ,T2M ,SSOIL ,LATHEA ,Q2E ,EMISSI, CH2B ) !out
TRAD ,T2M ,SSOIL ,LATHEA ,Q2E ,EMISSI, CH2B, HCPCT) !out

! --------------------------------------------------------------------------------------------------
! --------------------------------------------------------------------------------------------------
Expand Down Expand Up @@ -426,6 +427,7 @@ SUBROUTINE ENERGY_GLACIER (NSNOW ,NSOIL ,ISNOW ,DT ,QSNOW ,RHOAIR , & !i
REAL , INTENT(OUT) :: Q2E
REAL , INTENT(OUT) :: EMISSI
REAL , INTENT(OUT) :: CH2B !sensible heat conductance, canopy air to ZLVL air (m/s)
REAL, DIMENSION(-NSNOW+1:NSOIL) , INTENT(OUT) :: HCPCT !heat capacity [j/m3/k]


! local
Expand All @@ -438,7 +440,6 @@ SUBROUTINE ENERGY_GLACIER (NSNOW ,NSOIL ,ISNOW ,DT ,QSNOW ,RHOAIR , & !i
REAL :: FIRE !emitted IR (w/m2)
REAL, DIMENSION(-NSNOW+1:NSOIL) :: FACT !temporary used in phase change
REAL, DIMENSION(-NSNOW+1:NSOIL) :: DF !thermal conductivity [w/m/k]
REAL, DIMENSION(-NSNOW+1:NSOIL) :: HCPCT !heat capacity [j/m3/k]
REAL :: GAMMA !psychrometric constant (pa/k)
REAL :: RHSUR !raltive humidity in surface soil/snow air space (-)

Expand Down

0 comments on commit 9e7012e

Please sign in to comment.