init_kt_grids_single Subroutine

public subroutine init_kt_grids_single(kt_grids_single_config_in)

Uses

FIXME : Add documentation

Arguments

Type IntentOptional Attributes Name
type(kt_grids_single_config_type), intent(in), optional :: kt_grids_single_config_in

Contents

Source Code


Source Code

  subroutine init_kt_grids_single(kt_grids_single_config_in)
!CMR, 14/10/2013: 
! New namelist variables n0, rhostar_single to set aky using toroidal mode number.
! Toroidal modenumber used if n0> 0 prescribed in input file. 
    use theta_grid, only: drhodpsi, shat
    implicit none
    type(kt_grids_single_config_type), intent(in), optional :: kt_grids_single_config_in

    if(initialized) return
    initialized = .true.
    
    call read_parameters_single(kt_grids_single_config_in)

    if (n0 .gt. 0) then
!CMR if n0>0 then override aky inputs and use n0 to determine aky
       aky=n0*drhodpsi*rhostar_single
    endif

    ! Try to ensure consistency between akx and theta0
    if (akx == default_unset_value) then
       ! If kx hasn't been set, set it from theta0
       akx = theta0 * aky * shat
    else
       ! If kx has been set, force theta0 to be calculated from this
       if (shat /= 0 .and. aky /= 0 ) then
          theta0 = akx / (aky * shat)
       end if
    end if

  end subroutine init_kt_grids_single