LCOV - code coverage report
Current view: | top level - utils - units.F90 (source / functions) |  |  | Hit | Total | Coverage
Test: | coverage.info |  | Lines: | 6 | 6 | 100.0 %
Date: | 2024-12-17 17:57:11 |  | Functions: | 2 | 2 | 100.0 %

              Line data    Source code
           1             : module units
           2             :
           3             : use shr_file_mod,   only: shr_file_getUnit, shr_file_freeUnit
           4             :
           5             : implicit none
           6             : private
           7             :
           8             : public :: getunit, freeunit
           9             :
          10             : !-------------------------------------------------------------------------------
          11             : contains
          12             : !-------------------------------------------------------------------------------
          13             :
          14         115 : integer function getunit(iu)
          15             :
          16             :    ! return an available unit number for i/o
          17             :
          18             :    integer, intent(in), optional :: iu   ! desired unit number
          19             :
          20         115 :    getunit = shr_file_getUnit(iu)
          21             :
          22         115 : end function getunit
          23             :
          24             : !-------------------------------------------------------------------------------
          25             :
          26         115 : subroutine freeunit(iu)
          27             :
          28             :    ! release the unit
          29             :
          30             :    integer, intent(in) :: iu       ! unit number to be freed
          31             :
          32         115 :    call shr_file_freeUnit(iu)
          33             :
          34         115 : end subroutine freeunit
          35             :
          36             : end module units

Generated by: LCOV version 1.14