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: | 2025-01-13 21:54:50 |  | 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         111 : 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         111 :    getunit = shr_file_getUnit(iu)
          21             :
          22         111 : end function getunit
          23             :
          24             : !-------------------------------------------------------------------------------
          25             :
          26         111 : subroutine freeunit(iu)
          27             :
          28             :    ! release the unit
          29             :
          30             :    integer, intent(in) :: iu       ! unit number to be freed
          31             :
          32         111 :    call shr_file_freeUnit(iu)
          33             :
          34         111 : end subroutine freeunit
          35             :
          36             : end module units

Generated by: LCOV version 1.14