SCALE-RM
mod_cpl_admin.f90
Go to the documentation of this file.
1 !-------------------------------------------------------------------------------
9 !-------------------------------------------------------------------------------
11  !-----------------------------------------------------------------------------
12  !
13  !++ used modules
14  !
15  use scale_precision
16  use scale_stdio
17  use scale_prof
18  !-----------------------------------------------------------------------------
19  implicit none
20  private
21  !-----------------------------------------------------------------------------
22  !
23  !++ Public procedure
24  !
25  public :: cpl_admin_setup
26  public :: cpl_admin_getscheme
27 
28  !-----------------------------------------------------------------------------
29  !
30  !++ Public parameters & variables
31  !
32  logical, public :: cpl_sw ! do coupler calculation?
33 
34  !-----------------------------------------------------------------------------
35  !
36  !++ Private procedure
37  !
38  !-----------------------------------------------------------------------------
39  !
40  !++ Private parameters & variables
41  !
42  !-----------------------------------------------------------------------------
43 contains
44  !-----------------------------------------------------------------------------
46  subroutine cpl_admin_setup
47  use scale_process, only: &
49  use mod_atmos_admin, only: &
52  use mod_ocean_admin, only: &
53  ocean_sw
54  use mod_land_admin, only: &
55  land_sw
56  use mod_urban_admin, only: &
57  urban_sw
58  implicit none
59  !---------------------------------------------------------------------------
60 
61  if( io_l ) write(io_fid_log,*)
62  if( io_l ) write(io_fid_log,*) '++++++ Module[ADMIN] / Categ[CPL] / Origin[SCALE-RM]'
63 
64  !-----< module component check >-----
65 
66  if( io_l ) write(io_fid_log,*)
67  if( io_l ) write(io_fid_log,*) '*** Coupler components ***'
68 
69  ! Atoms-Ocean/Land/Urban Switch
70  if ( ocean_sw .OR. land_sw .OR. urban_sw ) then
71  cpl_sw = .true.
72  else
73  cpl_sw = .false.
74  endif
75 
76  ! Check Atmos_Surface setting
77  if ( cpl_sw ) then
78  if( io_l ) write(io_fid_log,*) '*** Coupler : ON'
79 
80  if ( atmos_phy_sf_type == 'COUPLE' ) then
81  ! do nothing
82  elseif( atmos_phy_sf_type == 'NONE' ) then
83  if( io_l ) write(io_fid_log,*) '*** -> Surface Flux Type is forced to change from NONE to COUPLE.'
84  ! overwrite
85  atmos_phy_sf_type = 'COUPLE'
86  atmos_sw_phy_sf = .true.
87  else
88  if( io_l ) write(io_fid_log,*) '*** Surface Flux : ', trim(atmos_phy_sf_type)
89  if( io_l ) write(io_fid_log,*) 'xxx Setting conflicts between coupler and surface flux! STOP.'
90  write(*,*) 'xxx Setting conflicts between coupler and surface flux! STOP.'
91  call prc_mpistop
92  endif
93  else
94  if( io_l ) write(io_fid_log,*) '*** 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
module ATMOS admin
module Land admin
logical, public ocean_sw
logical, public urban_sw
subroutine, public prc_mpistop
Abort MPI.
logical, public io_l
output log or not? (this process)
Definition: scale_stdio.F90:61
module STDIO
Definition: scale_stdio.F90:12
character(len=h_short), public atmos_phy_sf_type
module PROCESS
module Ocean admin
logical, public atmos_sw_phy_sf
subroutine, public cpl_admin_getscheme
Get name of scheme for each component.
logical, public cpl_sw
module profiler
Definition: scale_prof.F90:10
subroutine, public cpl_admin_setup
Setup.
module PRECISION
logical, public land_sw
integer, public io_fid_log
Log file ID.
Definition: scale_stdio.F90:56
module Coupler admin
module Urban admin