LCOV - code coverage report
Current view: top level - dynamics/se/dycore - dimensions_mod.F90 (source / functions) Hit Total Coverage
Test: coverage.info Lines: 0 6 0.0 %
Date: 2025-01-13 21:54:50 Functions: 0 1 0.0 %

          Line data    Source code
       1             : module dimensions_mod
       2             :   use shr_kind_mod, only: r8=>shr_kind_r8
       3             : #ifdef FVM_TRACERS
       4             :   use constituents, only: ntrac_d=>pcnst ! _EXTERNAL
       5             : #else
       6             :   use constituents, only: qsize_d=>pcnst ! _EXTERNAL
       7             : #endif
       8             : 
       9             :   implicit none
      10             :   private
      11             : 
      12             : ! set MAX number of tracers.  actual number of tracers is a run time argument  
      13             : #ifdef FVM_TRACERS
      14             :   integer, parameter         :: qsize_d =10 ! SE tracers (currently SE supports 10 condensate loading tracers)
      15             : #else
      16             :   integer, parameter         :: ntrac_d = 0 ! No fvm tracers if CSLAM is off
      17             : #endif
      18             :   !
      19             :   ! The variables below hold indices of water vapor and condensate loading tracers as well as
      20             :   ! associated heat capacities (initialized in dyn_init):
      21             :   !
      22             :   !   qsize_condensate_loading_idx     = index of water tracers included in condensate loading according to CAM physics
      23             :   !   qsize_condensate_loading_idx_gll = index of water tracers included in condensate loading terms for SE tracers
      24             :   !
      25             :   ! Note that when running without CSLAM then
      26             :   !
      27             :   !   qsize_condensate_loading_idx_gll = qsize_condensate_loading_idx
      28             :   !
      29             :   ! but when running with CSLAM then SE tracers are only the water tracers included in the condensate loading
      30             :   !
      31             :   character(len=16),  allocatable, public :: cnst_name_gll(:)     ! constituent names for SE tracers
      32             :   character(len=128), allocatable, public :: cnst_longname_gll(:) ! long name of SE tracers
      33             : 
      34             :   integer, parameter, public :: np = NP
      35             :   integer, parameter, public :: nc = 3       !cslam resolution
      36             :   integer           , public :: fv_nphys !physics-grid resolution - the "MAX" is so that the code compiles with NC=0
      37             : 
      38             :   integer         :: ntrac = 0           !ntrac is set in dyn_comp
      39             :   logical, public :: use_cslam = .false. !logical for CSLAM
      40             :   integer         :: qsize = 0           !qsize is set in dyn_comp
      41             :   !
      42             :   ! fvm dimensions:
      43             :   logical, public :: lprint!for debugging
      44             :   integer, parameter, public :: ngpc=3          !number of Gausspoints for the fvm integral approximation   !phl change from 4
      45             :   integer, parameter, public :: irecons_tracer=6!=1 is PCoM, =3 is PLM, =6 is PPM for tracer reconstruction
      46             :   integer,            public :: irecons_tracer_lev(PLEV)
      47             :   integer, parameter, public :: nhe=1           !Max. Courant number
      48             :   integer, parameter, public :: nhr=2           !halo width needed for reconstruction - phl
      49             :   integer, parameter, public :: nht=nhe+nhr     !total halo width where reconstruction is needed (nht<=nc) - phl
      50             :   integer, parameter, public :: ns=3!quadratic halo interpolation - recommended setting for nc=3
      51             :   !nhc determines width of halo exchanged with neighboring elements
      52             :   integer, parameter, public :: nhc = nhr+(nhe-1)+(ns-MOD(ns,2))/2
      53             :                                                 !(different from halo needed for elements on edges and corners
      54             :   integer, parameter, public :: lbc = 1-nhc
      55             :   integer, parameter, public :: ubc = nc+nhc
      56             :   logical, public            :: large_Courant_incr
      57             : 
      58             :   integer, public :: kmin_jet,kmax_jet !min and max level index for the jet
      59             :   integer, public :: fvm_supercycling    
      60             :   integer, public :: fvm_supercycling_jet
      61             : 
      62             :   integer, allocatable, public :: kord_tr(:), kord_tr_cslam(:)
      63             :   
      64             :   real(r8), public :: nu_scale_top(PLEV)! scaling of del2 viscosity in sopnge layer (initialized in dyn_comp)
      65             :   real(r8), public :: nu_lev(PLEV)      ! level dependent del4 (u,v) damping
      66             :   real(r8), public :: nu_t_lev(PLEV)    ! level depedendet del4 T damping
      67             :   integer,  public :: ksponge_end       ! sponge is active k=1,ksponge_end
      68             :   real(r8), public :: nu_div_lev(PLEV) = 1.0_r8 ! scaling of viscosity in sponge layer
      69             :                                                       ! (set in prim_state; if applicable)
      70             :   real(r8), public :: kmvis_ref(PLEV)        !reference profiles for molecular diffusion 
      71             :   real(r8), public :: kmcnd_ref(PLEV)        !reference profiles for molecular diffusion  
      72             :   real(r8), public :: rho_ref(PLEV)          !reference profiles for rho
      73             :   real(r8), public :: km_sponge_factor(PLEV) !scaling for molecular diffusion (when used as sponge)
      74             :   real(r8), public :: kmvisi_ref(PLEV+1)        !reference profiles for molecular diffusion 
      75             :   real(r8), public :: kmcndi_ref(PLEV+1)        !reference profiles for molecular diffusion  
      76             : 
      77             : 
      78             :   integer,  public :: nhc_phys 
      79             :   integer,  public :: nhe_phys 
      80             :   integer,  public :: nhr_phys 
      81             :   integer,  public :: ns_phys  
      82             : 
      83             :   integer, public :: npdg = 0  ! dg degree for hybrid cg/dg element  0=disabled 
      84             : 
      85             :   integer, parameter, public :: npsq = np*np
      86             :   integer, parameter, public :: nlev=PLEV
      87             :   integer, parameter, public :: nlevp=nlev+1
      88             : 
      89             : 
      90             : !  params for a mesh 
      91             : !  integer, public, parameter :: max_elements_attached_to_node = 7
      92             : !  integer, public, parameter :: s_nv = 2*max_elements_attached_to_node 
      93             : 
      94             :   !default for non-refined mesh (note that these are *not* parameters now)
      95             :   integer, public  :: max_elements_attached_to_node = 4
      96             :   integer, public  :: s_nv = 6
      97             :   integer, public  :: max_corner_elem               = 1 !max_elements_attached_to_node-3
      98             :   integer, public  :: max_neigh_edges               = 8 !4 + 4*max_corner_elem
      99             : 
     100             :   public :: qsize,qsize_d,ntrac_d,ntrac
     101             : 
     102             :   integer, public :: ne
     103             :   integer, public :: nelem       ! total number of elements
     104             :   integer, public :: nelemd      ! number of elements per MPI task
     105             :   integer, public :: nelemdmax   ! max number of elements on any MPI task
     106             :   integer, public :: nPhysProc                          ! This is the number of physics processors/ per dynamics processor
     107             :   integer, public :: nnodes,npart,nmpi_per_node
     108             :   integer, public :: GlobalUniqueCols
     109             : 
     110             :   public :: set_mesh_dimensions
     111             : 
     112             : contains
     113             : 
     114           0 :   subroutine set_mesh_dimensions()
     115             : 
     116             :     ! new "params"
     117           0 :     max_elements_attached_to_node = 7  ! variable resolution
     118           0 :     s_nv = 2*max_elements_attached_to_node 
     119             : 
     120             :     !recalculate these
     121           0 :     max_corner_elem               = max_elements_attached_to_node-3
     122           0 :     max_neigh_edges               = 4 + 4*max_corner_elem
     123             : 
     124             : 
     125           0 :   end subroutine set_mesh_dimensions
     126             : 
     127             : 
     128             : end module dimensions_mod
     129             : 

Generated by: LCOV version 1.14