LCOV - code coverage report
Current view: top level - hemco/HEMCO/src/Shared/NcdfUtil - hco_m_netcdf_io_open.F90 (source / functions) Hit Total Coverage
Test: coverage.info Lines: 0 12 0.0 %
Date: 2025-01-13 21:54:50 Functions: 0 2 0.0 %

          Line data    Source code
       1             : !------------------------------------------------------------------------------
       2             : !       NcdfUtilities: by Harvard Atmospheric Chemistry Modeling Group        !
       3             : !                      and NASA/GSFC, SIVO, Code 610.3                        !
       4             : !------------------------------------------------------------------------------
       5             : !BOP
       6             : !
       7             : ! !MODULE: HCO_m_netcdf_io_open.F90
       8             : !
       9             : ! !INTERFACE:
      10             : !
      11             : module HCO_m_netcdf_io_open
      12             : !
      13             :   implicit none
      14             : !
      15             : ! !PUBLIC MEMBER FUNCTIONS:
      16             : !
      17             :   public  Ncop_Rd
      18             :   public  Ncop_Wr
      19             : !
      20             : ! !DESCRIPTION: Routines to open a netCDF file.
      21             : !\\
      22             : !\\
      23             : ! !AUTHOR:
      24             : !  Jules Kouatchou
      25             : !
      26             : ! !REVISION HISTORY:
      27             : !  See https://github.com/geoschem/hemco for complete history
      28             : !EOP
      29             : !-----------------------------------------------------------------------------
      30             : !BOC
      31             : CONTAINS
      32             : !EOC
      33             : !------------------------------------------------------------------------------
      34             : !       NcdfUtilities: by Harvard Atmospheric Chemistry Modeling Group        !
      35             : !                      and NASA/GSFC, SIVO, Code 610.3                        !
      36             : !------------------------------------------------------------------------------
      37             : !BOP
      38             : !
      39             : ! !IROUTINE: Ncop_Rd
      40             : !
      41             : ! !INTERFACE:
      42             : !
      43           0 :   subroutine Ncop_Rd (ncid, filname, rc)
      44             : !
      45             : ! !USES:
      46             : !
      47             :     USE netCDF
      48             :     use m_do_err_out
      49             : !
      50             : ! !INPUT PARAMETERS:
      51             : !!  filname : name of netCDF file to open for reading
      52             :     character (len=*), intent (in)    :: filname
      53             : !
      54             : ! !OUTPUT PARAMETERS:
      55             : !!  ncid    : opened netCDF file id
      56             :     integer          , intent (out)   :: ncid
      57             :     integer, optional                 :: rc
      58             : !
      59             : ! !DESCRIPTION: Opens a netCDF file for reading and does some error checking.
      60             : !\\
      61             : !\\
      62             : ! !AUTHOR:
      63             : !  John Tannahill (LLNL) and Jules Kouatchou
      64             : !
      65             : ! !REVISION HISTORY:
      66             : !  See https://github.com/geoschem/hemco for complete history
      67             : !EOP
      68             : !------------------------------------------------------------------------------
      69             : !BOC
      70             : !
      71             : ! !LOCAL VARIABLES:
      72             :     character(len=512) :: err_msg
      73             :     integer            :: ierr
      74             : !
      75           0 :     ierr = Nf90_Open( filname, NF90_NOWRITE, ncid )
      76             : 
      77           0 :     if (ierr /= NF90_NOERR) then
      78           0 :        err_msg = 'In Ncop_Rd, cannot open:  ' // Trim (filname)
      79           0 :        call Do_Err_Out (err_msg, .true., 0, 0, 0, 0, 0.0d0, 0.0d0)
      80           0 :        return
      81             :     end if
      82             : 
      83             :     return
      84             : 
      85             :   end subroutine Ncop_Rd
      86             : !EOC
      87             : !------------------------------------------------------------------------------
      88             : !       NcdfUtilities: by Harvard Atmospheric Chemistry Modeling Group        !
      89             : !                      and NASA/GSFC, SIVO, Code 610.3                        !
      90             : !------------------------------------------------------------------------------
      91             : !BOP
      92             : !
      93             : ! !IROUTINE: Ncop_Wr
      94             : !
      95             : ! !INTERFACE:
      96             : !
      97           0 :   subroutine Ncop_Wr (ncid, filname)
      98             : !
      99             : ! !USES:
     100             : !
     101             :     USE netCDF
     102             :     use m_do_err_out
     103             : !
     104             : ! !INPUT PARAMETERS:
     105             : !!  filname : name of netCDF file to open for reading
     106             :     character (len=*), intent (in)    :: filname
     107             : !
     108             : ! !OUTPUT PARAMETERS:
     109             : !!  ncid    : opened netCDF file id
     110             :     integer          , intent (out)   :: ncid
     111             : !
     112             : ! !DESCRIPTION: Opens a netCDF file for reading/writing and does some
     113             : !  error checking.
     114             : !\\
     115             : !\\
     116             : ! !AUTHOR:
     117             : !  John Tannahill (LLNL) and Jules Kouatchou
     118             : !
     119             : ! !REVISION HISTORY:
     120             : !  See https://github.com/geoschem/hemco for complete history
     121             : !EOP
     122             : !------------------------------------------------------------------------------
     123             : !BOC
     124             : !
     125             : ! !LOCAL VARIABLES:
     126             :     character (len=512) :: err_msg
     127             :     integer             :: ierr
     128             : !
     129           0 :     ierr = Nf90_Open (filname, NF90_WRITE, ncid)
     130             : 
     131           0 :     if (ierr /= NF90_NOERR) then
     132           0 :        err_msg = 'In Ncop_Rd, cannot open:  ' // Trim (filname)
     133           0 :        call Do_Err_Out (err_msg, .true., 0, 0, 0, 0, 0.0d0, 0.0d0)
     134             :     end if
     135             : 
     136           0 :     return
     137             : 
     138             :   end subroutine Ncop_Wr
     139             : !EOC
     140             : !------------------------------------------------------------------------
     141             : end module HCO_m_netcdf_io_open
     142             : 

Generated by: LCOV version 1.14