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  use scale_atmos_phy_rd_mstrnx, only: &
92  use scale_atmos_phy_rd_offline, only: &
95  use scale_atmos_phy_rd_mm5sw, only: &
96  swinit
97  implicit none
98 
99  character(len=*), intent(in) :: rd_type
100  !---------------------------------------------------------------------------
101 
102  if( io_l ) write(io_fid_log,*) '*** => ', trim(rd_type), ' is selected.'
103 
104  select case( rd_type )
105  case('OFF')
106  ! do nothing
107  case( 'MSTRNX' )
108  call atmos_phy_rd_mstrnx_setup( rd_type )
110  case( 'OFFLINE' )
111  call atmos_phy_rd_offline_setup( rd_type )
113  case( 'WRF' )
114  call atmos_phy_rd_mstrnx_setup( 'MSTRNX' )
116  call swinit
117  case default
118  write(*,*) 'xxx invalid Radiation type(', trim(rd_type), '). CHECK!'
119  call prc_mpistop
120  end select
121 
122  return
123  end subroutine atmos_phy_rd_setup
124 
125 end module scale_atmos_phy_rd
module ATMOSPHERE / Physics Radiation
subroutine, public prc_mpistop
Abort MPI.
logical, public io_l
output log or not? (this process)
Definition: scale_stdio.F90:61
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.
subroutine, public atmos_phy_rd_offline_setup(RD_TYPE)
Setup.
subroutine, public atmos_phy_rd_mstrnx_setup(RD_TYPE)
Setup.
module grid index
module TRACER
module ATMOSPHERE / Physics Radiation
module ATMOSPHERE / Physics Radiation
module PROCESS
module profiler
Definition: scale_prof.F90:10
module PRECISION
subroutine, public atmos_phy_rd_setup(RD_TYPE)
Setup.
subroutine, public atmos_phy_rd_offline(DENS, RHOT, QTRC, CZ, FZ, fact_ocean, fact_land, fact_urban, temp_sfc, albedo_land, solins, cosSZA, flux_rad, flux_rad_top, SFLX_rad_dn)
Radiation main.
module ATMOSPHERE / Physics Radiation
integer, public io_fid_log
Log file ID.
Definition: scale_stdio.F90:56