nf_mod Module

@file @brief NetCDF interface routines

$Revision$ $LastChangedDate$

@defgroup PIO_def_dim

@defgroup PIO_enddef

\defgroup PIO_redef

\defgroup PIO_inquire

\defgroup PIO_inq_dimid

\defgroup PIO_inq_dimname

\defgroup PIO_inq_dimlen

\defgroup PIO_inquire_dimension

\defgroup PIO_copy_att



Interfaces

public interface pio_def_var

\defgroup PIO_def_var

  • private function def_var_0d(File, name, type, vardesc) result(ierr)

    @public @ingroup PIO_def_var @brief Defines a netcdf variable @details @param File @copydoc file_desc_t @param name : The name of the variable to define @param type : The type of variable @param vardesc @copydoc var_desc_t @retval ierr @copydoc error_return

    Arguments

    Type IntentOptional Attributes Name
    type(File_desc_t), intent(in) :: File
    character(len=*), intent(in) :: name
    integer, intent(in) :: type
    type(Var_desc_t), intent(inout) :: vardesc

    Return Value integer

  • private function def_var_md(File, name, type, dimids, vardesc) result(ierr)

    @public @ingroup PIO_def_var @brief Defines the a netcdf variable @details @param File @copydoc file_desc_t @param name : The name of the variable to define @param type : The type of variable @param dimids : The dimension identifier returned by \ref PIO_def_dim @param vardesc @copydoc var_desc_t @retval ierr @copydoc error_return

    Arguments

    Type IntentOptional Attributes Name
    type(File_desc_t), intent(in) :: File
    character(len=*), intent(in) :: name
    integer, intent(in) :: type
    integer, intent(in) :: dimids(:)
    type(Var_desc_t), intent(inout) :: vardesc

    Return Value integer

public interface pio_inq_varid

\defgroup PIO_inq_varid

  • private function inq_varid_vid(File, name, varid) result(ierr)

    @public @ingroup PIO_inq_varid @brief Returns the ID of a netcdf variable given its name @details @param File @copydoc file_desc_t @param name : Name of the returned attribute @param varid : variable ID @retval ierr @copydoc error_return

    Arguments

    Type IntentOptional Attributes Name
    type(File_desc_t), intent(in) :: File
    character(len=*), intent(in) :: name
    integer(kind=i4), intent(out) :: varid

    Return Value integer

  • private function inq_varid_vardesc(File, name, vardesc) result(ierr)

    @public @ingroup PIO_inq_varid @brief Returns the ID of a netcdf variable given its name @details @param File @copydoc file_desc_t @param name : Name of the returned attribute @param vardesc @copydoc var_desc_t @retval ierr @copydoc error_return

    Arguments

    Type IntentOptional Attributes Name
    type(File_desc_t), intent(in) :: File
    character(len=*), intent(in) :: name
    type(Var_desc_t), intent(inout) :: vardesc

    Return Value integer

public interface pio_inq_att

\defgroup PIO_inq_att

  • private function inq_att_vid(File, varid, name, xtype, len) result(ierr)

    @public @ingroup PIO_inq_att @brief Gets information about attributes @details @param File @copydoc file_desc_t @param varid : The netcdf variable identifier @param name : Name of the attribute @param xtype : The type of attribute @param len : The length of the attribute @retval ierr @copydoc error_return

    Arguments

    Type IntentOptional Attributes Name
    type(File_desc_t), intent(inout) :: File
    integer(kind=i4), intent(in) :: varid
    character(len=*), intent(in) :: name
    integer, intent(out) :: xtype
    integer, intent(out) :: len

    Return Value integer

  • private function inq_att_vardesc(File, vardesc, name, xtype, len) result(ierr)

    @public @ingroup PIO_inq_att @brief Gets information about attributes @details @param File @copydoc file_desc_t @param vardesc @copydoc var_desc_t @param name : Name of the attribute @param xtype : The type of attribute @param len : The length of the attribute @retval ierr @copydoc error_return

    Arguments

    Type IntentOptional Attributes Name
    type(File_desc_t), intent(inout) :: File
    type(Var_desc_t), intent(in) :: vardesc
    character(len=*), intent(in) :: name
    integer, intent(out) :: xtype
    integer, intent(out) :: len

    Return Value integer

  • private function inq_att_vardesc_pio2(File, vardesc, name, xtype, len) result(ierr)

    Arguments

    Type IntentOptional Attributes Name
    type(File_desc_t), intent(inout) :: File
    type(Var_desc_t), intent(in) :: vardesc
    character(len=*), intent(in) :: name
    integer, intent(out) :: xtype
    integer(kind=pio_offset), intent(out) :: len

    Return Value integer

  • private function inq_att_vid_pio2(File, varid, name, xtype, len) result(ierr)

    Arguments

    Type IntentOptional Attributes Name
    type(File_desc_t), intent(inout) :: File
    integer, intent(in) :: varid
    character(len=*), intent(in) :: name
    integer, intent(out) :: xtype
    integer(kind=pio_offset), intent(out) :: len

    Return Value integer

