SCALE-RM
mod_cpl_admin.F90
Go to the documentation of this file.
1 !-------------------------------------------------------------------------------
9 !-------------------------------------------------------------------------------
10 #include "scalelib.h"
12  !-----------------------------------------------------------------------------
13  !
14  !++ used modules
15  !
16  use scale_precision
17  use scale_io
18  use scale_prof
19  !-----------------------------------------------------------------------------
20  implicit none
21  private
22  !-----------------------------------------------------------------------------
23  !
24  !++ Public procedure
25  !
26  public :: cpl_admin_setup
27  public :: cpl_admin_getscheme
28 
29  !-----------------------------------------------------------------------------
30  !
31  !++ Public parameters & variables
32  !
33  logical, public :: cpl_sw ! do coupler calculation?
34 
35  !-----------------------------------------------------------------------------
36  !
37  !++ Private procedure
38  !
39  !-----------------------------------------------------------------------------
40  !
41  !++ Private parameters & variables
42  !
43  !-----------------------------------------------------------------------------
44 contains
45  !-----------------------------------------------------------------------------
47  subroutine cpl_admin_setup
48  use scale_prc, only: &
49  prc_abort
50  use mod_atmos_admin, only: &
53  use mod_ocean_admin, only: &
54  ocean_do
55  use mod_land_admin, only: &
56  land_do
57  use mod_urban_admin, only: &
58  urban_do
59  implicit none
60  !---------------------------------------------------------------------------
61 
62  log_newline
63  log_info("CPL_ADMIN_setup",*) 'Setup'
64 
65  !-----< module component check >-----
66 
67  log_newline
68  log_info("CPL_ADMIN_setup",*) 'Coupler components '
69 
70  ! Atmos-Ocean/Land/Urban Switch
71  if ( ocean_do .OR. land_do .OR. urban_do ) then
72  cpl_sw = .true.
73  else
74  cpl_sw = .false.
75  endif
76 
77  ! Check Atmos_Surface setting
78  if ( cpl_sw ) then
79  log_info_cont(*) 'Coupler : ON'
80 
81  if ( atmos_phy_sf_type == 'COUPLE' ) then
82  ! do nothing
83  elseif( atmos_phy_sf_type == 'NONE' ) then
84  log_info_cont(*) '-> Surface Flux Type is forced to change from NONE to COUPLE.'
85  ! overwrite
86  atmos_phy_sf_type = 'COUPLE'
87  atmos_sw_phy_sf = .true.
88  else
89  log_error("CPL_ADMIN_setup",*) 'Setting conflicts between coupler and surface flux! STOP.'
90  log_error_cont(*) 'Surface Flux : ', trim(atmos_phy_sf_type)
91  call prc_abort
92  endif
93  else
94  log_info_cont(*) 'Coupler : OFF'
95  endif
96 
97  return
98  end subroutine cpl_admin_setup
99 
100  !-----------------------------------------------------------------------------
102  subroutine cpl_admin_getscheme
103  implicit none
104  !---------------------------------------------------------------------------
105 
106  return
107  end subroutine cpl_admin_getscheme
108 
109 end module mod_cpl_admin
mod_urban_admin::urban_do
logical, public urban_do
Definition: mod_urban_admin.F90:32
scale_prc::prc_abort
subroutine, public prc_abort
Abort Process.
Definition: scale_prc.F90:350
mod_cpl_admin::cpl_admin_setup
subroutine, public cpl_admin_setup
Setup.
Definition: mod_cpl_admin.F90:48
scale_precision
module PRECISION
Definition: scale_precision.F90:14
mod_atmos_admin
module ATMOS admin
Definition: mod_atmos_admin.F90:11
scale_prc
module PROCESS
Definition: scale_prc.F90:11
mod_atmos_admin::atmos_phy_sf_type
character(len=h_short), public atmos_phy_sf_type
Definition: mod_atmos_admin.F90:40
scale_io
module STDIO
Definition: scale_io.F90:10
mod_ocean_admin
module Ocean admin
Definition: mod_ocean_admin.F90:11
mod_land_admin
module Land admin
Definition: mod_land_admin.F90:11
scale_prof
module profiler
Definition: scale_prof.F90:11
mod_ocean_admin::ocean_do
logical, public ocean_do
Definition: mod_ocean_admin.F90:32
mod_cpl_admin::cpl_admin_getscheme
subroutine, public cpl_admin_getscheme
Get name of scheme for each component.
Definition: mod_cpl_admin.F90:103
mod_land_admin::land_do
logical, public land_do
Definition: mod_land_admin.F90:41
mod_urban_admin
module Urban admin
Definition: mod_urban_admin.F90:11
mod_cpl_admin::cpl_sw
logical, public cpl_sw
Definition: mod_cpl_admin.F90:33
mod_cpl_admin
module Coupler admin
Definition: mod_cpl_admin.F90:11
mod_atmos_admin::atmos_sw_phy_sf
logical, public atmos_sw_phy_sf
Definition: mod_atmos_admin.F90:56