FE-Project
Loading...
Searching...
No Matches
scale_coriolis_param Module Reference

Module common / Coriolis parameter. More...

Functions/Subroutines

subroutine, public get_coriolis_parameter (coriolis, colioris_type, np, y, f0, beta, y0, lat)
 Get Coriolis parameter.

Detailed Description

Module common / Coriolis parameter.

Description
Setup coriolis parameter (for regional model)
Reference
Author
Yuta Kawai, Team SCALE

Function/Subroutine Documentation

◆ get_coriolis_parameter()

subroutine, public scale_coriolis_param::get_coriolis_parameter ( real(rp), dimension(np), intent(out) coriolis,
character(*), intent(in) colioris_type,
integer, intent(in) np,
real(rp), dimension(np), intent(in), optional y,
real(rp), intent(in), optional f0,
real(rp), intent(in), optional beta,
real(rp), intent(in), optional y0,
real(rp), dimension(np), intent(in), optional lat )

Get Coriolis parameter.

Parameters
[in]npArray size
[out]coriolisArray storing Coriolis parameter
[in]colioris_typeType of Coriolis parameter [PLANE / SPHERE / NONE]
[in]yy-coordinate which is used when COLIORIS_type=PLANE
[in]f0Value of Coriolis parameter at reference latitude which is used when COLIORIS_type=PLANE
[in]betaRossby parameter at reference latitude which is used when COLIORIS_type=PLANE
[in]y0Distance from reference latitude
[in]latLatitude

Definition at line 39 of file scale_coriolis_param.F90.

44
45 implicit none
46
47 integer, intent(in) :: Np !< Array size
48 real(RP), intent(out) :: coriolis(Np) !< Array storing Coriolis parameter
49 character(*), intent(in) :: COLIORIS_type !< Type of Coriolis parameter [PLANE / SPHERE / NONE]
50 real(RP), intent(in), optional :: y(Np) !< y-coordinate which is used when COLIORIS_type=PLANE
51 real(RP), intent(in), optional :: f0 !< Value of Coriolis parameter at reference latitude which is used when COLIORIS_type=PLANE
52 real(RP), intent(in), optional :: beta !< Rossby parameter at reference latitude which is used when COLIORIS_type=PLANE
53 real(RP), intent(in), optional :: y0 !< Distance from reference latitude
54 real(RP), intent(in), optional :: lat(Np) !< Latitude
55
56 integer :: i
57 !------------------------------------------
58
59 if ( trim(colioris_type) == 'PLANE' ) then
60 if ( ( .not. present(f0) ) .or. ( .not. present(beta) ) &
61 .or. ( .not. present(y) ) .or. ( .not. present(y0) ) ) then
62 log_error('get_coriolis_parameter',*) 'If COLIORIS_type is set to PLANE, f0 and beta must be passed. Check!'
63 call prc_abort
64 end if
65 !$omp parallel do
66 do i=1, np
67 coriolis(i) = f0 + beta * ( y(i) - y0 )
68 end do
69 else if ( trim(colioris_type) == 'SPHERE' ) then
70 if ( .not. present(lat) ) then
71 log_error('get_coriolis_parameter',*) 'If COLIORIS_type is set to SPHERE, lat must be passed. Check!'
72 call prc_abort
73 end if
74 !$omp parallel do
75 do i=1, np
76 coriolis(i) = 2.0_rp * ohm * sin( lat(i) )
77 end do
78 else if ( trim(colioris_type) == 'NONE' ) then
79 !$omp parallel do
80 do i=1, np
81 coriolis(i) = 0.0_rp
82 end do
83 else
84 log_error('get_coriolis_parameter',*) 'Unexpected COLIORIS_type is specified. Check! COLIORIS_type=', colioris_type
85 call prc_abort
86 end if
87
88 return

Referenced by mod_atmos_dyn::atmosdyn_setup().