SCALE-RM
Functions/Subroutines | Variables
mod_cpl_admin Module Reference

module Coupler admin More...

Functions/Subroutines

subroutine, public cpl_admin_setup
 Setup. More...
 
subroutine, public cpl_admin_getscheme
 Get name of scheme for each component. More...
 

Variables

logical, public cpl_sw
 

Detailed Description

module Coupler admin

Description
Coupler submodel administrator
Author
Team SCALE

Function/Subroutine Documentation

◆ cpl_admin_setup()

subroutine, public mod_cpl_admin::cpl_admin_setup ( )

Setup.

Definition at line 47 of file mod_cpl_admin.f90.

References mod_atmos_admin::atmos_phy_sf_type, mod_atmos_admin::atmos_sw_phy_sf, cpl_sw, scale_stdio::io_fid_log, scale_stdio::io_l, mod_land_admin::land_sw, scale_landuse::landuse_fact_land, scale_landuse::landuse_fact_ocean, scale_landuse::landuse_fact_urban, mod_ocean_admin::ocean_sw, scale_process::prc_mpistop(), and mod_urban_admin::urban_sw.

Referenced by mod_rm_driver::scalerm(), and mod_rm_prep::scalerm_prep().

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  use scale_landuse, only: &
62  implicit none
63 
64  real(RP) :: checkfact
65  !---------------------------------------------------------------------------
66 
67  if( io_l ) write(io_fid_log,*)
68  if( io_l ) write(io_fid_log,*) '++++++ Module[ADMIN] / Categ[CPL] / Origin[SCALE-RM]'
69 
70  !-----< module component check >-----
71 
72  if( io_l ) write(io_fid_log,*)
73  if( io_l ) write(io_fid_log,*) '*** Coupler components ***'
74 
75  ! Atoms-Ocean/Land/Urban Switch
76  if ( ocean_sw .OR. land_sw .OR. urban_sw ) then
77  cpl_sw = .true.
78  else
79  cpl_sw = .false.
80  endif
81 
82  ! Check consistency of OCEAN_sw and LANDUSE_fact_ocean
83  checkfact = maxval( landuse_fact_ocean(:,:) )
84  if ( .NOT. ocean_sw .AND. checkfact > 0.0_rp ) then
85  if( io_l ) write(io_fid_log,*) 'xxx Ocean fraction exists, but ocean components never called. STOP.', checkfact
86  write(*,*) 'xxx Ocean fraction exists, but ocean components never called. STOP.', checkfact
87  call prc_mpistop
88  endif
89 
90  ! Check consistency of LAND_sw and LANDUSE_fact_land
91  checkfact = maxval( landuse_fact_land(:,:) )
92  if ( .NOT. land_sw .AND. checkfact > 0.0_rp ) then
93  if( io_l ) write(io_fid_log,*) 'xxx Land fraction exists, but land components never called. STOP.', checkfact
94  write(*,*) 'xxx Land fraction exists, but land components never called. STOP.', checkfact
95  call prc_mpistop
96  endif
97 
98  ! Check consistency of URBAN_sw and LANDUSE_fact_urban
99  checkfact = maxval( landuse_fact_urban(:,:) )
100  if ( .NOT. urban_sw .AND. checkfact > 0.0_rp ) then
101  if( io_l ) write(io_fid_log,*) 'xxx URBAN fraction exists, but urban components never called. STOP.', checkfact
102  write(*,*) 'xxx URBAN fraction exists, but urban components never called. STOP.', checkfact
103  call prc_mpistop
104  endif
105 
106  ! Check Atmos_Surface setting
107  if ( cpl_sw ) then
108  if( io_l ) write(io_fid_log,*) '*** Coupler : ON'
109 
110  if ( atmos_phy_sf_type == 'COUPLE' ) then
111  ! do nothing
112  elseif( atmos_phy_sf_type == 'NONE' ) then
113  if( io_l ) write(io_fid_log,*) '*** -> Surface Flux Type is forced to change from NONE to COUPLE.'
114  ! overwrite
115  atmos_phy_sf_type = 'COUPLE'
116  atmos_sw_phy_sf = .true.
117  else
118  if( io_l ) write(io_fid_log,*) '*** Surface Flux : ', trim(atmos_phy_sf_type)
119  if( io_l ) write(io_fid_log,*) 'xxx Setting conflicts between coupler and surface flux! STOP.'
120  write(*,*) 'xxx Setting conflicts between coupler and surface flux! STOP.'
121  call prc_mpistop
122  endif
123  else
124  if( io_l ) write(io_fid_log,*) '*** Coupler : OFF'
125  endif
126 
127  return
module ATMOS admin
module Land admin
logical, public ocean_sw
logical, public urban_sw
subroutine, public prc_mpistop
Abort MPI.
real(rp), dimension(:,:), allocatable, public landuse_fact_urban
urban factor
character(len=h_short), public atmos_phy_sf_type
module LANDUSE
real(rp), dimension(:,:), allocatable, public landuse_fact_ocean
ocean factor
module PROCESS
module Ocean admin
logical, public atmos_sw_phy_sf
logical, public cpl_sw
logical, public land_sw
real(rp), dimension(:,:), allocatable, public landuse_fact_land
land factor
module Urban admin
Here is the call graph for this function:
Here is the caller graph for this function:

◆ cpl_admin_getscheme()

subroutine, public mod_cpl_admin::cpl_admin_getscheme ( )

Get name of scheme for each component.

Definition at line 133 of file mod_cpl_admin.f90.

133  implicit none
134  !---------------------------------------------------------------------------
135 
136  return

Variable Documentation

◆ cpl_sw

logical, public mod_cpl_admin::cpl_sw