get_names_from_string Function

public function get_names_from_string(aux_variable_names, nwc) result(names)

Uses

  • proc~~get_names_from_string~~UsesGraph proc~get_names_from_string get_names_from_string module~mod_global_parameters mod_global_parameters proc~get_names_from_string->module~mod_global_parameters module~mod_basic_types mod_basic_types module~mod_global_parameters->module~mod_basic_types module~mod_connectivity mod_connectivity module~mod_global_parameters->module~mod_connectivity module~mod_constants mod_constants module~mod_global_parameters->module~mod_constants module~mod_physicaldata mod_physicaldata module~mod_global_parameters->module~mod_physicaldata module~mod_variables mod_variables module~mod_global_parameters->module~mod_variables mpi mpi module~mod_global_parameters->mpi module~mod_variables->module~mod_basic_types

Arguments

Type IntentOptional Attributes Name
character(len=*), intent(in) :: aux_variable_names
integer, intent(in) :: nwc

Return Value character(len=name_len), (1:nwc)


Called by

proc~~get_names_from_string~~CalledByGraph proc~get_names_from_string get_names_from_string proc~add_convert_method2 add_convert_method2 proc~add_convert_method2->proc~get_names_from_string

Source Code

   function get_names_from_string(aux_variable_names,nwc) result(names) 
    use mod_global_parameters
    character(len=*),intent(in):: aux_variable_names
    integer, intent(in) :: nwc
    character(len=name_len)   :: names(1:nwc)

    integer::  space_position,iw
    character(len=name_len)::  wname
    character(len=std_len)::  scanstring

    ! copied from subroutine getheadernames in calculate_xw
    !TODO check for errors 
    scanstring=TRIM(adjustl(aux_variable_names))
    space_position=index(scanstring,' ')
    do iw=1,nwc
       do while (space_position==1)
         scanstring=scanstring(2:)
         space_position=index(scanstring,' ')
       enddo
       wname=scanstring(:space_position-1)
       scanstring=scanstring(space_position+1:)
       space_position=index(scanstring,' ')

       names(iw)=TRIM(adjustl(wname))
    enddo
  end function get_names_from_string