Skip to content

Commit

Permalink
Add hydro exchanges to noahmp
Browse files Browse the repository at this point in the history
* infiltration excess (out)
* soil drainage (out)
* surface head (in)
  • Loading branch information
danrosen25 committed Jun 25, 2024
1 parent 16a1d88 commit 8dcdd85
Show file tree
Hide file tree
Showing 3 changed files with 47 additions and 5 deletions.
13 changes: 10 additions & 3 deletions physics/SFC_Models/Land/Noahmp/module_sf_noahmplsm.F90
Original file line number Diff line number Diff line change
Expand Up @@ -449,7 +449,8 @@ subroutine noahmp_sflx (parameters, &
ghb , irg , irc , irb , tr , evc , & ! out :
chleaf , chuc , chv2 , chb2 , fpice , pahv , &
pahg , pahb , pah , esnow , canhs , laisun , &
laisha , rb , qsfcveg , qsfcbare &
laisha , rb , qsfcveg , qsfcbare, &
sfcheadrt &
#ifdef CCPP
,errmsg, errflg)
#else
Expand Down Expand Up @@ -612,6 +613,7 @@ subroutine noahmp_sflx (parameters, &
real (kind=kind_phys), intent(out) :: tgb
real (kind=kind_phys) :: q1
real (kind=kind_phys), intent(out) :: emissi
real (kind=kind_phys) , intent(in) :: sfcheadrt !< surface head (mm)
!jref:end
#ifdef CCPP
character(len=*), intent(inout) :: errmsg
Expand Down Expand Up @@ -884,7 +886,8 @@ subroutine noahmp_sflx (parameters, &
smcwtd ,deeprech,rech , & !inout
cmc ,ecan ,etran ,fwet ,runsrf ,runsub , & !out
qin ,qdis ,ponding1 ,ponding2,&
qsnbot ,esnow ) !out
qsnbot ,esnow, & !out
sfcheadrt) !in

! write(*,'(a20,10f15.5)') 'sflx:runoff=',runsrf*dt,runsub*dt,edir*dt

