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...
 

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 59 of file scale_coriolis.F90.

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

Variable Documentation

◆ coriolis_f

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

Definition at line 33 of file scale_coriolis.F90.

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

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

◆ coriolis

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

Definition at line 33 of file scale_coriolis.F90.

◆ parameter

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

Definition at line 33 of file scale_coriolis.F90.

◆ coriolis_type

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

Definition at line 36 of file scale_coriolis.F90.

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

Referenced by coriolis_setup().

◆ type

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

Definition at line 36 of file scale_coriolis.F90.

◆ of

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

Definition at line 36 of file scale_coriolis.F90.

◆ force

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

Definition at line 36 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 39 of file scale_coriolis.F90.

39  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 40 of file scale_coriolis.F90.

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

Referenced by coriolis_setup().

◆ coriolis_y0

real(rp), public scale_coriolis::coriolis_y0

Definition at line 41 of file scale_coriolis.F90.

41  real(RP), public :: CORIOLIS_y0

Referenced by coriolis_setup().

◆ default

real(rp), public scale_coriolis::default

Definition at line 41 of file scale_coriolis.F90.

◆ is

real(rp), public scale_coriolis::is

Definition at line 41 of file scale_coriolis.F90.

◆ domain

real(rp), public scale_coriolis::domain

Definition at line 41 of file scale_coriolis.F90.

◆ center

real(rp), public scale_coriolis::center

Definition at line 41 of file scale_coriolis.F90.

scale_prc::prc_abort
subroutine, public prc_abort
Abort Process.
Definition: scale_prc.F90:342
scale_prc
module PROCESS
Definition: scale_prc.F90:11
scale_const
module CONSTANT
Definition: scale_const.F90:11