netcdf_variables.f90
Go to the documentation of this file.
! -----
! Variable definitions and inquiry
! -----
function nf90_def_var_scalar(ncid, name, xtype, varid)
integer, intent( in) :: ncid
character (len = *), intent( in) :: name
integer, intent( in) :: xtype
integer, intent(out) :: varid
integer :: nf90_def_var_Scalar
! Dummy - shouldn't get used
integer, dimension(1) :: dimids
nf90_def_var_scalar = nf_def_var(ncid, name, xtype, 0, dimids, varid)
end function nf90_def_var_scalar
! -----
function nf90_def_var_onedim(ncid, name, xtype, dimids, varid)
integer, intent( in) :: ncid
character (len = *), intent( in) :: name
integer, intent( in) :: xtype
integer, intent( in) :: dimids
integer, intent(out) :: varid
integer :: nf90_def_var_oneDim
integer, dimension(1) :: dimidsA
dimidsa(1) = dimids
nf90_def_var_onedim = nf_def_var(ncid, name, xtype, 1, dimidsa, varid)
end function nf90_def_var_onedim
! -----
function nf90_def_var_manydims(ncid, name, xtype, dimids, varid)
integer, intent( in) :: ncid
character (len = *), intent( in) :: name
integer, intent( in) :: xtype
integer, dimension(:), intent( in) :: dimids
integer, intent(out) :: varid
integer :: nf90_def_var_ManyDims
nf90_def_var_manydims = nf_def_var(ncid, name, xtype, size(dimids), dimids, varid)
end function nf90_def_var_manydims
! -----
function nf90_inq_varid(ncid, name, varid)
integer, intent( in) :: ncid
character (len = *), intent( in) :: name
integer, intent(out) :: varid
integer :: nf90_inq_varid
nf90_inq_varid = nf_inq_varid(ncid, name, varid)
end function nf90_inq_varid
! -----
function nf90_inquire_variable(ncid, varid, name, xtype, ndims, dimids, nAtts)
integer, intent( in) :: ncid, varid
character (len = *), optional, intent(out) :: name
integer, optional, intent(out) :: xtype, ndims
integer, dimension(:), optional, intent(out) :: dimids
integer, optional, intent(out) :: nAtts
integer :: nf90_inquire_variable
! Local variables
character (len = nf90_max_name) :: varName
integer :: externalType, numDimensions
integer, dimension(nf90_max_var_dims) :: dimensionIDs
integer :: numAttributes
nf90_inquire_variable = nf_inq_var(ncid, varid, varname, externaltype, &
numdimensions, dimensionids, numattributes)
if (nf90_inquire_variable == nf90_noerr) then
if(present(name)) name = trim(varname)
if(present(xtype)) xtype = externaltype
if(present(ndims)) ndims = numdimensions
if(present(dimids)) then
if (size(dimids) .ge. numdimensions) then
dimids(:numdimensions) = dimensionids(:numdimensions)
else
nf90_inquire_variable = nf90_einval
endif
endif
if(present(natts)) natts = numattributes
endif
end function nf90_inquire_variable
! -----
function nf90_rename_var(ncid, varid, newname)
integer, intent( in) :: ncid, varid
character (len = *), intent( in) :: newname
integer :: nf90_rename_var
nf90_rename_var = nf_rename_var(ncid, varid, newname)
end function nf90_rename_var
! -----
nf_inq_var
integer function nf_inq_var(ncid, varid, name, xtype, ndims, dimids, natts)
Definition: nf_genvar.f90:119
nf90_def_var_manydims
integer function nf90_def_var_manydims(ncid, name, xtype, dimids, varid, contiguous, chunksizes, deflate_level, shuffle, fletcher32, endianness, cache_size, cache_nelems, cache_preemption)
Definition: netcdf4_variables.f90:131
nf90_rename_var
integer function nf90_rename_var(ncid, varid, newname)
Definition: netcdf4_variables.f90:354
nf_rename_var
integer function nf_rename_var(ncid, varid, name)
Definition: nf_genvar.f90:372
nf90_inq_varid
integer function nf90_inq_varid(ncid, name, varid)
Definition: netcdf4_variables.f90:245
nf90_inquire_variable
integer function nf90_inquire_variable(ncid, varid, name, xtype, ndims, dimids, nAtts, contiguous, chunksizes, deflate_level, shuffle, fletcher32, endianness, cache_size, cache_nelems, cache_preemption)
Definition: netcdf4_variables.f90:268
nf_def_var
integer function nf_def_var(ncid, name, xtype, nvdims, vdims, varid)
Definition: nf_genvar.f90:36
nf90_def_var_scalar
integer function nf90_def_var_scalar(ncid, name, xtype, varid)
Definition: netcdf4_variables.f90:5
nf_inq_varid
integer function nf_inq_varid(ncid, name, varid)
Definition: nf_genvar.f90:246
nf90_def_var_onedim
integer function nf90_def_var_onedim(ncid, name, xtype, dimids, varid, contiguous, chunksizes, deflate_level, shuffle, fletcher32, endianness, cache_size, cache_nelems, cache_preemption)
Definition: netcdf4_variables.f90:23

Return to the Main Unidata NetCDF page.