read_parameters Subroutine

private subroutine read_parameters(kt_grids_config_in)

FIXME : Add documentation

Arguments

Type IntentOptional Attributes Name
type(kt_grids_config_type), intent(in), optional :: kt_grids_config_in

Contents

Source Code


Source Code

  subroutine read_parameters(kt_grids_config_in)
    use file_utils, only: error_unit
    use text_options, only: text_option, get_option_value
    implicit none
    type(kt_grids_config_type), intent(in), optional :: kt_grids_config_in
    type (text_option), dimension (6), parameter :: gridopts = &
         [ text_option('default', gridopt_single), &
            text_option('single', gridopt_single), &
            text_option('range', gridopt_range), &
            text_option('specified', gridopt_specified), &
            text_option('box', gridopt_box), &
            text_option('nonlinear', gridopt_box) ]
    integer :: ierr

    if (present(kt_grids_config_in)) kt_grids_config = kt_grids_config_in

    call kt_grids_config%init(name = 'kt_grids_knobs', requires_index = .false.)

    ! Copy out internal values into module level parameters
    associate(self => kt_grids_config)
#include "kt_grids_copy_out_auto_gen.inc"
    end associate
    
    ierr = error_unit()
    call get_option_value (grid_option, gridopts, gridopt_switch, &
         ierr, "grid_option in kt_grids_knobs",.true.)
  end subroutine read_parameters