@@ -154,7 +154,7 @@ module atmosphere_mod
154154public :: atmosphere_coarse_graining_parameters
155155public :: atmosphere_coarsening_strategy
156156
157- public :: populate_surf_diff, surf_diff_type
157+ public :: populate_surf_diff, land_feedback, surf_diff_type
158158!- ----------------------------------------------------------------------
159159! version number of this module
160160! Include variable "version" to be written to log file.
@@ -2055,6 +2055,34 @@ subroutine populate_surf_diff (surf_diff, IPD_Data, IAU_Data, Atm_block)
20552055
20562056 end subroutine populate_surf_diff
20572057
2058+ subroutine land_feedback (surf_diff , IPD_Data , IAU_Data , Atm_block )
2059+ type (surf_diff_type), intent (in ) :: Surf_diff
2060+ type (IPD_data_type), intent (inout ) :: IPD_Data(:)
2061+ type (IAU_external_data_type), intent (in ) :: IAU_Data
2062+ type (block_control_type), intent (in ) :: Atm_block
2063+
2064+ !- -- local variables ---
2065+ integer :: nb, blen, ix, i, j, k, k1, npz
2066+ real :: rdt
2067+
2068+ rdt= 1 ./ dt_atmos
2069+
2070+ npz= atm(mygrid)% npz
2071+
2072+ k= npz
2073+ do nb = 1 ,Atm_block% nblks
2074+ blen = Atm_block% blksz(nb)
2075+ do ix = 1 , blen
2076+ i = Atm_block% index (nb)% ii(ix)
2077+ j = Atm_block% index (nb)% jj(ix)
2078+ IPD_data(nb)% Statemid% stored_f1_out(ix,k) = IPD_data(nb)% Statemid% stored_f1_out(ix,k) + surf_diff% delta_t(i,j) ! getting updated temp from land
2079+ IPD_data(nb)% Statemid% stored_f2_out(ix,k) = IPD_data(nb)% Statemid% stored_f2_out(ix,k) + surf_diff% delta_tr(i,j,1 ) ! getting updated moisture from land
2080+ enddo
2081+ enddo
2082+
2083+ end subroutine land_feedback
2084+
2085+
20582086#include " atmosphere_r4.fh"
20592087#include " atmosphere_r8.fh"
20602088
0 commit comments