SCALE-RM
Functions/Subroutines | Variables
scale_atmos_phy_rd_common Module Reference

module atmosphere / physics / radiation / common More...

Functions/Subroutines

subroutine, public atmos_phy_rd_calc_heating (KA, KS, KE, IA, IS, IE, JA, JS, JE, flux_rad, DENS, TEMP, CVtot, FZ, RHOH, TEMP_t)
 Calc heating rate. More...
 

Variables

integer, parameter, public i_up = 1
 
integer, parameter, public i_dn = 2
 
integer, parameter, public i_lw = 1
 
integer, parameter, public i_sw = 2
 

Detailed Description

module atmosphere / physics / radiation / common

Description
Common module for Radiation
Author
Team SCALE

Function/Subroutine Documentation

◆ atmos_phy_rd_calc_heating()

subroutine, public scale_atmos_phy_rd_common::atmos_phy_rd_calc_heating ( integer, intent(in)  KA,
integer, intent(in)  KS,
integer, intent(in)  KE,
integer, intent(in)  IA,
integer, intent(in)  IS,
integer, intent(in)  IE,
integer, intent(in)  JA,
integer, intent(in)  JS,
integer, intent(in)  JE,
real(rp), dimension(ka,ia,ja,2,2), intent(in)  flux_rad,
real(rp), dimension (ka,ia,ja), intent(in)  DENS,
real(rp), dimension (ka,ia,ja), intent(in)  TEMP,
real(rp), dimension (ka,ia,ja), intent(in)  CVtot,
real(rp), dimension (0:ka,ia,ja), intent(in)  FZ,
real(rp), dimension(ka,ia,ja), intent(out)  RHOH,
real(rp), dimension(ka,ia,ja,3), intent(out), optional  TEMP_t 
)

Calc heating rate.

Definition at line 60 of file scale_atmos_phy_rd_common.F90.

60  implicit none
61  integer, intent(in) :: KA, KS, KE
62  integer, intent(in) :: IA, IS, IE
63  integer, intent(in) :: JA, JS, JE
64 
65  real(RP), intent(in) :: flux_rad(KA,IA,JA,2,2)
66  real(RP), intent(in) :: DENS (KA,IA,JA)
67  real(RP), intent(in) :: TEMP (KA,IA,JA)
68  real(RP), intent(in) :: CVtot (KA,IA,JA)
69  real(RP), intent(in) :: FZ (0:KA,IA,JA)
70 
71  real(RP), intent(out) :: RHOH(KA,IA,JA)
72 
73  real(RP), intent(out), optional :: TEMP_t(KA,IA,JA,3)
74 
75  real(RP) :: RHOH_LW, RHOH_SW
76 
77  integer :: k, i, j
78  !---------------------------------------------------------------------------
79 
80  if ( present(temp_t) ) then
81 
82  !$omp parallel do default(none) OMP_SCHEDULE_ collapse(2) &
83  !$omp private(i,j,k, &
84  !$omp RHOH_LW,RHOH_SW) &
85  !$omp shared(RHOH,TEMP_t,flux_rad,DENS,CVtot,FZ, &
86  !$omp KS,KE,IS,IE,JS,JE)
87  !$acc kernels
88  do j = js, je
89  do i = is, ie
90  do k = ks, ke
91 
92  rhoh_lw = ( ( flux_rad(k,i,j,i_lw,i_dn) - flux_rad(k-1,i,j,i_lw,i_dn) ) &
93  - ( flux_rad(k,i,j,i_lw,i_up) - flux_rad(k-1,i,j,i_lw,i_up) ) &
94  ) / ( fz(k,i,j) - fz(k-1,i,j) )
95 
96  rhoh_sw = ( ( flux_rad(k,i,j,i_sw,i_dn) - flux_rad(k-1,i,j,i_sw,i_dn) ) &
97  - ( flux_rad(k,i,j,i_sw,i_up) - flux_rad(k-1,i,j,i_sw,i_up) ) &
98  ) / ( fz(k,i,j) - fz(k-1,i,j) )
99 
100  rhoh(k,i,j) = rhoh_lw + rhoh_sw
101 
102  temp_t(k,i,j,i_lw) = rhoh_lw / dens(k,i,j) / cvtot(k,i,j) * 86400.0_rp ! [K/day]
103  temp_t(k,i,j,i_sw) = rhoh_sw / dens(k,i,j) / cvtot(k,i,j) * 86400.0_rp ! [K/day]
104 
105  temp_t(k,i,j,3) = temp_t(k,i,j,i_lw) + temp_t(k,i,j,i_sw)
106 
107  enddo
108  enddo
109  enddo
110  !$acc end kernels
111 
112  else
113 
114  !$omp parallel do default(none) OMP_SCHEDULE_ collapse(2) &
115  !$omp private(i,j,k, &
116  !$omp RHOH_LW,RHOH_SW) &
117  !$omp shared(RHOH,flux_rad,FZ, &
118  !$omp KS,KE,IS,IE,JS,JE)
119  !$acc kernels
120  do j = js, je
121  do i = is, ie
122  do k = ks, ke
123 
124  rhoh_lw = ( ( flux_rad(k,i,j,i_lw,i_dn) - flux_rad(k-1,i,j,i_lw,i_dn) ) &
125  - ( flux_rad(k,i,j,i_lw,i_up) - flux_rad(k-1,i,j,i_lw,i_up) ) &
126  ) / ( fz(k,i,j) - fz(k-1,i,j) )
127 
128  rhoh_sw = ( ( flux_rad(k,i,j,i_sw,i_dn) - flux_rad(k-1,i,j,i_sw,i_dn) ) &
129  - ( flux_rad(k,i,j,i_sw,i_up) - flux_rad(k-1,i,j,i_sw,i_up) ) &
130  ) / ( fz(k,i,j) - fz(k-1,i,j) )
131 
132  rhoh(k,i,j) = rhoh_lw + rhoh_sw
133 
134  enddo
135  enddo
136  enddo
137  !$acc end kernels
138 
139  end if
140 
141  return

References i_dn, i_lw, i_sw, and i_up.

Referenced by mod_atmos_phy_rd_driver::atmos_phy_rd_driver_calc_tendency().

Here is the caller graph for this function:

Variable Documentation

◆ i_up

integer, parameter, public scale_atmos_phy_rd_common::i_up = 1

◆ i_dn

integer, parameter, public scale_atmos_phy_rd_common::i_dn = 2

◆ i_lw

integer, parameter, public scale_atmos_phy_rd_common::i_lw = 1

◆ i_sw

integer, parameter, public scale_atmos_phy_rd_common::i_sw = 2
scale_atmos_phy_rd_common::i_dn
integer, parameter, public i_dn
Definition: scale_atmos_phy_rd_common.F90:35
scale_atmos_phy_rd_common::i_lw
integer, parameter, public i_lw
Definition: scale_atmos_phy_rd_common.F90:37
scale_atmos_phy_rd_common::i_up
integer, parameter, public i_up
Definition: scale_atmos_phy_rd_common.F90:34
scale_atmos_phy_rd_common::i_sw
integer, parameter, public i_sw
Definition: scale_atmos_phy_rd_common.F90:38