LCOV - code coverage report
Current view: | top level - atmos_phys/schemes/utilities - static_energy.F90 (source / functions) |  |  | Hit | Total | Coverage
Test: | coverage.info |  | Lines: | 8 | 8 | 100.0 %
Date: | 2024-12-17 17:57:11 |  | Functions: | 1 | 1 | 100.0 %

              Line data    Source code
           1             : module static_energy
           2             :
           3             :   use ccpp_kinds, only: kind_phys
           4             :
           5             :   implicit none
           6             :   private
           7             :
           8             :   public :: update_dry_static_energy_run
           9             :
          10             : CONTAINS
          11             :
          12             :    !> \section arg_table_update_dry_static_energy_run  Argument Table
          13             :    !! \htmlinclude update_dry_static_energy_run.html
          14     1495368 :    subroutine update_dry_static_energy_run(nz, gravit, temp, zm, phis,        &
          15     2990736 :         st_energy, cpair, errcode, errmsg)
          16             :
          17             :       ! Dummy arguments
          18             :       integer,            intent(in)  :: nz             ! Num vertical layers
          19             :       real(kind_phys),    intent(in)  :: gravit         ! gravitational acceleration
          20             :       real(kind_phys),    intent(in)  :: temp(:,:)      ! air temperature
          21             :       real(kind_phys),    intent(in)  :: zm(:,:)        ! geopotential height
          22             :       real(kind_phys),    intent(in)  :: phis(:)        ! surface geopotential
          23             :       real(kind_phys),    intent(out) :: st_energy(:,:) ! dry static energy
          24             :       real(kind_phys),    intent(in)  :: cpair(:,:)     ! specific heat, dry air
          25             :       integer,            intent(out) :: errcode
          26             :       character(len=512), intent(out) :: errmsg
          27             :
          28             :       ! Local variable
          29             :       integer :: klev
          30             :
          31     1495368 :       errcode = 0
          32     1495368 :       errmsg = ''
          33             :
          34   140564592 :       do klev = 1, nz
          35   139069224 :          st_energy(:, klev) = (temp(:, klev) * cpair(:,klev)) +               &
          36  2462697216 :               (gravit * zm(:, klev)) + phis(:)
          37             :       end do
          38             :
          39     1495368 :    end subroutine update_dry_static_energy_run
          40             :
          41             : end module static_energy

Generated by: LCOV version 1.14