Expand Down Expand Up @@ -7027,7 +7030,8 @@ subroutine water (parameters,vegtyp ,nsnow ,nsoil ,imelt ,dt ,uu , &
smcwtd ,deeprech,rech , & !inout
cmc ,ecan ,etran ,fwet ,runsrf ,runsub , & !out
qin ,qdis ,ponding1 ,ponding2, &
qsnbot ,esnow)
qsnbot ,esnow, &
sfcheadrt) !in
! ----------------------------------------------------------------------
! code history:
! initial code: guo-yue niu, oct. 2007
Expand Down Expand Up @@ -7112,6 +7116,8 @@ subroutine water (parameters,vegtyp ,nsnow ,nsoil ,imelt ,dt ,uu , &
real (kind=kind_phys) , intent(in) :: latheag !< latent heat vap./sublimation (j/kg)
logical , intent(in) :: frozen_ground !< used to define latent heat pathway
logical , intent(in) :: frozen_canopy !< used to define latent heat pathway
! hydro coupling
real (kind=kind_phys) , intent(in) :: sfcheadrt !surface head (mm)


! local
Expand Down Expand Up @@ -7198,6 +7204,7 @@ subroutine water (parameters,vegtyp ,nsnow ,nsoil ,imelt ,dt ,uu , &
etrani(iz) = etran * btrani(iz) * 0.001
enddo

qinsur = qinsur+((sfcheadrt/dt)*0.001) !sfcheadrt (mm -> m/s)

! lake/soil water balances

Expand Down
15 changes: 13 additions & 2 deletions physics/SFC_Models/Land/Noahmp/noahmpdrv.F90
Original file line number Diff line number Diff line change
Expand Up @@ -197,7 +197,9 @@ subroutine noahmpdrv_run &
precip_adv_heat_grd_v_ccpp, &
precip_adv_heat_grd_b_ccpp, &
spec_humid_sfc_veg_ccpp, &
spec_humid_sfc_bare_ccpp &
spec_humid_sfc_bare_ccpp, &
! --- hydro:
sfcheadrt, infxsrt, soldrain &
)

use machine , only : kind_phys
Expand Down Expand Up @@ -402,6 +404,9 @@ subroutine noahmpdrv_run &
real(kind=kind_phys), dimension(:) , intent(out) :: ztmax ! thermal roughness length
real(kind=kind_phys), dimension(:) , intent(out), optional :: rca ! total canopy/stomatal resistance (s/m)

real(kind=kind_phys), dimension(:) , intent(in) :: sfcheadrt ! surface head [mm]
real(kind=kind_phys), dimension(:) , intent(out) :: infxsrt ! infiltration excess [mm]
real(kind=kind_phys), dimension(:) , intent(out) :: soldrain ! soil drainage [mm]
character(len=*) , intent(out) :: errmsg
integer , intent(out) :: errflg

Expand Down Expand Up @@ -502,6 +507,7 @@ subroutine noahmpdrv_run &
real (kind=kind_phys) :: o2_air ! in | atmospheric o2 concentration [Pa]
real (kind=kind_phys) :: foliage_nitrogen ! in | foliage nitrogen [%] [1-saturated]
real (kind=kind_phys), dimension(-nsnow+1: 0) :: snow_ice_frac_old ! in | snow ice fraction at last timestep [-]
real (kind=kind_phys) :: surface_head ! in | surface head [mm]
real (kind=kind_phys) :: forcing_height ! inout | forcing height [m]
real (kind=kind_phys) :: snow_albedo_old ! inout | snow albedo at last time step (class option) [-]
real (kind=kind_phys) :: snow_water_equiv_old ! inout | snow water equivalent at last time step [mm]
Expand Down Expand Up @@ -774,6 +780,7 @@ subroutine noahmpdrv_run &
!

forcing_height = zf(i)
surface_head = sfcheadrt(i)
snow_albedo_old = alboldxy(i)
snow_water_equiv_old = sneqvoxy(i)
temperature_snow_soil(-2: 0) = tsnoxy(i,:)
Expand Down Expand Up @@ -1022,9 +1029,11 @@ subroutine noahmpdrv_run &
lai_sunlit ,lai_shaded ,leaf_air_resistance , &
#ifdef CCPP
spec_humid_sfc_veg ,spec_humid_sfc_bare , &
surface_head, &
errmsg ,errflg )
#else
spec_humid_sfc_veg ,spec_humid_sfc_bare )
spec_humid_sfc_veg ,spec_humid_sfc_bare, &
surface_head)
#endif

#ifdef CCPP
Expand Down Expand Up @@ -1092,6 +1101,8 @@ subroutine noahmpdrv_run &
edir (i) = evaporation_soil
drain (i) = runoff_baseflow
runoff (i) = runoff_surface
infxsrt (i) = runoff_surface * timestep
soldrain (i) = max((runoff_baseflow * timestep), 0.0)

lfmassxy (i) = leaf_carbon
rtmassxy (i) = root_carbon
Expand Down
24 changes: 24 additions & 0 deletions physics/SFC_Models/Land/Noahmp/noahmpdrv.meta
Original file line number Diff line number Diff line change
Expand Up @@ -1411,6 +1411,30 @@
kind = kind_phys
intent = out
optional = True
[sfcheadrt]
standard_name = surface_water_depth
long_name = surface water depth
units = mm
dimensions = (horizontal_loop_extent)
type = real
kind = kind_phys
intent = in
[infxsrt]
standard_name = time_step_infiltration_excess
long_name = time step infiltration excess
units = mm
dimensions = (horizontal_loop_extent)
type = real
kind = kind_phys
intent = out
[soldrain]
standard_name = soil_column_drainage
long_name = soil column drainage
units = mm
dimensions = (horizontal_loop_extent)
type = real
kind = kind_phys
intent = out
[errmsg]
standard_name = ccpp_error_message
long_name = error message for error handling in CCPP
Expand Down

0 comments on commit 8dcdd85

Please sign in to comment.