SCALE-RM
scale_atmos_dyn_tinteg_large.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 
35  abstract interface
36  subroutine large( &
37  DENS, MOMZ, MOMX, MOMY, RHOT, QTRC, PROG, &
38  DENS_av, MOMZ_av, MOMX_av, MOMY_av, RHOT_av, QTRC_av, &
39  mflx_hi, tflx_hi, &
40  num_diff, num_diff_q, &
41  DENS_tp, MOMZ_tp, MOMX_tp, MOMY_tp, RHOT_tp, RHOQ_tp, &
42  CORIOLI, &
43  CDZ, CDX, CDY, FDZ, FDX, FDY, &
44  RCDZ, RCDX, RCDY, RFDZ, RFDX, RFDY, &
45  PHI, GSQRT, &
46  J13G, J23G, J33G, MAPF, &
47  AQ_CV, &
48  REF_dens, REF_pott, REF_qv, REF_pres, &
49  BND_W, BND_E, BND_S, BND_N, &
50  ND_COEF, ND_COEF_Q, ND_ORDER, ND_SFC_FACT, ND_USE_RS, &
51  DAMP_DENS, DAMP_VELZ, DAMP_VELX, &
52  DAMP_VELY, DAMP_POTT, DAMP_QTRC, &
53  DAMP_alpha_DENS, DAMP_alpha_VELZ, DAMP_alpha_VELX, &
54  DAMP_alpha_VELY, DAMP_alpha_POTT, DAMP_alpha_QTRC, &
55  divdmp_coef, &
56  FLAG_FCT_MOMENTUM, FLAG_FCT_T, FLAG_FCT_TRACER, &
57  FLAG_FCT_ALONG_STREAM, &
58  USE_AVERAGE, &
59  DTL, DTS )
60  use scale_precision
62  use scale_index
63  use scale_tracer
64  use scale_atmos_boundary, only: &
65  bnd_qa
66  real(RP), intent(inout) :: dens(ka,ia,ja)
67  real(RP), intent(inout) :: momz(ka,ia,ja)
68  real(RP), intent(inout) :: momx(ka,ia,ja)
69  real(RP), intent(inout) :: momy(ka,ia,ja)
70  real(RP), intent(inout) :: rhot(ka,ia,ja)
71  real(RP), intent(inout) :: qtrc(ka,ia,ja,qa)
72  real(RP), intent(inout) :: prog(ka,ia,ja,va)
73 
74  real(RP), intent(inout) :: dens_av(ka,ia,ja)
75  real(RP), intent(inout) :: momz_av(ka,ia,ja)
76  real(RP), intent(inout) :: momx_av(ka,ia,ja)
77  real(RP), intent(inout) :: momy_av(ka,ia,ja)
78  real(RP), intent(inout) :: rhot_av(ka,ia,ja)
79  real(RP), intent(inout) :: qtrc_av(ka,ia,ja,qa)
80 
81  real(RP), intent(out) :: mflx_hi(ka,ia,ja,3)
82  real(RP), intent(out) :: tflx_hi(ka,ia,ja,3)
83  real(RP), intent(out) :: num_diff(ka,ia,ja,5,3)
84  real(RP), intent(out) :: num_diff_q(ka,ia,ja,3)
85 
86  real(RP), intent(in) :: dens_tp(ka,ia,ja)
87  real(RP), intent(in) :: momz_tp(ka,ia,ja)
88  real(RP), intent(in) :: momx_tp(ka,ia,ja)
89  real(RP), intent(in) :: momy_tp(ka,ia,ja)
90  real(RP), intent(in) :: rhot_tp(ka,ia,ja)
91  real(RP), intent(in) :: rhoq_tp(ka,ia,ja,qa)
92 
93  real(RP), intent(in) :: corioli(ia,ja)
94 
95  real(RP), intent(in) :: cdz (ka)
96  real(RP), intent(in) :: cdx (ia)
97  real(RP), intent(in) :: cdy (ja)
98  real(RP), intent(in) :: fdz (ka-1)
99  real(RP), intent(in) :: fdx (ia-1)
100  real(RP), intent(in) :: fdy (ja-1)
101  real(RP), intent(in) :: rcdz(ka)
102  real(RP), intent(in) :: rcdx(ia)
103  real(RP), intent(in) :: rcdy(ja)
104  real(RP), intent(in) :: rfdz(ka-1)
105  real(RP), intent(in) :: rfdx(ia-1)
106  real(RP), intent(in) :: rfdy(ja-1)
107 
108  real(RP), intent(in) :: phi (ka,ia,ja)
109  real(RP), intent(in) :: gsqrt(ka,ia,ja,7)
110  real(RP), intent(in) :: j13g (ka,ia,ja,7)
111  real(RP), intent(in) :: j23g (ka,ia,ja,7)
112  real(RP), intent(in) :: j33g
113  real(RP), intent(in) :: mapf (ia,ja,2,4)
114 
115 
116  real(RP), intent(in) :: aq_cv(qqa)
117  real(RP), intent(in) :: ref_dens(ka,ia,ja)
118  real(RP), intent(in) :: ref_pott(ka,ia,ja)
119  real(RP), intent(in) :: ref_qv (ka,ia,ja)
120  real(RP), intent(in) :: ref_pres(ka,ia,ja)
121 
122  logical, intent(in) :: bnd_w
123  logical, intent(in) :: bnd_e
124  logical, intent(in) :: bnd_s
125  logical, intent(in) :: bnd_n
126 
127  real(RP), intent(in) :: nd_coef
128  real(RP), intent(in) :: nd_coef_q
129  integer, intent(in) :: nd_order
130  real(RP), intent(in) :: nd_sfc_fact
131  logical, intent(in) :: nd_use_rs
132 
133  real(RP), intent(in) :: damp_dens(ka,ia,ja)
134  real(RP), intent(in) :: damp_velz(ka,ia,ja)
135  real(RP), intent(in) :: damp_velx(ka,ia,ja)
136  real(RP), intent(in) :: damp_vely(ka,ia,ja)
137  real(RP), intent(in) :: damp_pott(ka,ia,ja)
138  real(RP), intent(in) :: damp_qtrc(ka,ia,ja,bnd_qa)
139  real(RP), intent(in) :: damp_alpha_dens(ka,ia,ja)
140  real(RP), intent(in) :: damp_alpha_velz(ka,ia,ja)
141  real(RP), intent(in) :: damp_alpha_velx(ka,ia,ja)
142  real(RP), intent(in) :: damp_alpha_vely(ka,ia,ja)
143  real(RP), intent(in) :: damp_alpha_pott(ka,ia,ja)
144  real(RP), intent(in) :: damp_alpha_qtrc(ka,ia,ja,bnd_qa)
145 
146  real(RP), intent(in) :: divdmp_coef
147  logical, intent(in) :: flag_fct_momentum
148  logical, intent(in) :: flag_fct_t
149  logical, intent(in) :: flag_fct_tracer
150  logical, intent(in) :: flag_fct_along_stream
151  logical, intent(in) :: use_average
152 
153  real(DP), intent(in) :: dtl
154  real(DP), intent(in) :: dts
155  end subroutine large
156  end interface
157  procedure(large), pointer :: atmos_dyn_tinteg_large => null()
158  public :: atmos_dyn_tinteg_large
159 
160  !-----------------------------------------------------------------------------
161  !
162  !++ Public parameters & variables
163  !
164  !-----------------------------------------------------------------------------
165  !
166  !++ Private procedure
167  !
168  !-----------------------------------------------------------------------------
169  !
170  !++ Private parameters & variables
171  !
172  !-----------------------------------------------------------------------------
173 contains
174  !-----------------------------------------------------------------------------
176  subroutine atmos_dyn_tinteg_large_setup( &
177  ATMOS_DYN_Tinteg_large_TYPE )
179  use scale_grid_index
180  use scale_index
181  use scale_process, only: &
183 #define EXTM(pre, name, post) pre ## name ## post
184 #define NAME(pre, name, post) EXTM(pre, name, post)
185 #ifdef TINTEG_LARGE
186  use name(scale_atmos_dyn_tinteg_large_, tinteg_large,), only: &
187  name(atmos_dyn_rk_tinteg_large_, tinteg_large, _setup), &
188  name(atmos_dyn_rk_tinteg_large_, tinteg_large,)
189 #else
196 #endif
197  implicit none
198  character(len=*), intent(in) :: ATMOS_DYN_Tinteg_large_TYPE
199  !---------------------------------------------------------------------------
200 
201 #ifdef TINTEG_LARGE
202  name(atmos_dyn_tinteg_large_, tinteg_large, _setup)( &
203  atmos_dyn_tinteg_large_type )
204  atmos_dyn_tinteg_large => name(atmos_dyn_tingeg_large_, tinteg_large,)
205 #else
206  select case ( atmos_dyn_tinteg_large_type )
207  case ( 'EULER' )
209  atmos_dyn_tinteg_large_type )
211  case ( 'RK3' )
213  atmos_dyn_tinteg_large_type )
215  case ( 'OFF', 'NONE' )
216  ! do nothing
217  case default
218  write(*,*) 'xxx ATMOS_DYN_TINTEG_LARGE_TYPE is invalid: ', atmos_dyn_tinteg_large_type
219  call prc_mpistop
220  end select
221 #endif
222 
223  return
224  end subroutine atmos_dyn_tinteg_large_setup
225 
subroutine, public prc_mpistop
Abort MPI.
integer, public va
Definition: scale_index.F90:38
subroutine, public atmos_dyn_tinteg_large_setup(ATMOS_DYN_Tinteg_large_TYPE)
Register.
module Atmosphere / Dynamics Temporal integration
module STDIO
Definition: scale_stdio.F90:12
integer, public qa
procedure(large), pointer, public atmos_dyn_tinteg_large
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)
integer, public qqa
subroutine, public atmos_dyn_tinteg_large_rk3_setup(tinteg_type)
Setup.
module PROCESS
subroutine, public atmos_dyn_tinteg_large_euler_setup(tinteg_type)
Setup.
module profiler
Definition: scale_prof.F90:10
module PRECISION
subroutine, public atmos_dyn_tinteg_large_rk3(DENS, MOMZ, MOMX, MOMY, RHOT, QTRC, PROG, DENS_av, MOMZ_av, MOMX_av, MOMY_av, RHOT_av, QTRC_av, mflx_hi, tflx_hi, num_diff, num_diff_q, DENS_tp, MOMZ_tp, MOMX_tp, MOMY_tp, RHOT_tp, RHOQ_tp, CORIOLI, CDZ, CDX, CDY, FDZ, FDX, FDY, RCDZ, RCDX, RCDY, RFDZ, RFDX, RFDY, PHI, GSQRT, J13G, J23G, J33G, MAPF, AQ_CV, REF_dens, REF_pott, REF_qv, REF_pres, BND_W, BND_E, BND_S, BND_N, ND_COEF, ND_COEF_Q, ND_ORDER, ND_SFC_FACT, ND_USE_RS, DAMP_DENS, DAMP_VELZ, DAMP_VELX, DAMP_VELY, DAMP_POTT, DAMP_QTRC, DAMP_alpha_DENS, DAMP_alpha_VELZ, DAMP_alpha_VELX, DAMP_alpha_VELY, DAMP_alpha_POTT, DAMP_alpha_QTRC, divdmp_coef, FLAG_FCT_MOMENTUM, FLAG_FCT_T, FLAG_FCT_TRACER, FLAG_FCT_ALONG_STREAM, USE_AVERAGE, DTL, DTS)
RK3.
module ATMOSPHERE / Boundary treatment
subroutine, public atmos_dyn_tinteg_large_euler(DENS, MOMZ, MOMX, MOMY, RHOT, QTRC, PROG, DENS_av, MOMZ_av, MOMX_av, MOMY_av, RHOT_av, QTRC_av, mflx_hi, tflx_hi, num_diff, num_diff_q, DENS_tp, MOMZ_tp, MOMX_tp, MOMY_tp, RHOT_tp, RHOQ_tp, CORIOLI, CDZ, CDX, CDY, FDZ, FDX, FDY, RCDZ, RCDX, RCDY, RFDZ, RFDX, RFDY, PHI, GSQRT, J13G, J23G, J33G, MAPF, AQ_CV, REF_dens, REF_pott, REF_qv, REF_pres, BND_W, BND_E, BND_S, BND_N, ND_COEF, ND_COEF_Q, ND_ORDER, ND_SFC_FACT, ND_USE_RS, DAMP_DENS, DAMP_VELZ, DAMP_VELX, DAMP_VELY, DAMP_POTT, DAMP_QTRC, DAMP_alpha_DENS, DAMP_alpha_VELZ, DAMP_alpha_VELX, DAMP_alpha_VELY, DAMP_alpha_POTT, DAMP_alpha_QTRC, divdmp_coef, FLAG_FCT_MOMENTUM, FLAG_FCT_T, FLAG_FCT_TRACER, FLAG_FCT_ALONG_STREAM, USE_AVERAGE, DTL, DTS)
RK3.
integer, public ja
of y whole cells (local, with HALO)