FE-Project
Loading...
Searching...
No Matches
mod_atmos_dyn.F90
Go to the documentation of this file.
1!-------------------------------------------------------------------------------
2!> module Atmosphere / Dynamics
3!!
4!! @par Description
5!! Module for atmosphere dynamical process
6!!
7!! @author Yuta Kawai, Team SCALE
8!!
9!<
10!-------------------------------------------------------------------------------
11#include "scaleFElib.h"
13 !-----------------------------------------------------------------------------
14 !
15 !++ used modules
16 !
17 use scale_precision
18 use scale_prc
19 use scale_io
20 use scale_prof
21 use scale_const, only: &
22 undef8 => const_undef8
23
24 use scale_sparsemat, only: sparsemat
26
27 use scale_mesh_base, only: meshbase
30
34 use scale_element_base, only: &
36
38 use scale_localmeshfield_base, only: &
40
41 use scale_model_mesh_manager, only: modelmeshbase
44
47
49
50 use mod_atmos_mesh, only: atmosmesh
51 use mod_atmos_vars, only: &
52 atmosvars_getlocalmeshprgvar, &
53 atmosvars_getlocalmeshprgvars, &
54 atmosvars_getlocalmeshqtrcvar, &
55 atmosvars_getlocalmeshqtrcphytend
56 use mod_atmos_dyn_vars, only: &
59
60 !-----------------------------------------------------------------------------
61 implicit none
62 private
63 !-----------------------------------------------------------------------------
64 !
65 !++ Public type & procedure
66 !
67
68 !> Derived type to manage a component of atmospheric dynamics
69 !!
70 type, extends(modelcomponentproc), public :: atmosdyn
71 type(atmdyndgmdriver_nonhydro3d) :: dyncore_driver !< A driver object to manage a dry atmospheric dynamical core
72 type(atmdyndgmdriver_trcadv3d) :: trcadv_driver !< A driver object to manage a tracer advection
73
74 type(atmosdynvars) :: dyn_vars !< An object to manage variables in a component of atmospheric dynamics
75
76 ! explicit numerical diffusion
77 logical :: calc_numdiff_flag !< Flag whether explicit numerical diffusion terms are added
79
80 contains
81 procedure, public :: setup => atmosdyn_setup
82 procedure, public :: calc_tendency => atmosdyn_calc_tendency
83 procedure, public :: update => atmosdyn_update
84 procedure, public :: finalize => atmosdyn_finalize
85 end type atmosdyn
86
87 !-----------------------------------------------------------------------------
88 !++ Public parameters & variables
89 !-----------------------------------------------------------------------------
90
91 !-----------------------------------------------------------------------------
92 !
93 !++ Private procedure
94 !
95 private :: setup_coriolis_parameter
96
97 !-----------------------------------------------------------------------------
98 !
99 !++ Private parameters & variables
100 !
101 !-----------------------------------------------------------------------------
102
103contains
104
105!> Setup an object to manage a component of atmospheric dynamics
106!!
107!! @param model_mesh Object to manage computational mesh of atmospheric model
108!! @param tm_parent_comp Object to mange a temporal scheme in a parent component
109!!
110!OCL SERIAL
111 subroutine atmosdyn_setup( this, model_mesh, tm_parent_comp )
112 use mod_atmos_mesh, only: atmosmesh
114
115 implicit none
116
117 class(atmosdyn), intent(inout) :: this
118 class(modelmeshbase), target, intent(in) :: model_mesh
119 class(time_manager_component), intent(inout) :: tm_parent_comp
120
121 character(len=H_MID) :: EQS_TYPE = "NONHYDRO3D_HEVE" !< Type of governing equations
122 character(len=H_SHORT) :: TINTEG_TYPE = 'ERK_SSP_3s3o' !< Type of temporal scheme for a dry dynamical core
123 character(len=H_SHORT) :: TINTEG_TYPE_TRACER = 'ERK_SSP_3s3o' !< Type of temporal scheme for tracer advection equations
124 real(DP) :: TIME_DT = undef8 !< Timestep for a atmospheric dynamical core
125 character(len=H_SHORT) :: TIME_DT_UNIT = 'SEC' !< Unit of timestep
126
127 logical :: MODALFILTER_FLAG = .false. !< Flag to set whether a modal filtering is used
128 logical :: NUMDIFF_FLAG = .false. !< Flag to set whether we calculate explicit numerical diffusion terms, which is available for a regional dynamical core mode
129 logical :: SPONGELAYER_FLAG = .false. !< Flag to set whether a sponge layer is applied
130 logical :: ONLY_TRACERADV_FLAG = .false. !< Flag to set whether we only treat tracer advection equations considering advection test cases
131 logical :: TRACERADV_DISABLE_LIMITER = .false. !< Flag to disable limiters for ensuring non-negative values
132 logical :: TRACERADV_MODALFILTER_FLAG = .false. !< Flag to whether a modal filtering is used for tracer variables
133 logical :: HIDE_MPI_COMM_FLAG = .false.
134
135 namelist / param_atmos_dyn / &
136 eqs_type, &
137 tinteg_type, &
138 tinteg_type_tracer, &
139 time_dt, &
140 time_dt_unit, &
141 modalfilter_flag, &
142 numdiff_flag, &
143 spongelayer_flag, &
144 only_traceradv_flag, &
145 traceradv_disable_limiter, &
146 traceradv_modalfilter_flag, &
147 hide_mpi_comm_flag
148
149 class(atmosmesh), pointer :: atm_mesh
150 class(meshbase), pointer :: ptr_mesh
151 class(localmeshbase), pointer :: ptr_lcmesh
152 class(elementbase3d), pointer :: elem3D
153 integer :: n
154 real(DP) :: dtsec
155
156 class(meshbase3d), pointer :: mesh3D
157
158 integer :: ierr
159 !--------------------------------------------------
160
161 if (.not. this%IsActivated()) return
162 log_info('AtmosDyn_setup',*)
163
164 !--- read namelist
165 rewind(io_fid_conf)
166 read(io_fid_conf,nml=param_atmos_dyn,iostat=ierr)
167 if( ierr < 0 ) then !--- missing
168 log_info("ATMOS_DYN_setup",*) 'Not found namelist. Default used.'
169 elseif( ierr > 0 ) then !--- fatal error
170 log_error("ATMOS_DYN_setup",*) 'Not appropriate names in namelist PARAM_ATMOS_DYN. Check!'
171 call prc_abort
172 endif
173 log_nml(param_atmos_dyn)
174
175 !- get mesh --------------------------------------------------
176
177 call model_mesh%GetModelMesh( ptr_mesh )
178 select type(model_mesh)
179 class is (atmosmesh)
180 atm_mesh => model_mesh
181 end select
182 mesh3d => atm_mesh%ptr_mesh
183
184 !- Setup the temporal integrator
185
186 call tm_parent_comp%Regist_process( 'ATMOS_DYN', time_dt, time_dt_unit, & ! (in)
187 this%tm_process_id ) ! (out)
188
189 dtsec = tm_parent_comp%process_list(this%tm_process_id)%dtsec
190
191 !- initialize the variables
192 call this%dyn_vars%Init( model_mesh )
193
194 call setup_coriolis_parameter( this%dyn_vars, atm_mesh )
195
196 !- Initialize a module for 3D dynamical core
197 call this%dyncore_driver%Init( eqs_type, &
198 tinteg_type, dtsec, &
199 spongelayer_flag, modalfilter_flag, &
200 hide_mpi_comm_flag, &
201 atm_mesh )
202
203 !- Initialize a module for tracer equations
204 call this%trcadv_driver%Init( "TRCADV3D_HEVE", &
205 tinteg_type_tracer, dtsec, &
206 traceradv_modalfilter_flag, traceradv_disable_limiter, &
207 atm_mesh, this%dyncore_driver%boundary_cond, only_traceradv_flag )
208
209 !- Setup the numerical diffusion
210 this%CALC_NUMDIFF_FLAG = numdiff_flag
211 if (this%CALC_NUMDIFF_FLAG) call this%numdiff%Init( atm_mesh, dtsec )
212
213 return
214 end subroutine atmosdyn_setup
215
216
217!> Calculate tendencies associated with atmospheric dynamics
218!!
219!! Because the tendencies with atmospheric dynamical cores are treated in AtmosDyn_update,
220!! no calculation is performed in this subroutine.
221!!
222!! @param model_mesh Object to manage computational mesh of atmospheric model
223!! @param prgvars_list Object to mange prognostic variables with atmospheric dynamical core
224!! @param trcvars_list Object to mange auxiliary variables
225!! @param forcing_list Object to mange forcing terms
226!! @param is_update Flag to specify whether the tendencies are updated in this call
227!!
228!OCL SERIAL
229 subroutine atmosdyn_calc_tendency( this, model_mesh, prgvars_list, trcvars_list, auxvars_list, forcing_list, is_update )
230 implicit none
231
232 class(atmosdyn), intent(inout) :: this
233 class(modelmeshbase), intent(in) :: model_mesh
234 class(modelvarmanager), intent(inout) :: prgvars_list
235 class(modelvarmanager), intent(inout) :: trcvars_list
236 class(modelvarmanager), intent(inout) :: auxvars_list
237 class(modelvarmanager), intent(inout) :: forcing_list
238 logical, intent(in) :: is_update
239 !--------------------------------------------------
240 if (.not. this%IsActivated()) return
241 !LOG_INFO('AtmosDyn_tendency',*)
242
243 return
244 end subroutine atmosdyn_calc_tendency
245
246
247!> Update variables with a component of atmospheric dynamics
248!! The tendencies with atmospheric dynamical cores are evaluated and the prognostic variables is updated.
249!!
250!! @param model_mesh Object to manage computational mesh of atmospheric model
251!! @param prgvars_list Object to mange prognostic variables with atmospheric dynamical core
252!! @param trcvars_list Object to mange auxiliary variables
253!! @param forcing_list Object to mange forcing terms
254!! @param is_update Flag to speicfy whether the tendencies are updated in this call
255!!
256!OCL SERIAL
257 subroutine atmosdyn_update( this, model_mesh, prgvars_list, trcvars_list, auxvars_list, forcing_list, is_update )
258 use scale_tracer, only: &
259 qa
260 use scale_const, only: &
261 grav => const_grav, &
262 rdry => const_rdry, &
263 cpdry => const_cpdry, &
264 cvdry => const_cvdry, &
265 pres00 => const_pre00
266
267 use scale_meshfield_base, only: &
270 prgvar_num, &
273 trcddens_id => trcvars3d_dens_id, trcddens0_id => trcvars3d_dens0_id, &
274 massflx_z_tavg => massflx_z_id, massflx_x_tavg => massflx_x_id, massflx_y_tavg => massflx_y_id
275
276 use mod_atmos_dyn_vars, only: &
278
279 implicit none
280
281 class(atmosdyn), intent(inout) :: this
282 class(modelmeshbase), intent(in) :: model_mesh
283 class(modelvarmanager), intent(inout) :: prgvars_list
284 class(modelvarmanager), intent(inout) :: trcvars_list
285 class(modelvarmanager), intent(inout) :: auxvars_list
286 class(modelvarmanager), intent(inout) :: forcing_list
287 logical, intent(in) :: is_update
288
289 class(meshbase), pointer :: mesh
290 class(meshbase3d), pointer :: mesh3D
291 class(meshfield3d), pointer :: tmpvar
292 !--------------------------------------------------
293
294 call prof_rapstart( 'ATM_DYN_update', 1)
295
296 call model_mesh%GetModelMesh( mesh )
297 select type(mesh)
298 class is (meshbase3d)
299 mesh3d => mesh
300 end select
301
302 if ( .not. this%trcadv_driver%ONLY_TRACERADV_FLAG ) then
303
304 call prof_rapstart( 'ATM_DYN_core', 2)
305
306 call this%dyncore_driver%Update( &
307 prgvars_list, auxvars_list, forcing_list, & ! (inout)
308 this%trcadv_driver%TRCVARS3D(trcddens_id), & ! (inout)
309 this%trcadv_driver%TRCVARS3D(trcddens0_id), & ! (inout)
310 this%trcadv_driver%AUXTRC_FLUX_VARS3D(massflx_x_tavg), & ! (inout)
311 this%trcadv_driver%AUXTRC_FLUX_VARS3D(massflx_y_tavg), & ! (inout)
312 this%trcadv_driver%AUXTRC_FLUX_VARS3D(massflx_z_tavg), & ! (inout)
313 this%trcadv_driver%alphaDensM, this%trcadv_driver%alphaDensP, & ! (inout)
314 this%dyn_vars%AUX_VARS2D(atmos_dyn_auxvars2d_coriolis_id), & ! (in)
315 model_mesh%element3D_operation, & ! (in)
316 model_mesh%DOptrMat(1), model_mesh%DOptrMat(2), model_mesh%DOptrMat(3), & ! (in)
317 model_mesh%SOptrMat(1), model_mesh%SOptrMat(2), model_mesh%SOptrMat(3), & ! (in)
318 model_mesh%LiftOptrMat, mesh3d ) ! (in)
319
320 call prof_rapend( 'ATM_DYN_core', 2)
321
322 call prgvars_list%Get3D( 3, tmpvar )
323 end if
324
325 !-- Tracer advection (prepair) ------------------------------------------------
326
327 if ( qa > 0 ) then
328 call prof_rapstart( 'ATM_DYN_qtracer', 2)
329
330 call this%trcadv_driver%Update( &
331 trcvars_list, prgvars_list, auxvars_list, forcing_list, & ! (inout)
332 model_mesh%element3D_operation, & ! (in)
333 model_mesh%DOptrMat(1), model_mesh%DOptrMat(2), model_mesh%DOptrMat(3), & ! (in)
334 model_mesh%SOptrMat(1), model_mesh%SOptrMat(2), model_mesh%SOptrMat(3), & ! (in)
335 model_mesh%LiftOptrMat, mesh3d, & ! (in)
336 this%dyncore_driver ) ! (in)
337
338 call prof_rapend( 'ATM_DYN_qtracer', 2)
339 end if
340
341 !-- numerical diffusion for dynamical variables -----------------------------
342
343 if ( this%CALC_NUMDIFF_FLAG ) then
344 call prof_rapstart( 'ATM_DYN_numfilter', 2)
345 call this%numdiff%Apply( prgvars_list, &
346 auxvars_list, this%dyncore_driver%boundary_cond, &
347 model_mesh%DOptrMat(1), model_mesh%DOptrMat(2), model_mesh%DOptrMat(3), & ! (in)
348 model_mesh%LiftOptrMat, mesh3d ) ! (in)
349 call prof_rapend( 'ATM_DYN_numfilter', 2)
350 end if
351
352 !---------------------------
353 call prof_rapend( 'ATM_DYN_update', 1)
354
355 return
356 end subroutine atmosdyn_update
357
358!> Finalize an object to manage a component of atmospheric dynamics
359!!
360!OCL SERIAL
361 subroutine atmosdyn_finalize( this )
362 implicit none
363 class(atmosdyn), intent(inout) :: this
364
365 integer :: n
366 !--------------------------------------------------
367 if (.not. this%IsActivated()) return
368 log_info('AtmosDyn_finalize',*)
369
370 call this%dyncore_driver%Final()
371 call this%trcadv_driver%Final()
372
373 if (this%CALC_NUMDIFF_FLAG) call this%numdiff%Final()
374
375 call this%dyn_vars%Final()
376
377 return
378 end subroutine atmosdyn_finalize
379
380 !--- private ---------------
381
382 !> Setup Coriolis parameter
383!OCL SERIAL
384 subroutine setup_coriolis_parameter( this, atm_mesh )
385
388 implicit none
389
390 class(atmosdynvars), target, intent(inout) :: this
391 class(atmosmesh), target, intent(in) :: atm_mesh
392
393 class(localmeshfieldbase), pointer :: coriolis
394 class(localmesh3d), pointer :: lcmesh3D
395 class(localmesh2d), pointer :: lcmesh2D
396 integer :: n
397
398 character(len=H_SHORT) :: CORIOLIS_type !< Type of coriolis force: 'PLANE', 'SPHERE'
399 real(RP) :: CORIOLIS_f0 = 0.0_rp
400 real(RP) :: CORIOLIS_beta = 0.0_rp
401 real(RP) :: CORIOLIS_y0
402
403 namelist /param_atmos_dyn_coriolis/ &
404 coriolis_type, &
405 coriolis_f0, coriolis_beta, coriolis_y0
406
407 class(meshbase3d), pointer :: mesh3D
408 class(meshcubedom3d), pointer :: meshCube
409 integer :: ierr
410 !---------------------------------------------------------------
411
412 mesh3d => atm_mesh%ptr_mesh
413
414 coriolis_type = 'NONE'
415
416 select type(mesh3d)
417 type is (meshcubedom3d)
418 coriolis_y0 = 0.5_rp*(mesh3d%ymax_gl + mesh3d%ymin_gl)
419 end select
420
421 rewind(io_fid_conf)
422 read(io_fid_conf,nml=param_atmos_dyn_coriolis,iostat=ierr)
423 if( ierr < 0 ) then !--- missing
424 log_info("ATMOS_DYN_setup_coriolis",*) 'Not found namelist. Default used.'
425 else if( ierr > 0 ) then !--- fatal error
426 log_error("ATMOS_DYN_setup_coriolis",*) 'Not appropriate names in namelist PARAM_ATMOS_DYN_CORIOLIS. Check!'
427 call prc_abort
428 end if
429 log_nml(param_atmos_dyn_coriolis)
430
431 do n = 1, mesh3d%LOCAL_MESH_NUM
432 call atmosdynauxvars_getlocalmeshfields( n, mesh3d, this%AUXVARS2D_manager, &
433 coriolis, lcmesh3d )
434 lcmesh2d => lcmesh3d%lcmesh2D
435
437 coriolis%val(:,lcmesh2d%NeS:lcmesh2d%NeE), & ! (out)
438 coriolis_type, lcmesh2d%refElem2D%Np * lcmesh2d%Ne, & ! (in)
439 lcmesh2d%pos_en(:,:,2), coriolis_f0, coriolis_beta, coriolis_y0, & ! (in)
440 lcmesh3d%lat2D ) ! (in)
441
442 !$acc update device( coriolis%val )
443 end do
444
445 return
446 end subroutine setup_coriolis_parameter
447
448!--------
449
450! subroutine cal_MOMZ_tend( &
451! MOMZ_t, MOMZ_t_advx, MOMZ_t_advY, MOMZ_t_advZ, MOMZ_t_lift, MOMZ_t_buoy, & ! (out)
452! DDENS_, MOMX_, MOMY_, MOMZ_, DRHOT_, DENS_hyd, PRES_hyd, & ! (in)
453! Dx, Dy, Dz, Sx, Sy, Sz, Lift, lmesh, elem, lmesh2D, elem2D )
454
455! use scale_element_base
456! use scale_sparsemat
457! use scale_const, only: &
458! GRAV => CONST_GRAV, &
459! Rdry => CONST_Rdry, &
460! CPdry => CONST_CPdry, &
461! CVdry => CONST_CVdry, &
462! PRES00 => CONST_PRE00
463! use scale_atm_dyn_nonhydro3d, only: IntrpMat_VPOrdM1
464! implicit none
465
466! class(LocalMesh3D), intent(in) :: lmesh
467! class(elementbase3D), intent(in) :: elem
468! class(LocalMesh2D), intent(in) :: lmesh2D
469! class(elementbase2D), intent(in) :: elem2D
470! type(SparseMat), intent(in) :: Dx, Dy, Dz, Sx, Sy, Sz, Lift
471! real(RP), intent(out) :: MOMZ_t(elem%Np,lmesh%NeA)
472! real(RP), intent(out) :: MOMZ_t_advx(elem%Np,lmesh%NeA)
473! real(RP), intent(out) :: MOMZ_t_advy(elem%Np,lmesh%NeA)
474! real(RP), intent(out) :: MOMZ_t_advz(elem%Np,lmesh%NeA)
475! real(RP), intent(out) :: MOMZ_t_lift(elem%Np,lmesh%NeA)
476! real(RP), intent(out) :: MOMZ_t_buoy(elem%Np,lmesh%NeA)
477
478! real(RP), intent(in) :: DDENS_(elem%Np,lmesh%NeA)
479! real(RP), intent(in) :: MOMX_(elem%Np,lmesh%NeA)
480! real(RP), intent(in) :: MOMY_(elem%Np,lmesh%NeA)
481! real(RP), intent(in) :: MOMZ_(elem%Np,lmesh%NeA)
482! real(RP), intent(in) :: DRHOT_(elem%Np,lmesh%NeA)
483! real(RP), intent(in) :: DENS_hyd(elem%Np,lmesh%NeA)
484! real(RP), intent(in) :: PRES_hyd(elem%Np,lmesh%NeA)
485
486! real(RP) :: Fx(elem%Np), Fy(elem%Np), Fz(elem%Np), LiftDelFlx(elem%Np)
487! real(RP) :: del_flux(elem%NfpTot,lmesh%Ne)
488! real(RP) :: dens_(elem%Np), RHOT_(elem%Np), dpres_(elem%Np)
489! real(RP) :: pres_(elem%Np), u_(elem%Np), v_(elem%Np), w_(elem%Np)
490
491! integer :: ke
492! !------------------------------------------------------------------------
493
494! call cal_del_flux_dyn( del_flux, & ! (out)
495! DDENS_, MOMX_, MOMY_, MOMZ_, DRHOT_, DENS_hyd, PRES_hyd, & ! (in)
496! lmesh%normal_fn(:,:,1), lmesh%normal_fn(:,:,2), lmesh%normal_fn(:,:,3), & ! (in)
497! lmesh%vmapM, lmesh%vmapP, & ! (in)
498! lmesh, elem ) ! (in)
499
500! !-----
501! !$omp parallel do private(RHOT_,pres_,dpres_,dens_,u_,v_,w_,Fx,Fy,Fz,LiftDelFlx)
502! do ke = lmesh%NeS, lmesh%NeE
503! !--
504
505! RHOT_(:) = PRES00/Rdry * (PRES_hyd(:,ke)/PRES00)**(CVdry/CPdry) + DRHOT_(:,ke)
506! pres_(:) = PRES00 * (Rdry*RHOT_(:)/PRES00)**(CPdry/Cvdry)
507! dpres_(:) = pres_(:) - PRES_hyd(:,ke)
508! dens_(:) = DDENS_(:,ke) + DENS_hyd(:,ke)
509
510! u_(:) = MOMX_(:,ke)/dens_(:)
511! v_(:) = MOMY_(:,ke)/dens_(:)
512! w_(:) = MOMZ_(:,ke)/dens_(:)
513
514! !-- MOMZ
515! call sparsemat_matmul(Dx, u_(:)*MOMZ_(:,ke), Fx)
516! call sparsemat_matmul(Dy, v_(:)*MOMZ_(:,ke), Fy)
517! call sparsemat_matmul(Dz, w_(:)*MOMZ_(:,ke), Fz)
518! MOMZ_t_advx(:,ke) = - lmesh%Escale(:,ke,1,1) * Fx(:)
519! MOMZ_t_advy(:,ke) = - lmesh%Escale(:,ke,2,2) * Fy(:)
520! MOMZ_t_advz(:,ke) = - lmesh%Escale(:,ke,3,3) * Fz(:)
521
522! call sparsemat_matmul(Dz, dpres_(:), Fz)
523! MOMZ_t_buoy(:,ke) = - lmesh%Escale(:,ke,3,3) * Fz(:) &
524! - matmul(IntrpMat_VPOrdM1, DDENS_(:,ke)) * Grav
525
526! call sparsemat_matmul(Lift, lmesh%Fscale(:,ke)*del_flux(:,ke), LiftDelFlx)
527! MOMZ_t_lift(:,ke) = - LiftDelFlx(:)
528
529! MOMZ_t(:,ke) = MOMZ_t_advx(:,ke) + MOMZ_t_advy(:,ke) + MOMZ_t_advz(:,ke) &
530! + MOMZ_t_lift(:,ke) + MOMZ_t_buoy(:,ke)
531! end do
532
533! return
534! end subroutine cal_MOMZ_tend
535
536
537! subroutine cal_del_flux_dyn( del_flux, &
538! DDENS_, MOMX_, MOMY_, MOMZ_, DRHOT_, DENS_hyd, PRES_hyd, &
539! nx, ny, nz, vmapM, vmapP, lmesh, elem )
540
541! use scale_const, only: &
542! GRAV => CONST_GRAV, &
543! Rdry => CONST_Rdry, &
544! CPdry => CONST_CPdry, &
545! CVdry => CONST_CVdry, &
546! PRES00 => CONST_PRE00
547
548! implicit none
549
550! class(LocalMesh3D), intent(in) :: lmesh
551! class(elementbase3D), intent(in) :: elem
552! real(RP), intent(out) :: del_flux(elem%NfpTot*lmesh%Ne)
553! real(RP), intent(in) :: DDENS_(elem%Np*lmesh%NeA)
554! real(RP), intent(in) :: MOMX_(elem%Np*lmesh%NeA)
555! real(RP), intent(in) :: MOMY_(elem%Np*lmesh%NeA)
556! real(RP), intent(in) :: MOMZ_(elem%Np*lmesh%NeA)
557! real(RP), intent(in) :: DRHOT_(elem%Np*lmesh%NeA)
558! real(RP), intent(in) :: DENS_hyd(elem%Np*lmesh%NeA)
559! real(RP), intent(in) :: PRES_hyd(elem%Np*lmesh%NeA)
560! real(RP), intent(in) :: nx(elem%NfpTot*lmesh%Ne)
561! real(RP), intent(in) :: ny(elem%NfpTot*lmesh%Ne)
562! real(RP), intent(in) :: nz(elem%NfpTot*lmesh%Ne)
563! integer, intent(in) :: vmapM(elem%NfpTot*lmesh%Ne)
564! integer, intent(in) :: vmapP(elem%NfpTot*lmesh%Ne)
565
566! integer :: i, iP, iM
567! real(RP) :: VelP, VelM, alpha
568! real(RP) :: uM, uP, vM, vP, wM, wP, presM, presP, dpresM, dpresP, densM, densP, rhotM, rhotP, rhot_hyd_M, rhot_hyd_P
569! real(RP) :: gamm, rgamm
570! !------------------------------------------------------------------------
571
572! gamm = CpDry/CvDry
573! rgamm = CvDry/CpDry
574
575! !$omp parallel do private( &
576! !$omp iM, iP, uM, VelP, VelM, alpha, &
577! !$omp uP, vM, vP, wM, wP, presM, presP, dpresM, dpresP, densM, densP, rhotM, rhotP, rhot_hyd_M, rhot_hyd_P)
578! do i=1, elem%NfpTot*lmesh%Ne
579! iM = vmapM(i); iP = vmapP(i)
580
581! rhot_hyd_M = PRES00/Rdry * (PRES_hyd(iM)/PRES00)**rgamm
582! rhot_hyd_P = PRES00/Rdry * (PRES_hyd(iP)/PRES00)**rgamm
583
584! rhotM = rhot_hyd_M + DRHOT_(iM)
585! presM = PRES00 * (Rdry*rhotM/PRES00)**gamm
586! dpresM = presM - PRES_hyd(iM)*abs(nz(i))
587
588! rhotP = rhot_hyd_P + DRHOT_(iP)
589! presP = PRES00 * (Rdry*rhotP/PRES00)**gamm
590! dpresP = presP - PRES_hyd(iP)*abs(nz(i))
591
592! densM = DDENS_(iM) + DENS_hyd(iM)
593! densP = DDENS_(iP) + DENS_hyd(iP)
594
595! VelM = (MOMX_(iM)*nx(i) + MOMY_(iM)*ny(i) + MOMZ_(iM)*nz(i))/densM
596! VelP = (MOMX_(iP)*nx(i) + MOMY_(iP)*ny(i) + MOMZ_(iP)*nz(i))/densP
597
598! alpha = max( sqrt(gamm*presM/densM) + abs(VelM), sqrt(gamm*presP/densP) + abs(VelP) )
599
600
601! del_flux(i) = 0.5_RP*( &
602! ( MOMZ_(iP)*VelP - MOMZ_(iM)*VelM) &
603! + ( dpresP - dpresM )*nz(i) &
604! - alpha*(MOMZ_(iP) - MOMZ_(iM)) )
605! end do
606
607! return
608! end subroutine cal_del_flux_dyn
609
610end module mod_atmos_dyn
module Atmosphere / Dynamics
integer, parameter, public atmos_dyn_auxvars2d_coriolis_id
subroutine, public atmosdynauxvars_getlocalmeshfields(domid, mesh, auxvars_list, coriolis, lcmesh3d)
module Atmosphere / Dynamics
subroutine atmosdyn_setup(this, model_mesh, tm_parent_comp)
Setup an object to manage a component of atmospheric dynamics.
module Atmosphere / Mesh
module Atmosphere / Variables
module FElib / Fluid dyn solver / Atmosphere / driver (3D nonhydrostatic model)
module FElib / Fluid dyn solver / Atmosphere / DGM driver (tracer advection)
module FElib / Fluid dyn solver / Atmosphere / Nonhydrostatic model / Common
Module common / Coriolis parameter.
subroutine, public get_coriolis_parameter(coriolis, colioris_type, np, y, f0, beta, y0, lat)
Get Coriolis parameter.
module FElib / Element / Base
module FElib / Mesh / Local 2D
module FElib / Mesh / Local 3D
module FElib / Mesh / Local, Base
module FElib / Mesh / Base 2D
module FElib / Mesh / Base 3D
module FElib / Mesh / Base
module FElib / Mesh / Cubic 3D domain
module FElib / Data / base
FElib / model framework / physics process.
FElib / model framework / mesh manager.
FElib / model framework / variable manager.
Module common / sparsemat.
Module common / time.
Module common / Runge-Kutta scheme.
Derived type to manage a component of atmospheric dynamics.
Derived type to manage variables with atmospheric dynamics component.
Derived type to manage a computational mesh (base class)
Derived type to provide a driver of dynamical core with the atmospheric nonhydrostatic equations.
Derived type representing a 2D reference element.
Derived type representing a 3D reference element.
Derived type representing an arbitrary finite element.
Derived type representing a local mesh for 2D domain.
Derived type to manage a local 3D computational domain.
Derived type to manage a local computational domain (base type)
Derived type representing a field with local mesh (base type)
Derived type to manage a computational mesh (base type for 2D domain)
Derived type to manage a computational mesh (base type for 3D domain)
Base type to manage a computational mesh.
Derived type to manage a cubic 3D computational domain.
Derived type representing a field with 2D mesh.
Derived type representing a field with 3D mesh.
Derived type representing a field (base type)
Derived type to manage a sparse matrix.
Derived type to provide RK scheme.