LCOV - code coverage report
Current view: | top level - infrastructure - physics_column_type.F90 (source / functions) |  |  | Hit | Total | Coverage
Test: | coverage.info |  | Lines: | 19 | 20 | 95.0 %
Date: | 2025-01-13 21:54:50 |  | Functions: | 1 | 3 | 33.3 %

              Line data    Source code
           1             : module physics_column_type
           2             :
           3             :    use shr_kind_mod, only: r8 => shr_kind_r8
           4             :
           5             :    implicit none
           6             :    private
           7             :    save
           8             :
           9             :    type, public :: physics_column_t
          10             :       ! A type to hold all grid and task information for a single physics column
          11             :       ! Column information
          12             :       real(r8)             :: lat_rad = -HUGE(1.0_r8) ! Latitude in radians
          13             :       real(r8)             :: lon_rad = -HUGE(1.0_r8) ! Longitude in radians
          14             :       real(r8)             :: lat_deg = -HUGE(1.0_r8) ! Latitude in degrees
          15             :       real(r8)             :: lon_deg = -HUGE(1.0_r8) ! Longitude in degrees
          16             :       real(r8)             :: area = -1.0_r8          ! Column area
          17             :       real(r8)             :: weight = -1.0_r8        ! Col integration weight
          18             :       ! File decomposition
          19             :       integer              :: global_col_num = -1     ! Location on data file
          20             :       integer              :: coord_indices(2) = -1   ! Global lon/lat (if used)
          21             :       ! Dynamics decomposition
          22             :       integer              :: dyn_task = -1           ! Dynamics MPI task
          23             :       integer              :: local_dyn_block = -1    ! Block num for this task
          24             :       integer              :: global_dyn_block = -1   ! Global dyn block number
          25             :       !    If there is more than one block index, they are in the same order
          26             :       !    as in the dynamics block structure
          27             :       integer, allocatable :: dyn_block_index(:)      ! Index(cies) into block
          28             :       ! Physics decomposition
          29             :       integer              :: phys_task = -1          ! Physics MPI task
          30             :       integer              :: local_phys_chunk = -1   ! Local phys 'block' num
          31             :       integer              :: phys_chunk_index = -1   ! Index into physics chunk
          32             :    contains
          33             :       procedure :: copyColumn
          34             :       generic :: assignment(=) => copyColumn
          35             :    end type physics_column_t
          36             :
          37             : !==============================================================================
          38             : CONTAINS
          39             : !==============================================================================
          40             :
          41      194400 :    subroutine copyColumn(outCol, inCol)
          42             :       ! Dummy arguments
          43             :       class(physics_column_t), intent(inout) :: outCol
          44             :       type(physics_column_t),  intent(in)    :: inCol
          45             :       ! Local variables
          46             :       integer                                :: nind ! # dynamics indices
          47             :
          48      194400 :       outCol%lat_rad            = inCol%lat_rad
          49      194400 :       outCol%lon_rad            = inCol%lon_rad
          50      194400 :       outCol%lat_deg            = inCol%lat_deg
          51      194400 :       outCol%lon_deg            = inCol%lon_deg
          52      194400 :       outCol%area               = inCol%area
          53      194400 :       outCol%weight             = inCol%weight
          54      194400 :       outCol%global_col_num     = inCol%global_col_num
          55      583200 :       outCol%coord_indices(:)   = inCol%coord_indices(2)
          56      194400 :       outCol%dyn_task           = inCol%dyn_task
          57      194400 :       outCol%local_dyn_block    = inCol%local_dyn_block
          58      194400 :       outCol%global_dyn_block   = inCol%global_dyn_block
          59      194400 :       nind                      = SIZE(inCol%dyn_block_index)
          60      583200 :       allocate(outCol%dyn_block_index(nind))
          61      388800 :       outCol%dyn_block_index(:) = inCol%dyn_block_index(:)
          62      194400 :       outCol%phys_task          = inCol%phys_task
          63      194400 :       outCol%local_phys_chunk   = inCol%local_phys_chunk
          64      194400 :       outCol%phys_chunk_index   = inCol%phys_chunk_index
          65      194400 :    end subroutine copyColumn
          66             :
          67           0 : end module physics_column_type

Generated by: LCOV version 1.14