SCALE-RM
scale_atmos_dyn_tinteg_short.F90
Go to the documentation of this file.
1 !-------------------------------------------------------------------------------
13 !-------------------------------------------------------------------------------
14 #include "inc_openmp.h"
16  !-----------------------------------------------------------------------------
17  !
18  !++ used modules
19  !
20  use scale_precision
21  use scale_stdio
22  use scale_prof
24  use scale_index
25  use scale_tracer
26  !-----------------------------------------------------------------------------
27  implicit none
28  private
29  !-----------------------------------------------------------------------------
30  !
31  !++ Public procedure
32  !
34 
36  abstract interface
37  subroutine short( &
38  DENS, MOMZ, MOMX, MOMY, RHOT, PROG, & ! (inout)
39  mflx_hi, tflx_hi, & ! (inout)
40  dens_t, momz_t, momx_t, momy_t, rhot_t, & ! (in)
41  rtot, cvtot, corioli, & ! (in)
42  num_diff, divdmp_coef, ddiv, & ! (in)
43  flag_fct_momentum, flag_fct_t, & ! (in)
44  flag_fct_along_stream, & ! (in)
45  cdz, fdz, fdx, fdy, & ! (in)
46  rcdz, rcdx, rcdy, rfdz, rfdx, rfdy, & ! (in)
47  phi, gsqrt, j13g, j23g, j33g, mapf, & ! (in)
48  ref_pres, ref_dens, & ! (in)
49  bnd_w, bnd_e, bnd_s, bnd_n, & ! (in)
50  dt ) ! (in)
51  use scale_precision
53  use scale_index
54  real(RP), intent(inout) :: dens(ka,ia,ja)
55  real(RP), intent(inout) :: momz(ka,ia,ja)
56  real(RP), intent(inout) :: momx(ka,ia,ja)
57  real(RP), intent(inout) :: momy(ka,ia,ja)
58  real(RP), intent(inout) :: rhot(ka,ia,ja)
59  real(RP), intent(inout) :: prog(ka,ia,ja,va)
60 
61  real(RP), intent(inout) :: mflx_hi(ka,ia,ja,3)
62  real(RP), intent(inout) :: tflx_hi(ka,ia,ja,3)
63 
64  real(RP), intent(in) :: dens_t(ka,ia,ja)
65  real(RP), intent(in) :: momz_t(ka,ia,ja)
66  real(RP), intent(in) :: momx_t(ka,ia,ja)
67  real(RP), intent(in) :: momy_t(ka,ia,ja)
68  real(RP), intent(in) :: rhot_t(ka,ia,ja)
69 
70  real(RP), intent(in) :: rtot(ka,ia,ja)
71  real(RP), intent(in) :: cvtot(ka,ia,ja)
72  real(RP), intent(in) :: corioli(ia,ja)
73 
74  real(RP), intent(in) :: num_diff(ka,ia,ja,5,3)
75  real(RP), intent(in) :: divdmp_coef
76  real(RP), intent(in) :: ddiv(ka,ia,ja)
77 
78  logical, intent(in) :: flag_fct_momentum
79  logical, intent(in) :: flag_fct_t
80  logical, intent(in) :: flag_fct_along_stream
81 
82  real(RP), intent(in) :: cdz (ka)
83  real(RP), intent(in) :: fdz (ka-1)
84  real(RP), intent(in) :: fdx (ia-1)
85  real(RP), intent(in) :: fdy (ja-1)
86  real(RP), intent(in) :: rcdz(ka)
87  real(RP), intent(in) :: rcdx(ia)
88  real(RP), intent(in) :: rcdy(ja)
89  real(RP), intent(in) :: rfdz(ka-1)
90  real(RP), intent(in) :: rfdx(ia-1)
91  real(RP), intent(in) :: rfdy(ja-1)
92 
93  real(RP), intent(in) :: phi (ka,ia,ja)
94  real(RP), intent(in) :: gsqrt(ka,ia,ja,7)
95  real(RP), intent(in) :: j13g (ka,ia,ja,7)
96  real(RP), intent(in) :: j23g (ka,ia,ja,7)
97  real(RP), intent(in) :: j33g
98  real(RP), intent(in) :: mapf (ia,ja,2,4)
99 
100  real(RP), intent(in) :: ref_pres(ka,ia,ja)
101  real(RP), intent(in) :: ref_dens(ka,ia,ja)
102 
103  logical, intent(in) :: bnd_w
104  logical, intent(in) :: bnd_e
105  logical, intent(in) :: bnd_s
106  logical, intent(in) :: bnd_n
107 
108  real(RP), intent(in) :: dt
109  end subroutine short
110  end interface
111  procedure(short), pointer :: atmos_dyn_tinteg_short => null()
112  public :: atmos_dyn_tinteg_short
113 
114  !-----------------------------------------------------------------------------
115  !
116  !++ Public parameters & variables
117  !
118  !-----------------------------------------------------------------------------
119  !
120  !++ Private procedure
121  !
122  !-----------------------------------------------------------------------------
123  !
124  !++ Private parameters & variables
125  !
126  !-----------------------------------------------------------------------------
127 contains
128  !-----------------------------------------------------------------------------
130  subroutine atmos_dyn_tinteg_short_setup( &
131  ATMOS_DYN_Tinteg_short_TYPE )
133  use scale_precision
134  use scale_grid_index
135  use scale_index
136  use scale_process, only: &
138 #define EXTM(pre, name, post) pre ## name ## post
139 #define NAME(pre, name, post) EXTM(pre, name, post)
140 #ifdef TINTEG_SHORT
141  use name(scale_atmos_dyn_tinteg_short_, tinteg_short,), only: &
142  name(atmos_dyn_rk_tinteg_short_, tinteg_short, _setup), &
143  name(atmos_dyn_rk_tinteg_short_, tinteg_short,)
144 #else
151 #endif
152  implicit none
153  character(len=*), intent(in) :: ATMOS_DYN_Tinteg_short_TYPE
154  !---------------------------------------------------------------------------
155 
156 #ifdef TINTEG_SHORT
157  name(atmos_dyn_tinteg_short_, tinteg_short, _setup)( &
158  atmos_dyn_tinteg_short_type )
159  atmos_dyn_tinteg_short => name(atmos_dyn_tingeg_short_, tinteg_short,)
160 #else
161  select case ( atmos_dyn_tinteg_short_type )
162  case ( 'RK3', 'RK3WS2002' )
164  atmos_dyn_tinteg_short_type )
166  case ( 'RK4' )
168  atmos_dyn_tinteg_short_type )
170  case ( 'OFF', 'NONE' )
171  ! do nothing
172  case default
173  write(*,*) 'xxx ATMOS_DYN_TINTEG_SHORT_TYPE is invalid: ', atmos_dyn_tinteg_short_type
174  call prc_mpistop
175  end select
176 #endif
177 
178  return
179  end subroutine atmos_dyn_tinteg_short_setup
180 
subroutine, public atmos_dyn_tinteg_short_rk4(DENS, MOMZ, MOMX, MOMY, RHOT, PROG, mflx_hi, tflx_hi, DENS_t, MOMZ_t, MOMX_t, MOMY_t, RHOT_t, Rtot, CVtot, CORIOLI, num_diff, divdmp_coef, DDIV, FLAG_FCT_MOMENTUM, FLAG_FCT_T, FLAG_FCT_ALONG_STREAM, CDZ, FDZ, FDX, FDY, RCDZ, RCDX, RCDY, RFDZ, RFDX, RFDY, PHI, GSQRT, J13G, J23G, J33G, MAPF, REF_pres, REF_dens, BND_W, BND_E, BND_S, BND_N, dt)
RK3.
subroutine, public prc_mpistop
Abort MPI.
integer, public va
Definition: scale_index.F90:38
subroutine, public atmos_dyn_tinteg_short_rk4_setup(tinteg_type)
Setup.
module STDIO
Definition: scale_stdio.F90:12
subroutine, public atmos_dyn_tinteg_short_rk3(DENS, MOMZ, MOMX, MOMY, RHOT, PROG, mflx_hi, tflx_hi, DENS_t, MOMZ_t, MOMX_t, MOMY_t, RHOT_t, Rtot, CVtot, CORIOLI, num_diff, divdmp_coef, DDIV, FLAG_FCT_MOMENTUM, FLAG_FCT_T, FLAG_FCT_ALONG_STREAM, CDZ, FDZ, FDX, FDY, RCDZ, RCDX, RCDY, RFDZ, RFDX, RFDY, PHI, GSQRT, J13G, J23G, J33G, MAPF, REF_pres, REF_dens, BND_W, BND_E, BND_S, BND_N, dt)
RK3.
module Atmosphere / Dynamics Temporal integration
module grid index
module TRACER
module Index
Definition: scale_index.F90:14
integer, public ia
of x whole cells (local, with HALO)
integer, public ka
of z whole cells (local, with HALO)
module PROCESS
subroutine, public atmos_dyn_tinteg_short_rk3_setup(tinteg_type)
Setup.
module profiler
Definition: scale_prof.F90:10
module PRECISION
subroutine, public atmos_dyn_tinteg_short_setup(ATMOS_DYN_Tinteg_short_TYPE)
Register.
procedure(short), pointer, public atmos_dyn_tinteg_short
integer, public ja
of y whole cells (local, with HALO)