ncfile_def_dim Subroutine

public subroutine ncfile_def_dim(sf, dimname_in, dimlen, dimid)

define a dimension to the netCDF file

Type Bound

t_ncfile

Arguments

Type IntentOptional Attributes Name
class(t_ncfile), intent(inout) :: sf

self

character(len=*), intent(in) :: dimname_in

name of the dimension

integer, intent(in) :: dimlen

length of the dimension

integer, intent(out) :: dimid

id of the dimension


Calls

proc~~ncfile_def_dim~~CallsGraph proc~ncfile_def_dim t_ncfile%ncfile_def_dim proc~mpi_check_single_access mpi_check_single_access proc~ncfile_def_dim->proc~mpi_check_single_access

Called by

proc~~ncfile_def_dim~~CalledByGraph proc~ncfile_def_dim t_ncfile%ncfile_def_dim proc~writedatatonetcdf WriteDataToNETCDF proc~writedatatonetcdf->proc~ncfile_def_dim

Source Code

  SUBROUTINE ncfile_def_dim(sf,dimname_in,dimlen,dimid)
    ! MODULES
    IMPLICIT NONE
    !-------------------------------------------------------------------------------------------------------------------------------
    ! INPUT VARIABLES
    CHARACTER(LEN=*),INTENT(IN) :: dimname_in  !! name of the dimension
    INTEGER,INTENT(IN)          :: dimlen      !! length of the dimension
    !-------------------------------------------------------------------------------------------------------------------------------
    ! OUTPUT VARIABLES
    CLASS(t_ncfile),INTENT(INOUT):: sf    !! self
    INTEGER,INTENT(OUT)          :: dimid !! id of the dimension
    !===============================================================================================================================
    CALL mpi_check_single_access()
#if NETCDF
    sf%ioError = nf90_def_dim(sf%nc_id, dimname_in, dimlen, dimid)
    CALL sf%handle_error("define dimension '"//TRIM(dimname_in)//"'")
#endif /*NETCDF*/
  END SUBROUTINE ncfile_def_dim