SCALE-RM
scale_atmos_phy_rd.F90
Go to the documentation of this file.
1 !-------------------------------------------------------------------------------
13 !-------------------------------------------------------------------------------
15  !-----------------------------------------------------------------------------
16  !
17  !++ used modules
18  !
19  use scale_precision
20  use scale_stdio
21  use scale_prof
23  use scale_tracer
24  !-----------------------------------------------------------------------------
25  implicit none
26  private
27  !-----------------------------------------------------------------------------
28  !
29  !++ Public procedure
30  !
31  public :: atmos_phy_rd_setup
32 
33  !-----------------------------------------------------------------------------
34  !
35  !++ Public parameters & variables
36  !
37  !-----------------------------------------------------------------------------
38  !
39  !++ Private procedure
40  !
41  !-----------------------------------------------------------------------------
42  !
43  !++ Private parameters & variables
44  !
45  abstract interface
46  subroutine rd( &
47  DENS, RHOT, QTRC, &
48  CZ, FZ, &
49  fact_ocean, &
50  fact_land, &
51  fact_urban, &
52  temp_sfc, albedo_land, &
53  solins, cosSZA, &
54  flux_rad, &
55  flux_rad_top, &
56  flux_sfc_dn )
57  use scale_precision
59  use scale_tracer
60  implicit none
61 
62  real(RP), intent(in) :: dens (ka,ia,ja)
63  real(RP), intent(in) :: rhot (ka,ia,ja)
64  real(RP), intent(in) :: qtrc (ka,ia,ja,qa)
65  real(RP), intent(in) :: cz ( ka,ia,ja) ! UNUSED
66  real(RP), intent(in) :: fz (0:ka,ia,ja)
67  real(RP), intent(in) :: fact_ocean (ia,ja)
68  real(RP), intent(in) :: fact_land (ia,ja)
69  real(RP), intent(in) :: fact_urban (ia,ja)
70  real(RP), intent(in) :: temp_sfc (ia,ja)
71  real(RP), intent(in) :: albedo_land (ia,ja,2)
72  real(RP), intent(in) :: solins (ia,ja)
73  real(RP), intent(in) :: cossza (ia,ja)
74  real(RP), intent(out) :: flux_rad (ka,ia,ja,2,2,2)
75  real(RP), intent(out) :: flux_rad_top(ia,ja,2,2,2)
76  real(RP), intent(out) :: flux_sfc_dn (ia,ja,2,2)
77  end subroutine rd
78  end interface
79  procedure(rd), pointer :: atmos_phy_rd => null()
80  public :: atmos_phy_rd
81 
82  !-----------------------------------------------------------------------------
83 contains
84  !-----------------------------------------------------------------------------
86  subroutine atmos_phy_rd_setup( RD_TYPE )
87  use scale_process, only: &
89 #define EXTM(pre, name, post) pre ## name ## post
90 #define NAME(pre, name, post) EXTM(pre, name, post)
91 #ifdef RD
92  use name(scale_atmos_phy_rd_, rd,), only: &
93  name(atmos_phy_rd_, rd, _setup), &
94  name(atmos_phy_rd_, rd,)
95 #else
96  use scale_atmos_phy_rd_mstrnx, only: &
99 #endif
100  use scale_atmos_phy_rd_mm5sw, only: &
101  swinit
102  implicit none
103 
104  character(len=*), intent(in) :: RD_TYPE
105  !---------------------------------------------------------------------------
106 
107  select case ( rd_type )
108  case ( 'MSTRNX' )
109  call atmos_phy_rd_mstrnx_setup( rd_type )
111  case ( 'WRF' )
112  call atmos_phy_rd_mstrnx_setup( 'MSTRNX' )
114  call swinit
115  case default
116  write(*,*) 'xxx invalid Radiation type(', trim(rd_type), '). CHECK!'
117  call prc_mpistop
118  end select
119 
120  return
121  end subroutine atmos_phy_rd_setup
122 
123 end module scale_atmos_phy_rd
module ATMOSPHERE / Physics Radiation
subroutine, public prc_mpistop
Abort MPI.
procedure(rd), pointer, public atmos_phy_rd
module STDIO
Definition: scale_stdio.F90:12
subroutine, public atmos_phy_rd_mstrnx(DENS, RHOT, QTRC, CZ, FZ, fact_ocean, fact_land, fact_urban, temp_sfc, albedo_land, solins, cosSZA, flux_rad, flux_rad_top, flux_rad_sfc_dn)
Radiation main.
integer, public qa
subroutine, public atmos_phy_rd_mstrnx_setup(RD_TYPE)
Setup.
module grid index
module TRACER
integer, public ia
of x whole cells (local, with HALO)
integer, public ka
of z whole cells (local, with HALO)
module ATMOSPHERE / Physics Radiation
module PROCESS
module profiler
Definition: scale_prof.F90:10
module PRECISION
subroutine, public atmos_phy_rd_setup(RD_TYPE)
Setup.
module ATMOSPHERE / Physics Radiation
integer, public ja
of y whole cells (local, with HALO)