add_dimension Subroutine

public subroutine add_dimension(sfile, dimension_name, dimsize, description, units)

Arguments

Type IntentOptional AttributesName
type(sdatio_file), intent(in) :: sfile
character(len=*), intent(in) :: dimension_name
integer, intent(in) :: dimsize
character(len=*), intent(in) :: description
character(len=*), intent(in) :: units

Contents

Source Code


Source Code

  subroutine add_dimension(sfile, dimension_name, dimsize, description, units)
    type(sdatio_file), intent(in) :: sfile
    character(*), intent(in) :: dimension_name
    integer, intent(in) :: dimsize
    character(*), intent(in) :: description, units
#ifdef ISO_C_BINDING
    interface
       subroutine sdatio_add_dimension(sfile, dimension_name, dimsize, description, units) bind(c, name='sdatio_add_dimension')
         use iso_c_binding
         import sdatio_file
         type(sdatio_file) :: sfile
         character(c_char) :: dimension_name(*)
         integer(c_int), value :: dimsize
         character(c_char) :: units(*)
         character(c_char) :: description(*)
       end subroutine sdatio_add_dimension
    end interface
    call sdatio_add_dimension(sfile, dimension_name//c_null_char, dimsize, description//c_null_char, units//c_null_char)
#endif
  end subroutine add_dimension