public interface pio_inq_attlen

\defgroup PIO_inq_attlen

  • private function inq_attlen_vid(File, varid, name, len) result(ierr)

    @public @ingroup PIO_inq_attlen @brief Gets the attribute length @details @param File @copydoc file_desc_t @param varid : attribute id @param name : name of attribute @param len : Length of attribute @retval ierr @copydoc error_return

    Arguments

    Type IntentOptional Attributes Name
    type(File_desc_t), intent(inout) :: File
    integer(kind=i4), intent(in) :: varid
    character(len=*), intent(in) :: name
    integer, intent(out) :: len

    Return Value integer

  • private function inq_attlen_vardesc(File, vardesc, name, len) result(ierr)

    @public @ingroup PIO_inq_attlen @brief Gets the attribute length @details @param File @copydoc file_desc_t @param vardesc @copydoc var_desc_t @param name : name of attribute @param len : Length of attribute @retval ierr @copydoc error_return

    Arguments

    Type IntentOptional Attributes Name
    type(File_desc_t), intent(inout) :: File
    type(Var_desc_t), intent(in) :: vardesc
    character(len=*), intent(in) :: name
    integer, intent(out) :: len

    Return Value integer

  • private function inq_attlen_vardesc_pio2(File, vardesc, name, len) result(ierr)

    Arguments

    Type IntentOptional Attributes Name
    type(File_desc_t), intent(inout) :: File
    type(Var_desc_t), intent(in) :: vardesc
    character(len=*), intent(in) :: name
    integer(kind=pio_offset), intent(out) :: len

    Return Value integer

  • private function inq_attlen_vid_pio2(File, vid, name, len) result(ierr)

    Arguments

    Type IntentOptional Attributes Name
    type(File_desc_t), intent(inout) :: File
    integer, intent(in) :: vid
    character(len=*), intent(in) :: name
    integer(kind=pio_offset), intent(out) :: len

    Return Value integer

public interface pio_inq_attname

\defgroup PIO_inq_attname

  • private function inq_attname_vid(File, varid, attnum, name) result(ierr)

    @public @ingroup PIO_inq_attname @brief Returns the name of a netcdf attribute @details @param File @copydoc file_desc_t @param varid : The variable ID @param attnum : Attribute number returned from function ???? @param name : Name of the returned attribute @retval ierr @copydoc error_return

    Arguments

    Type IntentOptional Attributes Name
    type(File_desc_t), intent(inout) :: File
    integer(kind=i4), intent(in) :: varid
    integer, intent(in) :: attnum
    character(len=*), intent(out) :: name

    Return Value integer

  • private function inq_attname_vardesc(File, vardesc, attnum, name) result(ierr)

    @public @ingroup PIO_inq_attname @brief Returns the name of a netcdf attribute. @details @param File @copydoc file_desc_t @param vardesc @copydoc var_desc_t @param attnum : Attribute number returned from function ???? @param name : Name of the returned attribute @retval ierr @copydoc error_return

    Arguments

    Type IntentOptional Attributes Name
    type(File_desc_t), intent(inout) :: File
    type(Var_desc_t), intent(in) :: vardesc
    integer, intent(in) :: attnum
    character(len=*), intent(out) :: name

    Return Value integer

public interface pio_inq_varname

