SCALE-RM
Functions/Subroutines | Variables
scale_coriolis Module Reference

module Coriolis More...

Functions/Subroutines

subroutine, public coriolis_setup (IA, JA, LAT, CY, DOMAIN_CENTER_Y)
 Setup. More...
 
subroutine, public coriolis_finalize
 Finalize. More...
 

Variables

real(rp), dimension(:,:), allocatable, public coriolis_f
 
real(rp), allocatable, public coriolis
 
real(rp), allocatable, public parameter
 
character(len=h_short), public coriolis_type = 'PLANE'
 
character(len=h_short), public type
 
character(len=h_short), public of
 
character(len=h_short), public force
 
real(rp), public coriolis_f0 = 0.0_RP
 'PLANE' : f = CORIOLIS_f0 + CORIOLIS_beta * ( CY - CORIOLIS_y0 ) 'SPHERE': f = 2 * CONST_OHM * sin( lat ) More...
 
real(rp), public coriolis_beta = 0.0_RP
 
real(rp), public coriolis_y0
 
real(rp), public default
 
real(rp), public is
 
real(rp), public domain
 
real(rp), public center
 

Detailed Description

module Coriolis

Description
Coriolis module
Author
Team SCALE
NAMELIST
  • PARAM_CORIOLIS
    nametypedefault valuecomment
    CORIOLIS_TYPE character(len=H_SHORT) 'PLANE' !> type of coriolis force: 'PLANE', 'SPHERE'
    CORIOLIS_F0 real(RP) 0.0_RP
    CORIOLIS_BETA real(RP) 0.0_RP
    CORIOLIS_Y0 real(RP) > default is domain center

History Output
No history output

Function/Subroutine Documentation

◆ coriolis_setup()

subroutine, public scale_coriolis::coriolis_setup ( integer, intent(in)  IA,
integer, intent(in)  JA,
real(rp), dimension(ia,ja), intent(in)  LAT,
real(rp), dimension (ja), intent(in)  CY,
real(rp), intent(in)  DOMAIN_CENTER_Y 
)

Setup.

Parameters
[in]domain_center_ycenter position of global domain [m]: y

Definition at line 60 of file scale_coriolis.F90.

60  use scale_prc, only: &
61  prc_abort
62  use scale_const, only: &
63  ohm => const_ohm
64  implicit none
65  integer, intent(in) :: IA, JA
66 
67  real(RP), intent(in) :: LAT(IA,JA)
68  real(RP), intent(in) :: CY (JA)
69  real(RP), intent(in) :: DOMAIN_CENTER_Y
70 
71  namelist / param_coriolis / &
72  coriolis_type, &
73  coriolis_f0, &
74  coriolis_beta, &
75  coriolis_y0
76 
77  integer :: i, j
78 
79  integer :: ierr
80  !---------------------------------------------------------------------------
81 
82  log_newline
83  log_info("CORIOLIS_setup",*) 'Setup'
84 
85  coriolis_y0 = domain_center_y
86 
87  !--- read namelist
88  rewind(io_fid_conf)
89  read(io_fid_conf,nml=param_coriolis,iostat=ierr)
90 
91  if( ierr < 0 ) then !--- missing
92  log_info("CORIOLIS_setup",*) 'Not found namelist. Default used.'
93  elseif( ierr > 0 ) then !--- fatal error
94  log_error("CORIOLIS_setup",*) 'Not appropriate names in namelist PARAM_CORIOLIS. Check!'
95  call prc_abort
96  endif
97  log_nml(param_coriolis)
98 
99 
100  allocate( coriolis_f(ia,ja) )
101 
102  ! coriolis parameter
103  select case ( coriolis_type )
104  case ( 'PLANE' )
105  !omp parallel do collapse(2)
106  do j = 1, ja
107  do i = 1, ia
108  coriolis_f(i,j) = coriolis_f0 + coriolis_beta * ( cy(j) - coriolis_y0 )
109  end do
110  end do
111  case ( 'SPHERE' )
112  !omp parallel do collapse(2)
113  do j = 1, ja
114  do i = 1, ia
115  coriolis_f(i,j) = 2.0_rp * ohm * sin( lat(i,j) )
116  end do
117  end do
118  case default
119  log_error("CORIOLIS_setup",*) 'Coriolis type is invalid: ', trim(coriolis_type)
120  log_error_cont(*) 'The type must be PLANE or SPHERE'
121  call prc_abort
122  end select
123 
124  !$acc enter data copyin(CORIOLIS_f)
125 
126  return

