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  end interface
178 
179  procedure(large), pointer :: atmos_dyn_tstep_large => null()
180  public :: atmos_dyn_tstep_large
181 
182  !-----------------------------------------------------------------------------
183  !
184  !++ Public parameters & variables
185  !
186  !-----------------------------------------------------------------------------
187  !
188  !++ Private procedure
189  !
190  !-----------------------------------------------------------------------------
191  !
192  !++ Private parameters & variables
193  !
194  !-----------------------------------------------------------------------------
195 contains
196  !-----------------------------------------------------------------------------
198  subroutine atmos_dyn_tstep_large_setup( &
199  Tstep_large_type, &
200  DENS, MOMZ, MOMX, MOMY, RHOT, QTRC, PROG )
203  use scale_index
204  use scale_prc, only: &
205  prc_abort
209  implicit none
210  character(len=*), intent(in) :: tstep_large_type
211  real(rp), intent(inout) :: dens(ka,ia,ja)
212  real(rp), intent(inout) :: momz(ka,ia,ja)
213  real(rp), intent(inout) :: momx(ka,ia,ja)
214  real(rp), intent(inout) :: momy(ka,ia,ja)
215  real(rp), intent(inout) :: rhot(ka,ia,ja)
216  real(rp), intent(inout) :: qtrc(ka,ia,ja,qa)
217  real(rp), intent(inout) :: prog(ka,ia,ja,va)
218 
219  !---------------------------------------------------------------------------
220 
221  select case( tstep_large_type )
222  case( 'FVM-HEVE' )
224  dens, momz, momx, momy, rhot, qtrc, prog )
226  case default
227  log_error("ATMOS_DYN_Tstep_large_setup",*) 'ATMOS_DYN_Tstep_large_type is invalid: ', tstep_large_type
228  call prc_abort
229  end select
230 
231  return
232  end subroutine atmos_dyn_tstep_large_setup
233 
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_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_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:201
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_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:407
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:123