\defgroup PIO_inq_varname

  • private function inq_varname_vid(File, varid, name) result(ierr)

    @public @ingroup PIO_inq_varname @brief Get the name associated with a variable @details @param File @copydoc file_desc_t @param varid : The netcdf variable id. @param name : The name of the netcdf variable. @retval ierr @copydoc error_return

    Arguments

    Type IntentOptional Attributes Name
    type(File_desc_t), intent(in) :: File
    integer, intent(in) :: varid
    character(len=*), intent(out) :: name

    Return Value integer

  • private function inq_varname_vdesc(File, vardesc, name) result(ierr)

    @public @ingroup PIO_inq_varname @brief Get the name associated with a variable @details @param File @copydoc file_desc_t @param vardesc @copydoc var_desc_t @param name : The name of the netcdf variable. @retval ierr @copydoc error_return

    Arguments

    Type IntentOptional Attributes Name
    type(File_desc_t), intent(in) :: File
    type(Var_desc_t), intent(in) :: vardesc
    character(len=*), intent(out) :: name

    Return Value integer

public interface pio_inq_varndims

\defgroup PIO_inq_varndims

  • private function inq_varndims_vid(File, varid, ndims) result(ierr)

    @public @ingroup PIO_inq_varndims @brief Gets the number of dimension associated with a netcdf variable @details @param File @copydoc file_desc_t @param varid : The variable identifier @param ndims : The number of dimensions for the variable @retval ierr @copydoc error_return

    Arguments

    Type IntentOptional Attributes Name
    type(File_desc_t), intent(in) :: File
    integer, intent(in) :: varid
    integer(kind=i4), intent(out) :: ndims

    Return Value integer

  • private function inq_varndims_vdesc(File, vardesc, ndims) result(ierr)

    @public @ingroup PIO_inq_varndims @brief Gets the number of dimension associated with a netcdf variable @details @param File @copydoc file_desc_t @param vardesc @copydoc var_desc_t @param ndims : The number of dimensions for the variable @retval ierr @copydoc error_return

    Arguments

    Type IntentOptional Attributes Name
    type(File_desc_t), intent(in) :: File
    type(Var_desc_t), intent(in) :: vardesc
    integer(kind=i4), intent(out) :: ndims

    Return Value integer

public interface pio_inq_varnatts

\defgroup PIO_inq_varnatts

  • private function inq_varnatts_vid(File, varid, natts) result(ierr)

    @public @ingroup PIO_inq_varnatts @brief Returns the number of attributes associated with a varaible @details @param File @copydoc file_desc_t @param varid : The netcdf variable id @param natts : The number of attributes associated with the variable @retval ierr @copydoc error_return

    Arguments

    Type IntentOptional Attributes Name
    type(File_desc_t), intent(in) :: File
    integer, intent(in) :: varid
    integer(kind=i4), intent(out) :: natts

    Return Value integer

  • private function inq_varnatts_vdesc(File, vardesc, natts) result(ierr)

    @public @ingroup PIO_inq_varnatts @brief Returns the number of attributes associated with a varaible @details @param File @copydoc file_desc_t @param vardesc @copydoc var_desc_t @param natts : The number of attributes associated with the variable @retval ierr @copydoc error_return

    Arguments

    Type IntentOptional Attributes Name
    type(File_desc_t), intent(in) :: File
    type(Var_desc_t), intent(in) :: vardesc
    integer(kind=i4), intent(out) :: natts

    Return Value integer

public interface pio_inq_vardimid

\defgroup PIO_inq_vardimid

  • private function inq_vardimid_vid(File, varid, dimids) result(ierr)

    @public @ingroup PIO_inq_vardimid @brief returns the dimids of the variable as an interger array @details @param File @copydoc file_desc_t @param varid : The variable id @param dimids : The dimension identifier returned by \ref PIO_def_dim @retval ierr @copydoc error_return

    Arguments

    Type IntentOptional Attributes Name
    type(File_desc_t), intent(in) :: File
    integer, intent(in) :: varid
    integer(kind=i4), intent(out) :: dimids(:)

    Return Value integer

  • private function inq_vardimid_vdesc(File, vardesc, dimids) result(ierr)

    @public @ingroup PIO_inq_vardimid @brief returns the dimids of the variable as an interger array @details @param File @copydoc file_desc_t @param vardesc @copydoc var_desc_t @param dimids : The dimension identifier returned by \ref PIO_def_dim @retval ierr @copydoc error_return

    Arguments

    Type IntentOptional Attributes Name
    type(File_desc_t), intent(in) :: File
    type(Var_desc_t), intent(in) :: vardesc
    integer(kind=i4), intent(out) :: dimids(:)

    Return Value integer