References scale_const::const_ohm, coriolis_beta, coriolis_f, coriolis_f0, coriolis_type, coriolis_y0, scale_io::io_fid_conf, and scale_prc::prc_abort().

Referenced by mod_rm_driver::rm_driver(), and mod_rm_prep::rm_prep().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ coriolis_finalize()

subroutine, public scale_coriolis::coriolis_finalize

Finalize.

Definition at line 132 of file scale_coriolis.F90.

132  implicit none
133  !---------------------------------------------------------------------------
134 
135  !$acc exit data delete(CORIOLIS_f)
136  deallocate( coriolis_f )
137 
138  return

References coriolis_f.

Referenced by mod_rm_driver::rm_driver(), and mod_rm_prep::rm_prep().

Here is the caller graph for this function:

Variable Documentation

◆ coriolis_f

real(rp), dimension(:,:), allocatable, public scale_coriolis::coriolis_f

Definition at line 34 of file scale_coriolis.F90.

34  real(RP), public, allocatable :: CORIOLIS_f(:,:)

Referenced by mod_atmos_dyn_driver::atmos_dyn_driver(), coriolis_finalize(), and coriolis_setup().

◆ coriolis

character(len=h_short), allocatable, public scale_coriolis::coriolis

Definition at line 34 of file scale_coriolis.F90.

◆ parameter

real(rp), allocatable, public scale_coriolis::parameter

Definition at line 34 of file scale_coriolis.F90.

◆ coriolis_type

character(len=h_short), public scale_coriolis::coriolis_type = 'PLANE'

Definition at line 37 of file scale_coriolis.F90.

37  character(len=H_SHORT), public :: CORIOLIS_type = 'PLANE'

Referenced by coriolis_setup().

◆ type

character(len=h_short), public scale_coriolis::type

Definition at line 37 of file scale_coriolis.F90.

◆ of

character(len=h_short), public scale_coriolis::of

Definition at line 37 of file scale_coriolis.F90.

◆ force

character(len=h_short), public scale_coriolis::force

Definition at line 37 of file scale_coriolis.F90.

◆ coriolis_f0

real(rp), public scale_coriolis::coriolis_f0 = 0.0_RP

'PLANE' : f = CORIOLIS_f0 + CORIOLIS_beta * ( CY - CORIOLIS_y0 ) 'SPHERE': f = 2 * CONST_OHM * sin( lat )

Definition at line 40 of file scale_coriolis.F90.

40  real(RP), public :: CORIOLIS_f0 = 0.0_rp

Referenced by coriolis_setup().

◆ coriolis_beta

real(rp), public scale_coriolis::coriolis_beta = 0.0_RP

Definition at line 41 of file scale_coriolis.F90.

41  real(RP), public :: CORIOLIS_beta = 0.0_rp

Referenced by coriolis_setup().

◆ coriolis_y0

real(rp), public scale_coriolis::coriolis_y0

Definition at line 42 of file scale_coriolis.F90.

42  real(RP), public :: CORIOLIS_y0

Referenced by coriolis_setup().

◆ default

real(rp), public scale_coriolis::default

Definition at line 42 of file scale_coriolis.F90.

◆ is

real(rp), public scale_coriolis::is

Definition at line 42 of file scale_coriolis.F90.

◆ domain

real(rp), public scale_coriolis::domain

Definition at line 42 of file scale_coriolis.F90.

◆ center

real(rp), public scale_coriolis::center

Definition at line 42 of file scale_coriolis.F90.

scale_prc::prc_abort
subroutine, public prc_abort
Abort Process.
Definition: scale_prc.F90:350
scale_prc
module PROCESS
Definition: scale_prc.F90:11
scale_const
module CONSTANT
Definition: scale_const.F90:11
scale_atmos_grid_cartesc_index::ia
integer, public ia
Definition: scale_atmos_grid_cartesC_index.F90:48
scale_atmos_grid_cartesc_index::ja
integer, public ja
Definition: scale_atmos_grid_cartesC_index.F90:49
scale_const::const_ohm
real(rp), public const_ohm
angular velocity of the planet [1/s]
Definition: scale_const.F90:48