Skip to content

Commit

Permalink
adding nf_free_iosystem
Browse files Browse the repository at this point in the history
  • Loading branch information
edhartnett committed Jul 13, 2019
1 parent 227a81c commit 804aac2
Showing 1 changed file with 28 additions and 6 deletions.
34 changes: 28 additions & 6 deletions src/flib/ncint_mod.F90
Original file line number Diff line number Diff line change
@@ -1,8 +1,11 @@
#include "config.h"
!>
!! @file
!! Initialization Routines for PIO.
!! These are the extra functions added to support netCDF
!! integration. In most cases these functions are wrappers for
!! existing PIO_ functions, but with names that start with nf_.
!!
!! @author Ed Hartnett
!<

!>
Expand All @@ -20,12 +23,9 @@ module ncint_mod
!--------------
use pio_support, only : piodie, debug, debugio, debugasync, checkmpireturn
use pio_nf, only : pio_set_log_level
use piolib_mod, only : pio_init
use piolib_mod, only : pio_init, pio_finalize
!

#ifdef TIMING
use perf_mod, only : t_startf, t_stopf ! _EXTERNAL
#endif
#ifndef NO_MPIMOD
use mpi ! _EXTERNAL
#endif
Expand All @@ -36,12 +36,19 @@ module ncint_mod
#endif
! !public member functions:

public :: nf_init_intracom
public :: nf_init_intracom, nf_free_iosystem

interface nf_init_intracom
module procedure nf_init_intracom
end interface nf_init_intracom

!>
!! Shuts down an IOSystem and associated resources.
!<
interface nf_free_iosystem
module procedure nf_free_iosystem
end interface nf_free_iosystem

contains

!>
Expand Down Expand Up @@ -95,4 +102,19 @@ end function nc_set_iosystem

end subroutine nf_init_intracom

!>
!! @public
!! @ingroup PIO_finalize
!! Finalizes an IO System. This is a collective call.
!!
!! @param iosystem @copydoc io_desc_t
!! @retval ierr @copydoc error_return
!! @author Jim Edwards
!<
subroutine nf_free_iosystem(iosystem, ierr)
type (iosystem_desc_t), intent(inout) :: iosystem
integer(i4), intent(out) :: ierr
call PIO_finalize(iosystem, ierr)
end subroutine nf_free_iosystem

end module ncint_mod

0 comments on commit 804aac2

Please sign in to comment.