public interface pio_inq_vartype

\defgroup PIO_inq_vartype

  • private function inq_vartype_vid(File, varid, type) result(ierr)

    @public @ingroup PIO_inq_vartype @brief Gets metadata information for netcdf file. @details @param File @copydoc file_desc_t @param varid : The netcdf variable id @param type : The type of variable @retval ierr @copydoc error_return

    Arguments

    Type IntentOptional Attributes Name
    type(File_desc_t), intent(in) :: File
    integer, intent(in) :: varid
    integer(kind=i4), intent(out) :: type

    Return Value integer

  • private function inq_vartype_vdesc(File, vardesc, type) result(ierr)

    @public @ingroup PIO_inq_vartype @brief Gets metadata information for netcdf file. @details @param File @copydoc file_desc_t @param vardesc @copydoc var_desc_t @param type : The type of variable @retval ierr @copydoc error_return

    Arguments

    Type IntentOptional Attributes Name
    type(File_desc_t), intent(in) :: File
    type(Var_desc_t), intent(in) :: vardesc
    integer(kind=i4), intent(out) :: type

    Return Value integer

public interface pio_inquire_variable

\defgroup PIO_inquire_variable

  • private function inquire_variable_vid(ncid, varid, name, xtype, ndims, dimids, natts) result(ierr)

    @public @ingroup PIO_inquire_variable @brief Inquires if a NetCDF variable is present and returns its attributes @details @param ncid : A netcdf file descriptor returned by \ref PIO_openfile or \ref PIO_createfile. @param varid : The netcdf variable ID. @param name : The name of the variable @param xtype : The type of the variable @param ndims : The number of dimensions for the variable. @param dimids : The dimension identifier returned by \ref PIO_def_dim @param natts : Number of attributes associated with the variable @retval ierr @copydoc error_return

    Arguments

    Type IntentOptional Attributes Name
    type(File_desc_t), intent(in) :: ncid
    integer, intent(in) :: varid
    character(len=*), intent(out), optional :: name
    integer, intent(out), optional :: xtype
    integer, intent(out), optional :: ndims
    integer, intent(out), optional, dimension(:) :: dimids
    integer, intent(out), optional :: natts

    Return Value integer

  • private function inquire_variable_vdesc(ncid, vardesc, name, xtype, ndims, dimids, natts) result(ierr)

    @public @ingroup PIO_inquire_variable @brief Inquires if a NetCDF variable is present and returns its attributes @details @param ncid : A netcdf file descriptor returned by \ref PIO_openfile or \ref PIO_createfile. @param vardesc @copydoc var_desc_t @param name : The name of the variable @param xtype : The type of the variable @param ndims : The number of dimensions for the variable. @param dimids : The dimension identifier returned by \ref PIO_def_dim @param natts : Number of attributes associated with the variable @retval ierr @copydoc error_return

    Arguments

    Type IntentOptional Attributes Name
    type(File_desc_t), intent(in) :: ncid
    type(Var_desc_t), intent(in) :: vardesc
    character(len=*), intent(out), optional :: name
    integer, intent(out), optional :: xtype
    integer, intent(out), optional :: ndims
    integer, intent(out), optional, dimension(:) :: dimids
    integer, intent(out), optional :: natts

    Return Value integer


Functions

public function pio_inquire(File, nDimensions, nVariables, nAttributes, unlimitedDimID) result(ierr)

@public @ingroup PIO_inquire @brief Gets metadata information for netcdf file. @details @param File @copydoc file_desc_t @param nDimensions : Number of dimensions defined for the netcdf file @param nVariables : Number of variables defined for the netcdf file @param nAttributes : Number of attributes defined for the netcdf file @param unlimitedDimID : the Unlimited dimension ID @retval ierr @copydoc error_return

Arguments

