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

Generated by: LCOV version 1.14