LCOV - code coverage report
Current view: top level - chemistry/mozart - mo_negtrc.F90 (source / functions) Hit Total Coverage
Test: coverage.info Lines: 0 2 0.0 %
Date: 2024-12-17 17:57:11 Functions: 0 1 0.0 %

          Line data    Source code
       1             : 
       2             :       module mo_negtrc
       3             : 
       4             :       private
       5             :       public :: negtrc
       6             : 
       7             :       contains
       8             : 
       9           0 :       subroutine negtrc( header, fld, ncol )
      10             : !-----------------------------------------------------------------------
      11             : !       ... Check for negative constituent values and
      12             : !           replace with zero value
      13             : !-----------------------------------------------------------------------
      14             : 
      15             :       use shr_kind_mod, only: r8 => shr_kind_r8
      16             :       use chem_mods,   only : gas_pcnst
      17             :       use ppgrid,      only : pver
      18             : 
      19             :       implicit none
      20             : 
      21             : !-----------------------------------------------------------------------
      22             : !       ... Dummy arguments
      23             : !-----------------------------------------------------------------------
      24             :       integer, intent(in)          :: ncol
      25             :       character(len=*), intent(in) :: header
      26             :       real(r8), intent(inout)          :: fld(ncol,pver,gas_pcnst) ! field to check
      27             : 
      28             : !-----------------------------------------------------------------------
      29             : !       ... Local variables
      30             : !-----------------------------------------------------------------------
      31             :       integer :: m
      32             :       integer :: nneg                       ! flag counter
      33             : 
      34             :       do m  = 1,gas_pcnst
      35             :          nneg = count( fld(:,:,m) < 0._r8 )
      36             :          if( nneg > 0 ) then
      37             :             where( fld(:,:,m) < 0._r8 )
      38             :                fld(:,:,m) = 0._r8
      39             :             endwhere
      40             :          end if
      41             :       end do
      42             : 
      43           0 :       end subroutine negtrc
      44             : 
      45             :       end module mo_negtrc

Generated by: LCOV version 1.14