Type IntentOptional Attributes Name
type(File_desc_t), intent(in) :: File
integer, intent(out), optional :: nDimensions
integer, intent(out), optional :: nVariables
integer, intent(out), optional :: nAttributes
integer, intent(out), optional :: unlimitedDimID

Return Value integer

public function pio_inq_dimid(File, name, dimid) result(ierr)

@public @ingroup PIO_inq_dimid @brief Returns the netcdf dimension id for the name. @details @param File @copydoc file_desc_t @param name : The name of the netcdf dimension. @param dimid : The netcdf dimension id. @retval ierr @copydoc error_return

Read more…

Arguments

Type IntentOptional Attributes Name
type(File_desc_t), intent(in) :: File
character(len=*), intent(in) :: name
integer, intent(out) :: dimid

Return Value integer

public function pio_inq_dimname(File, dimid, dimname) result(ierr)

@public @ingroup PIO_inq_dimname @brief Gets the name of a dimension given its ID @details @param File @copydoc file_desc_t @param dimid : The netcdf dimension id. @param dimname : The name associated with the netcdf dimension id. @retval ierr @copydoc error_return

Arguments

Type IntentOptional Attributes Name
type(File_desc_t), intent(in) :: File
integer, intent(in) :: dimid
character(len=*), intent(out) :: dimname

Return Value integer

public function pio_inq_dimlen(File, dimid, dimlen) result(ierr)

@public @ingroup PIO_inq_dimlen @brief Returns the extent of a netCDF dimension @details @param File @copydoc file_desc_t @param dimid : The netcdf dimension. @param dimlen : The extent of the netcdf dimension. @retval ierr @copydoc error_return

Arguments

Type IntentOptional Attributes Name
type(File_desc_t), intent(in) :: File
integer(kind=i4), intent(in) :: dimid
integer(kind=i4), intent(out) :: dimlen

Return Value integer

public function PIO_enddef(File) result(ierr)

@public @ingroup PIO_enddef @brief Exits netcdf define mode. @details @param File @copydoc file_desc_t @retval ierr @copydoc error_return

Arguments

Type IntentOptional Attributes Name
type(File_desc_t), intent(inout) :: File

Return Value integer

public function PIO_redef(File) result(ierr)

@public @ingroup PIO_redef @brief Re-enters netcdf define mode. @details

Read more…

Arguments

Type IntentOptional Attributes Name
type(File_desc_t), intent(inout) :: File

Return Value integer

public function PIO_def_dim(File, name, len, dimid) result(ierr)

@public @ingroup PIO_def_dim @brief Defines the netcdf dimension @details @param File @copydoc file_desc_t @param name : The name of the dimension to define @param len : The size of the dimension @param dimid : The dimension identifier

Arguments

Type IntentOptional Attributes Name
type(File_desc_t), intent(in) :: File
character(len=*), intent(in) :: name
integer(kind=i4), intent(in) :: len
integer(kind=i4), intent(out) :: dimid

Return Value integer

public function pio_copy_att(infile, invarid, name, outfile, outvarid) result(ierr)

@public @ingroup PIO_copy_att @brief No idea what this function does @details @param infile @copydoc file_desc_t @param invarid : @param name : @param outfile : @param outvarid : @retval ierr @copydoc error_return

Arguments

Type IntentOptional Attributes Name
type(File_desc_t), intent(in) :: infile
integer, intent(in) :: invarid
character(len=*), intent(in) :: name
type(File_desc_t), intent(in) :: outfile
integer, intent(in) :: outvarid

Return Value integer

public function PIO_inquire_dimension(ncid, dimid, name, len) result(ierr)

@public @ingroup PIO_inquire_dimension @brief Get information about a particular dimension in netcdf file @details @param ncid : A netcdf file descriptor returned by \ref PIO_openfile or \ref PIO_createfile. @param dimid : The netcdf dimension ID. @param name : The name of the dimension. @param len : The length of the dimesions name. @retval ierr @copydoc error_return

Arguments

Type IntentOptional Attributes Name
type(File_desc_t), intent(in) :: ncid
integer, intent(in) :: dimid
character(len=*), intent(out), optional :: name
integer, intent(out), optional :: len

Return Value integer