netcdf_file.f90
Go to the documentation of this file.
! This is part of the netCDF F90 API, or. Copyright 2006 UCAR. See COPYRIGHT file
! for details.
! This file contains the netcdf file functions that are shared by
! netcdf-3 and netcdf-4.
! $Id: netcdf4_constants.f90,v 1.14 2010/05/25 13:53:00 ed Exp $
! -------
function nf90_inq_libvers()
character(len = 80) :: nf90_inq_libvers
nf90_inq_libvers = nf_inq_libvers()
end function nf90_inq_libvers
! -------
function nf90_strerror(ncerr)
integer, intent( in) :: ncerr
character(len = 80) :: nf90_strerror
nf90_strerror = nf_strerror(ncerr)
end function nf90_strerror
! -------
!
! File level control routines:
!
function nf90_inq_base_pe(ncid, pe)
integer, intent( in) :: ncid
integer, intent(out) :: pe
integer :: nf90_inq_base_pe
nf90_inq_base_pe = nf_inq_base_pe(ncid, pe)
end function nf90_inq_base_pe
! -------
function nf90_set_base_pe(ncid, pe)
integer, intent( in) :: ncid, pe
integer :: nf90_set_base_pe
nf90_set_base_pe = nf_set_base_pe(ncid, pe)
end function nf90_set_base_pe
! -------
function nf90_create_mp(path, cmode, initalsz, basepe, chunksizehint, ncid)
character (len = *), intent( in) :: path
integer, intent( in) :: cmode, initalsz, basepe, chunksizehint
integer, intent(out) :: ncid
integer :: nf90_create_mp
nf90_create_mp = nf__create_mp(path, cmode, initalsz, basepe, chunksizehint, ncid)
end function nf90_create_mp
! -------
function nf90_open_mp(path, mode, basepe, chunksizeint, ncid)
character (len = *), intent( in) :: path
integer, intent( in) :: mode, basepe, chunksizeint
integer, intent(out) :: ncid
integer :: nf90_open_mp
nf90_open_mp = nf__open_mp(path, mode, basepe, chunksizeint, ncid)
end function nf90_open_mp
! -------
function nf90_set_fill(ncid, fillmode, old_mode)
integer, intent( in) :: ncid, fillmode
integer, intent(out) :: old_mode
integer :: nf90_set_fill
nf90_set_fill = nf_set_fill(ncid, fillmode, old_mode)
end function nf90_set_fill
! -------
function nf90_redef(ncid)
integer, intent( in) :: ncid
integer :: nf90_redef
nf90_redef = nf_redef(ncid)
end function nf90_redef
! -------
function nf90_enddef(ncid, h_minfree, v_align, v_minfree, r_align)
integer, intent( in) :: ncid
integer, optional, intent( in) :: h_minfree, v_align, v_minfree, r_align
integer :: nf90_enddef
integer :: hMinFree, VAlign, VMinFree, RAlign
if(.not. any( (/ present(h_minfree), present(v_align), &
present(v_minfree), present(r_align) /) ) )then
nf90_enddef = nf_enddef(ncid)
else
! Default values per the man page
hminfree = 0; vminfree = 0
valign = 4; ralign = 4
if(present(h_minfree)) hminfree = h_minfree
if(present(v_align )) valign = v_align
if(present(v_minfree)) vminfree = v_minfree
if(present(r_align )) ralign = r_align
nf90_enddef = nf__enddef(ncid, hminfree, valign, vminfree, ralign)
end if
end function nf90_enddef
! -------
function nf90_sync(ncid)
integer, intent( in) :: ncid
integer :: nf90_sync
nf90_sync = nf_sync(ncid)
end function nf90_sync
! -------
function nf90_abort(ncid)
integer, intent( in) :: ncid
integer :: nf90_abort
nf90_abort = nf_abort(ncid)
end function nf90_abort
! -------
function nf90_close(ncid)
integer, intent( in) :: ncid
integer :: nf90_close
nf90_close = nf_close(ncid)
end function nf90_close
! -------
function nf90_delete(name)
character(len = *), intent( in) :: name
integer :: nf90_delete
nf90_delete = nf_delete(name)
end function nf90_delete
!
! A single file level inquiry routine
!
function nf90_inquire(ncid, nDimensions, nVariables, nAttributes, unlimitedDimId, formatNum)
integer, intent( in) :: ncid
integer, optional, intent(out) :: nDimensions, nVariables, nAttributes, unlimitedDimId, formatNum
integer :: nf90_inquire
integer :: nDims, nVars, nGAtts, unlimDimId, frmt
nf90_inquire = nf_inq(ncid, ndims, nvars, ngatts, unlimdimid)
if(present(ndimensions)) ndimensions = ndims
if(present(nvariables)) nvariables = nvars
if(present(nattributes)) nattributes = ngatts
if(present(unlimiteddimid)) unlimiteddimid = unlimdimid
if(present(formatnum)) then
nf90_inquire = nf_inq_format(ncid, frmt)
formatnum = frmt
endif
end function nf90_inquire
function nf90_inq_path(ncid, pathlen, path)
integer, intent(in) :: ncid
integer, intent(inout) :: pathlen
character(len = *), intent(inout) :: path
integer :: nf90_inq_path
nf90_inq_path = nf_inq_path(ncid, pathlen, path)
end function nf90_inq_path
nf_inq_base_pe
integer function nf_inq_base_pe(ncid, pe)
Definition: nf_control.F90:627
nf90_set_fill
integer function nf90_set_fill(ncid, fillmode, old_mode)
Definition: netcdf_file.f90:59
nf90_delete
integer function nf90_delete(name)
Definition: netcdf_file.f90:117
nf90_create_mp
integer function nf90_create_mp(path, cmode, initalsz, basepe, chunksizehint, ncid)
Definition: netcdf_file.f90:41
nf90_inq_base_pe
integer function nf90_inq_base_pe(ncid, pe)
Definition: netcdf_file.f90:26
nf90_abort
integer function nf90_abort(ncid)
Definition: netcdf_file.f90:103
nf_abort
integer function nf_abort(ncid)
Definition: nf_control.F90:504
nf90_inquire
integer function nf90_inquire(ncid, nDimensions, nVariables, nAttributes, unlimitedDimId, formatNum)
Definition: netcdf_file.f90:127
nf90_inq_path
integer function nf90_inq_path(ncid, pathlen, path)
Definition: netcdf_file.f90:145
nf90_enddef
integer function nf90_enddef(ncid, h_minfree, v_align, v_minfree, r_align)
Definition: netcdf_file.f90:74
nf__enddef
function nf__enddef(ncid, h_minfree, v_align, v_minfree, r_align)
Definition: nf_control.F90:459
nf_inq
integer function nf_inq(ncid, ndims, nvars, ngatts, unlimdimid)
Definition: nf_geninq.f90:34
nf_close
integer function nf_close(ncid)
Definition: nf_control.F90:526
nf_sync
integer function nf_sync(ncid)
Definition: nf_control.F90:482
nf90_set_base_pe
integer function nf90_set_base_pe(ncid, pe)
Definition: netcdf_file.f90:34
nf_inq_path
integer function nf_inq_path(ncid, pathlen, path)
Definition: nf_control.F90:321
nf90_inq_libvers
character(len=80) function nf90_inq_libvers()
Definition: netcdf_file.f90:10
nf_inq_format
integer function nf_inq_format(ncid, format_type)
Definition: nf_geninq.f90:182
nf_set_fill
integer function nf_set_fill(ncid, fillmode, old_mode)
Definition: nf_control.F90:354
nf_strerror
character(len=80) function nf_strerror(ncerr)
Definition: nf_misc.f90:77
nf_inq_libvers
character(len=80) function nf_inq_libvers()
Definition: nf_misc.f90:32
nf_redef
integer function nf_redef(ncid)
Definition: nf_control.F90:409
nf__open_mp
integer function nf__open_mp(path, mode, basepe, chunksizehintp, ncid)
Definition: nf_control.F90:238
nf90_redef
integer function nf90_redef(ncid)
Definition: netcdf_file.f90:67
nf90_strerror
character(len=80) function nf90_strerror(ncerr)
Definition: netcdf_file.f90:16
nf_enddef
integer function nf_enddef(ncid)
Definition: nf_control.F90:431
nf_set_base_pe
integer function nf_set_base_pe(ncid, pe)
Definition: nf_control.F90:604
nf90_sync
integer function nf90_sync(ncid)
Definition: netcdf_file.f90:96
nf__create_mp
function nf__create_mp(path, cmode, initialsz, basepe, chunksizehintp, ncid)
Definition: nf_control.F90:123
nf90_open_mp
integer function nf90_open_mp(path, mode, basepe, chunksizeint, ncid)
Definition: netcdf_file.f90:50
nf90_close
integer function nf90_close(ncid)
Definition: netcdf_file.f90:110
nf_delete
integer function nf_delete(path)
Definition: nf_control.F90:548

Return to the Main Unidata NetCDF page.