SCALE-RM
scale_atmos_dyn_tinteg_large_euler.F90
Go to the documentation of this file.
1 !-------------------------------------------------------------------------------
11 !-------------------------------------------------------------------------------
12 #include "scalelib.h"
14  !-----------------------------------------------------------------------------
15  !
16  !++ used modules
17  !
18  use scale_precision
19  use scale_io
20  use scale_prof
22  use scale_index
23  use scale_tracer
24 
25 #ifdef DEBUG
26  use scale_debug, only: &
27  check
28  use scale_const, only: &
29  undef => const_undef, &
30  iundef => const_undef2
31 #endif
32  !-----------------------------------------------------------------------------
33  implicit none
34  private
35  !-----------------------------------------------------------------------------
36  !
37  !++ Public procedure
38  !
41 
42  !-----------------------------------------------------------------------------
43  !
44  !++ Public parameters & variables
45  !
46  !-----------------------------------------------------------------------------
47  !
48  !++ Private procedure
49  !
50  !-----------------------------------------------------------------------------
51  !
52  !++ Private parameters & variables
53  !
54  !-----------------------------------------------------------------------------
55 contains
56 
57  !-----------------------------------------------------------------------------
60  tinteg_type )
61  use scale_prc, only: &
62  prc_abort
63  use scale_const, only: &
64  undef => const_undef
65  implicit none
66 
67  character(len=*) :: tinteg_type
68 
69  integer :: iv
70  !---------------------------------------------------------------------------
71 
72  if ( tinteg_type /= 'EULER' ) then
73  log_error("ATMOS_DYN_Tinteg_large_euler_setup",*) 'TINTEG_LARGE_TYPE is not EULER. Check!'
74  call prc_abort
75  end if
76 
77  return
79 
80  !-----------------------------------------------------------------------------
82  subroutine atmos_dyn_tinteg_large_euler( &
83  DENS, MOMZ, MOMX, MOMY, RHOT, QTRC, PROG, &
84  DENS_av, MOMZ_av, MOMX_av, MOMY_av, RHOT_av, QTRC_av, &
85  num_diff, num_diff_q, &
86  DENS_tp, MOMZ_tp, MOMX_tp, MOMY_tp, RHOT_tp, RHOQ_tp, &
87  CORIOLI, &
88  CDZ, CDX, CDY, FDZ, FDX, FDY, &
89  RCDZ, RCDX, RCDY, RFDZ, RFDX, RFDY, &
90  PHI, GSQRT, &
91  J13G, J23G, J33G, MAPF, &
92  AQ_R, AQ_CV, AQ_CP, AQ_MASS, &
93  REF_dens, REF_pott, REF_qv, REF_pres, &
94  BND_W, BND_E, BND_S, BND_N, TwoD, &
95  ND_COEF, ND_COEF_Q, ND_LAPLACIAN_NUM, &
96  ND_SFC_FACT, ND_USE_RS, &
97  BND_QA, BND_IQ, BND_SMOOTHER_FACT, &
98  DAMP_DENS, DAMP_VELZ, DAMP_VELX, &
99  DAMP_VELY, DAMP_POTT, DAMP_QTRC, &
100  DAMP_alpha_DENS, DAMP_alpha_VELZ, DAMP_alpha_VELX, &
101  DAMP_alpha_VELY, DAMP_alpha_POTT, DAMP_alpha_QTRC, &
102  MFLUX_OFFSET_X, MFLUX_OFFSET_Y, &
103  wdamp_coef, divdmp_coef, &
104  FLAG_TRACER_SPLIT_TEND, &
105  FLAG_FCT_MOMENTUM, FLAG_FCT_T, FLAG_FCT_TRACER, &
106  FLAG_FCT_ALONG_STREAM, &
107  USE_AVERAGE, &
108  I_QV, &
109  DTL, DTS )
110 
111  use scale_atmos_dyn_tstep_large, only: &
113 
114  implicit none
115 
116  real(rp), intent(inout) :: dens(ka,ia,ja)
117  real(rp), intent(inout) :: momz(ka,ia,ja)
118  real(rp), intent(inout) :: momx(ka,ia,ja)
119  real(rp), intent(inout) :: momy(ka,ia,ja)
120  real(rp), intent(inout) :: rhot(ka,ia,ja)
121  real(rp), intent(inout) :: qtrc(ka,ia,ja,qa)
122  real(rp), intent(inout) :: prog(ka,ia,ja,va)
123 
124  real(rp), intent(inout) :: dens_av(ka,ia,ja)
125  real(rp), intent(inout) :: momz_av(ka,ia,ja)
126  real(rp), intent(inout) :: momx_av(ka,ia,ja)
127  real(rp), intent(inout) :: momy_av(ka,ia,ja)
128  real(rp), intent(inout) :: rhot_av(ka,ia,ja)
129  real(rp), intent(inout) :: qtrc_av(ka,ia,ja,qa)
130 
131  real(rp), intent(out) :: num_diff (ka,ia,ja,5,3)
132  real(rp), intent(out) :: num_diff_q(ka,ia,ja,3)
133 
134  real(rp), intent(in) :: dens_tp(ka,ia,ja)
135  real(rp), intent(in) :: momz_tp(ka,ia,ja)
136  real(rp), intent(in) :: momx_tp(ka,ia,ja)
137  real(rp), intent(in) :: momy_tp(ka,ia,ja)
138  real(rp), intent(in) :: rhot_tp(ka,ia,ja)
139  real(rp), intent(in) :: rhoq_tp(ka,ia,ja,qa)
140 
141  real(rp), intent(in) :: corioli(ia,ja)
142 
143  real(rp), intent(in) :: cdz (ka)
144  real(rp), intent(in) :: cdx (ia)
145  real(rp), intent(in) :: cdy (ja)
146  real(rp), intent(in) :: fdz (ka-1)
147  real(rp), intent(in) :: fdx (ia-1)
148  real(rp), intent(in) :: fdy (ja-1)
149  real(rp), intent(in) :: rcdz(ka)
150  real(rp), intent(in) :: rcdx(ia)
151  real(rp), intent(in) :: rcdy(ja)
152  real(rp), intent(in) :: rfdz(ka-1)
153  real(rp), intent(in) :: rfdx(ia-1)
154  real(rp), intent(in) :: rfdy(ja-1)
155 
156  real(rp), intent(in) :: phi (ka,ia,ja)
157  real(rp), intent(in) :: gsqrt(ka,ia,ja,7)
158  real(rp), intent(in) :: j13g (ka,ia,ja,7)
159  real(rp), intent(in) :: j23g (ka,ia,ja,7)
160  real(rp), intent(in) :: j33g
161  real(rp), intent(in) :: mapf (ia,ja,2,4)
162 
163  real(rp), intent(in) :: aq_r (qa)
164  real(rp), intent(in) :: aq_cv (qa)
165  real(rp), intent(in) :: aq_cp (qa)
166  real(rp), intent(in) :: aq_mass(qa)
167 
168  real(rp), intent(in) :: ref_dens(ka,ia,ja)
169  real(rp), intent(in) :: ref_pott(ka,ia,ja)
170  real(rp), intent(in) :: ref_qv (ka,ia,ja)
171  real(rp), intent(in) :: ref_pres(ka,ia,ja)
172 
173  logical, intent(in) :: bnd_w
174  logical, intent(in) :: bnd_e
175  logical, intent(in) :: bnd_s
176  logical, intent(in) :: bnd_n
177  logical, intent(in) :: twod
178 
179  real(rp), intent(in) :: nd_coef
180  real(rp), intent(in) :: nd_coef_q
181  integer, intent(in) :: nd_laplacian_num
182  real(rp), intent(in) :: nd_sfc_fact
183  logical, intent(in) :: nd_use_rs
184 
185  integer, intent(in) :: bnd_qa
186  integer, intent(in) :: bnd_iq(qa)
187  real(rp), intent(in) :: bnd_smoother_fact
188 
189  real(rp), intent(in) :: damp_dens(ka,ia,ja)
190  real(rp), intent(in) :: damp_velz(ka,ia,ja)
191  real(rp), intent(in) :: damp_velx(ka,ia,ja)
192  real(rp), intent(in) :: damp_vely(ka,ia,ja)
193  real(rp), intent(in) :: damp_pott(ka,ia,ja)
194  real(rp), intent(in) :: damp_qtrc(ka,ia,ja,bnd_qa)
195 
196  real(rp), intent(in) :: damp_alpha_dens(ka,ia,ja)
197  real(rp), intent(in) :: damp_alpha_velz(ka,ia,ja)
198  real(rp), intent(in) :: damp_alpha_velx(ka,ia,ja)
199  real(rp), intent(in) :: damp_alpha_vely(ka,ia,ja)
200  real(rp), intent(in) :: damp_alpha_pott(ka,ia,ja)
201  real(rp), intent(in) :: damp_alpha_qtrc(ka,ia,ja,bnd_qa)
202  real(rp), intent(in) :: mflux_offset_x(ka,ja,2)
203  real(rp), intent(in) :: mflux_offset_y(ka,ia,2)
204 
205  real(rp), intent(in) :: wdamp_coef(ka)
206  real(rp), intent(in) :: divdmp_coef
207 
208  logical, intent(in) :: flag_tracer_split_tend
209  logical, intent(in) :: flag_fct_momentum
210  logical, intent(in) :: flag_fct_t
211  logical, intent(in) :: flag_fct_tracer
212  logical, intent(in) :: flag_fct_along_stream
213 
214  logical, intent(in) :: use_average
215 
216  integer, intent(in) :: i_qv
217 
218  real(dp), intent(in) :: dtl
219  real(dp), intent(in) :: dts
220 
221  call atmos_dyn_tstep_large( &
222  dens, momz, momx, momy, rhot, qtrc, prog, & ! (inout)
223  dens_av, momz_av, momx_av, momy_av, rhot_av, qtrc_av, & ! (inout)
224  num_diff, num_diff_q, & ! (out, work)
225  qtrc, & ! (in)
226  dens_tp, momz_tp, momx_tp, momy_tp, rhot_tp, rhoq_tp, & ! (in)
227  corioli, & ! (in)
228  cdz, cdx, cdy, fdz, fdx, fdy, & ! (in)
229  rcdz, rcdx, rcdy, rfdz, rfdx, rfdy, & ! (in)
230  phi, gsqrt, & ! (in)
231  j13g, j23g, j33g, mapf, & ! (in)
232  aq_r, aq_cv, aq_cp, aq_mass, & ! (in)
233  ref_dens, ref_pott, ref_qv, ref_pres, & ! (in)
234  bnd_w, bnd_e, bnd_s, bnd_n, twod, & ! (in)
235  nd_coef, nd_coef_q, nd_laplacian_num, & ! (in)
236  nd_sfc_fact, nd_use_rs, & ! (in)
237  bnd_qa, bnd_iq, bnd_smoother_fact, & ! (in)
238  damp_dens, damp_velz, damp_velx, & ! (in)
239  damp_vely, damp_pott, damp_qtrc, & ! (in)
240  damp_alpha_dens, damp_alpha_velz, damp_alpha_velx, & ! (in)
241  damp_alpha_vely, damp_alpha_pott, damp_alpha_qtrc, & ! (in)
242  mflux_offset_x, mflux_offset_y, & ! (in)
243  wdamp_coef, divdmp_coef, & ! (in)
244  flag_tracer_split_tend, & ! (in)
245  flag_fct_momentum, flag_fct_t, flag_fct_tracer, & ! (in)
246  flag_fct_along_stream, & ! (in)
247  use_average, & ! (in)
248  i_qv, & ! (in)
249  dtl, dts, .true. ) ! (in)
250 
251  return
252  end subroutine atmos_dyn_tinteg_large_euler
253 
scale_prc::prc_abort
subroutine, public prc_abort
Abort Process.
Definition: scale_prc.F90:342
scale_tracer::qa
integer, public qa
Definition: scale_tracer.F90:34
scale_index
module Index
Definition: scale_index.F90:11
scale_const::const_undef2
integer, parameter, public const_undef2
undefined value (INT2)
Definition: scale_const.F90:38
scale_atmos_dyn_tstep_large::atmos_dyn_tstep_large
procedure(large), pointer, public atmos_dyn_tstep_large
Definition: scale_atmos_dyn_tstep_large.F90:179
scale_precision
module PRECISION
Definition: scale_precision.F90:14
scale_atmos_grid_cartesc_index::ka
integer, public ka
Definition: scale_atmos_grid_cartesC_index.F90:47
scale_atmos_dyn_tinteg_large_euler::atmos_dyn_tinteg_large_euler
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, 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_R, AQ_CV, AQ_CP, AQ_MASS, REF_dens, REF_pott, REF_qv, REF_pres, BND_W, BND_E, BND_S, BND_N, TwoD, ND_COEF, ND_COEF_Q, ND_LAPLACIAN_NUM, ND_SFC_FACT, ND_USE_RS, BND_QA, BND_IQ, BND_SMOOTHER_FACT, 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, MFLUX_OFFSET_X, MFLUX_OFFSET_Y, wdamp_coef, divdmp_coef, FLAG_TRACER_SPLIT_TEND, FLAG_FCT_MOMENTUM, FLAG_FCT_T, FLAG_FCT_TRACER, FLAG_FCT_ALONG_STREAM, USE_AVERAGE, I_QV, DTL, DTS)
RK3.
Definition: scale_atmos_dyn_tinteg_large_euler.F90:110
scale_index::va
integer, public va
Definition: scale_index.F90:35
scale_prc
module PROCESS
Definition: scale_prc.F90:11
scale_precision::rp
integer, parameter, public rp
Definition: scale_precision.F90:41
scale_io
module STDIO
Definition: scale_io.F90:10
scale_atmos_grid_cartesc_index
module atmosphere / grid / cartesC index
Definition: scale_atmos_grid_cartesC_index.F90:12
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_debug::check
subroutine, public check(current_line, v)
Undefined value checker.
Definition: scale_debug.F90:56
scale_atmos_dyn_tinteg_large_euler::atmos_dyn_tinteg_large_euler_setup
subroutine, public atmos_dyn_tinteg_large_euler_setup(tinteg_type)
Setup.
Definition: scale_atmos_dyn_tinteg_large_euler.F90:61
scale_prof
module profiler
Definition: scale_prof.F90:11
scale_precision::dp
integer, parameter, public dp
Definition: scale_precision.F90:32
scale_atmos_grid_cartesc_index::ja
integer, public ja
Definition: scale_atmos_grid_cartesC_index.F90:49
scale_atmos_dyn_tinteg_large_euler
module Atmosphere / Dyn Tinteg
Definition: scale_atmos_dyn_tinteg_large_euler.F90:13
scale_tracer
module TRACER
Definition: scale_tracer.F90:12
scale_atmos_dyn_tstep_large
module Atmosphere / Dynamical scheme
Definition: scale_atmos_dyn_tstep_large.F90:12
scale_debug
module DEBUG
Definition: scale_debug.F90:11
scale_const::const_undef
real(rp), public const_undef
Definition: scale_const.F90:41