SCALE-RM
scale_atmos_dyn_tstep_large.F90
Go to the documentation of this file.
1 !-------------------------------------------------------------------------------
10 !-------------------------------------------------------------------------------
11 #include "scalelib.h"
13  !-----------------------------------------------------------------------------
14  !
15  !++ used modules
16  !
17  use scale_precision
18  use scale_io
19  use scale_prof
21  use scale_index
22  use scale_tracer
23  !-----------------------------------------------------------------------------
24  implicit none
25  private
26  !-----------------------------------------------------------------------------
27  !
28  !++ Public procedure
29  !
31 
32  abstract interface
33 
34  subroutine large( &
35  DENS, MOMZ, MOMX, MOMY, RHOT, QTRC, PROG, &
36  DENS_av, MOMZ_av, MOMX_av, MOMY_av, RHOT_av, QTRC_av, &
37  num_diff, num_diff_q, &
38  QTRC0, &
39  DENS_tp, MOMZ_tp, MOMX_tp, MOMY_tp, RHOT_tp, RHOQ_tp, &
40  CORIOLI, &
41  CDZ, CDX, CDY, FDZ, FDX, FDY, &
42  RCDZ, RCDX, RCDY, RFDZ, RFDX, RFDY, &
43  PHI, GSQRT, &
44  J13G, J23G, J33G, MAPF, &
45  AQ_R, AQ_CV, AQ_CP, AQ_MASS, &
46  REF_dens, REF_pott, REF_qv, REF_pres, &
47  BND_W, BND_E, BND_S, BND_N, TwoD, &
48  ND_COEF, ND_COEF_Q, ND_LAPLACIAN_NUM, &
49  ND_SFC_FACT, ND_USE_RS, &
50  BND_QA, BND_IQ, BND_SMOOTHER_FACT, &
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  MFLUX_OFFSET_X, MFLUX_OFFSET_Y, &
56  wdamp_coef, divdmp_coef, &
57  FLAG_TRACER_SPLIT_TEND, &
58  FLAG_FCT_MOMENTUM, FLAG_FCT_T, FLAG_FCT_TRACER, &
59  FLAG_FCT_ALONG_STREAM, &
60  USE_AVERAGE, &
61  I_QV, &
62  DTL, DTS, Llast )
63  use scale_precision
65  use scale_index
66  use scale_tracer
67  real(RP), intent(inout) :: DENS(KA,IA,JA)
68  real(RP), intent(inout) :: MOMZ(KA,IA,JA)
69  real(RP), intent(inout) :: MOMX(KA,IA,JA)
70  real(RP), intent(inout) :: MOMY(KA,IA,JA)
71  real(RP), intent(inout) :: RHOT(KA,IA,JA)
72  real(RP), intent(inout) :: QTRC(KA,IA,JA,QA)
73  real(RP), intent(inout) :: PROG(KA,IA,JA,VA)
74 
75  real(RP), intent(inout) :: DENS_av(KA,IA,JA)
76  real(RP), intent(inout) :: MOMZ_av(KA,IA,JA)
77  real(RP), intent(inout) :: MOMX_av(KA,IA,JA)
78  real(RP), intent(inout) :: MOMY_av(KA,IA,JA)
79  real(RP), intent(inout) :: RHOT_av(KA,IA,JA)
80  real(RP), intent(inout) :: QTRC_av(KA,IA,JA,QA)
81 
82  real(RP), intent(out) :: num_diff(KA,IA,JA,5,3)
83  real(RP), intent(out) :: num_diff_q(KA,IA,JA,3)
84 
85  real(RP), intent(in) :: QTRC0(KA,IA,JA,QA)
86 
87  real(RP), intent(in) :: DENS_tp(KA,IA,JA)
88  real(RP), intent(in) :: MOMZ_tp(KA,IA,JA)
89  real(RP), intent(in) :: MOMX_tp(KA,IA,JA)
90  real(RP), intent(in) :: MOMY_tp(KA,IA,JA)
91  real(RP), intent(in) :: RHOT_tp(KA,IA,JA)
92  real(RP), intent(in) :: RHOQ_tp(KA,IA,JA,QA)
93 
94  real(RP), intent(in) :: CORIOLI(IA,JA)
95 
96  real(RP), intent(in) :: CDZ (KA)
97  real(RP), intent(in) :: CDX (IA)
98  real(RP), intent(in) :: CDY (JA)
99  real(RP), intent(in) :: FDZ (KA-1)
100  real(RP), intent(in) :: FDX (IA-1)
101  real(RP), intent(in) :: FDY (JA-1)
102  real(RP), intent(in) :: RCDZ(KA)
103  real(RP), intent(in) :: RCDX(IA)
104  real(RP), intent(in) :: RCDY(JA)
105  real(RP), intent(in) :: RFDZ(KA-1)
106  real(RP), intent(in) :: RFDX(IA-1)
107  real(RP), intent(in) :: RFDY(JA-1)
108 
109  real(RP), intent(in) :: PHI (KA,IA,JA)
110  real(RP), intent(in) :: GSQRT(KA,IA,JA,7)
111  real(RP), intent(in) :: J13G (KA,IA,JA,7)
112  real(RP), intent(in) :: J23G (KA,IA,JA,7)
113  real(RP), intent(in) :: J33G
114  real(RP), intent(in) :: MAPF (IA,JA,2,4)
115 
116  real(RP), intent(in) :: AQ_R (QA)
117  real(RP), intent(in) :: AQ_CV (QA)
118  real(RP), intent(in) :: AQ_CP (QA)
119  real(RP), intent(in) :: AQ_MASS(QA)
120 
121  real(RP), intent(in) :: REF_dens(KA,IA,JA)
122  real(RP), intent(in) :: REF_pott(KA,IA,JA)
123  real(RP), intent(in) :: REF_qv (KA,IA,JA)
124  real(RP), intent(in) :: REF_pres(KA,IA,JA)
125 
126  logical, intent(in) :: BND_W
127  logical, intent(in) :: BND_E
128  logical, intent(in) :: BND_S
129  logical, intent(in) :: BND_N
130  logical, intent(in) :: TwoD
131 
132  real(RP), intent(in) :: ND_COEF
133  real(RP), intent(in) :: ND_COEF_Q
134  integer, intent(in) :: ND_LAPLACIAN_NUM
135  real(RP), intent(in) :: ND_SFC_FACT
136  logical, intent(in) :: ND_USE_RS
137 
138  integer, intent(in) :: BND_QA
139  integer, intent(in) :: BND_IQ(QA)
140  real(RP), intent(in) :: BND_SMOOTHER_FACT
141 
142  real(RP), intent(in) :: DAMP_DENS(KA,IA,JA)
143  real(RP), intent(in) :: DAMP_VELZ(KA,IA,JA)
144  real(RP), intent(in) :: DAMP_VELX(KA,IA,JA)
145  real(RP), intent(in) :: DAMP_VELY(KA,IA,JA)
146  real(RP), intent(in) :: DAMP_POTT(KA,IA,JA)
147  real(RP), intent(in) :: DAMP_QTRC(KA,IA,JA,BND_QA)
148 
149  real(RP), intent(in) :: DAMP_alpha_DENS(KA,IA,JA)
150  real(RP), intent(in) :: DAMP_alpha_VELZ(KA,IA,JA)
151  real(RP), intent(in) :: DAMP_alpha_VELX(KA,IA,JA)
152  real(RP), intent(in) :: DAMP_alpha_VELY(KA,IA,JA)
153  real(RP), intent(in) :: DAMP_alpha_POTT(KA,IA,JA)
154  real(RP), intent(in) :: DAMP_alpha_QTRC(KA,IA,JA,BND_QA)
155  real(RP), intent(in) :: MFLUX_OFFSET_X(KA,JA,2)
156  real(RP), intent(in) :: MFLUX_OFFSET_Y(KA,IA,2)
157 
158  real(RP), intent(in) :: wdamp_coef(KA)
159  real(RP), intent(in) :: divdmp_coef
160 
161  logical, intent(in) :: FLAG_TRACER_SPLIT_TEND
162  logical, intent(in) :: FLAG_FCT_MOMENTUM
163  logical, intent(in) :: FLAG_FCT_T
164  logical, intent(in) :: FLAG_FCT_TRACER
165  logical, intent(in) :: FLAG_FCT_ALONG_STREAM
166 
167  logical, intent(in) :: USE_AVERAGE
168 
169  integer, intent(in) :: I_QV
170 
171  real(DP), intent(in) :: DTL
172  real(DP), intent(in) :: DTS
173 
174  logical , intent(in) :: Llast
175  end subroutine large
176 
177  subroutine finalize
178  end subroutine finalize
179  end interface
180 
181  procedure(large), pointer :: atmos_dyn_tstep_large => null()
182  public :: atmos_dyn_tstep_large
183  procedure(finalize), pointer :: atmos_dyn_tstep_large_finalize => null()
185 
186  !-----------------------------------------------------------------------------
187  !
188  !++ Public parameters & variables
189  !
190  !-----------------------------------------------------------------------------
191  !
192  !++ Private procedure
193  !
194  !-----------------------------------------------------------------------------
195  !
196  !++ Private parameters & variables
197  !
198  !-----------------------------------------------------------------------------
199 contains
200  !-----------------------------------------------------------------------------
202  subroutine atmos_dyn_tstep_large_setup( &
203  Tstep_large_type, &
204  DENS, MOMZ, MOMX, MOMY, RHOT, QTRC, PROG )
207  use scale_index
208  use scale_prc, only: &
209  prc_abort
214  implicit none
215  character(len=*), intent(in) :: tstep_large_type
216  real(rp), intent(inout) :: dens(ka,ia,ja)
217  real(rp), intent(inout) :: momz(ka,ia,ja)
218  real(rp), intent(inout) :: momx(ka,ia,ja)
219  real(rp), intent(inout) :: momy(ka,ia,ja)
220  real(rp), intent(inout) :: rhot(ka,ia,ja)
221  real(rp), intent(inout) :: qtrc(ka,ia,ja,qa)
222  real(rp), intent(inout) :: prog(ka,ia,ja,va)
223 
224  !---------------------------------------------------------------------------
225 
227 
228  select case( tstep_large_type )
229  case( 'FVM-HEVE' )
231  dens, momz, momx, momy, rhot, qtrc, prog )
234  case default
235  log_error("ATMOS_DYN_Tstep_large_setup",*) 'ATMOS_DYN_Tstep_large_type is invalid: ', tstep_large_type
236  call prc_abort
237  end select
238 
239  return
240  end subroutine atmos_dyn_tstep_large_setup
241 
242  subroutine dyn_tstep_large_finalize
243 
244  return
245  end subroutine dyn_tstep_large_finalize
246 
scale_prc::prc_abort
subroutine, public prc_abort
Abort Process.
Definition: scale_prc.F90:350
scale_tracer::qa
integer, public qa
Definition: scale_tracer.F90:35
scale_index
module Index
Definition: scale_index.F90:11
scale_atmos_dyn_tstep_large::atmos_dyn_tstep_large
procedure(large), pointer, public atmos_dyn_tstep_large
Definition: scale_atmos_dyn_tstep_large.F90:181
scale_atmos_dyn_tstep_large::finalize
Definition: scale_atmos_dyn_tstep_large.F90:177
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_tstep_large::dyn_tstep_large_finalize
subroutine dyn_tstep_large_finalize
Definition: scale_atmos_dyn_tstep_large.F90:243
scale_atmos_dyn_tstep_large_fvm_heve::atmos_dyn_tstep_large_fvm_heve_finalize
subroutine, public atmos_dyn_tstep_large_fvm_heve_finalize
finalize
Definition: scale_atmos_dyn_tstep_large_fvm_heve.F90:398
scale_atmos_dyn_tstep_large::atmos_dyn_tstep_large_setup
subroutine, public atmos_dyn_tstep_large_setup(Tstep_large_type, DENS, MOMZ, MOMX, MOMY, RHOT, QTRC, PROG)
Register.
Definition: scale_atmos_dyn_tstep_large.F90:205
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_atmos_grid_cartesc_index::ia
integer, public ia
Definition: scale_atmos_grid_cartesC_index.F90:48
scale_atmos_dyn_tstep_large::atmos_dyn_tstep_large_finalize
procedure(finalize), pointer, public atmos_dyn_tstep_large_finalize
Definition: scale_atmos_dyn_tstep_large.F90:183
scale_atmos_dyn_tstep_large_fvm_heve::atmos_dyn_tstep_large_fvm_heve
subroutine, public atmos_dyn_tstep_large_fvm_heve(DENS, MOMZ, MOMX, MOMY, RHOT, QTRC, PROG, DENS_av, MOMZ_av, MOMX_av, MOMY_av, RHOT_av, QTRC_av, num_diff, num_diff_q, QTRC0, 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, DTLS, DTSS, Llast)
Dynamical Process.
Definition: scale_atmos_dyn_tstep_large_fvm_heve.F90:461
scale_prof
module profiler
Definition: scale_prof.F90:11
scale_atmos_dyn_tstep_large_fvm_heve
module Atmosphere / Dynamics
Definition: scale_atmos_dyn_tstep_large_fvm_heve.F90:12
scale_atmos_grid_cartesc_index::ja
integer, public ja
Definition: scale_atmos_grid_cartesC_index.F90:49
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_atmos_dyn_tstep_large_fvm_heve::atmos_dyn_tstep_large_fvm_heve_setup
subroutine, public atmos_dyn_tstep_large_fvm_heve_setup(DENS, MOMZ, MOMX, MOMY, RHOT, QTRC, PROG)
Setup.
Definition: scale_atmos_dyn_tstep_large_fvm_heve.F90:124