FIXME : Add documentation
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
type(theta_grid_salpha_config_type), | intent(in), | optional | :: | theta_grid_salpha_config_in |
subroutine read_parameters(theta_grid_salpha_config_in)
use file_utils, only: error_unit
use theta_grid_params, only: shift_in => shift, alpmhd
use text_options, only: text_option, get_option_value
implicit none
type(theta_grid_salpha_config_type), intent(in), optional :: theta_grid_salpha_config_in
character(20) :: model_option
type (text_option), dimension (8), parameter :: modelopts = &
[ text_option('default', model_salpha), &
text_option('s-alpha', model_salpha), &
text_option('alpha1', model_alpha1), &
text_option('rogers', model_eps), &
text_option('b2', model_b2), &
text_option('normal_only', model_normal_only), &
text_option('const-curv', model_ccurv), &
text_option('no-curvature', model_nocurve) ]
integer :: ierr
if (present(theta_grid_salpha_config_in)) theta_grid_salpha_config = theta_grid_salpha_config_in
call theta_grid_salpha_config%init(name = 'theta_grid_salpha_knobs', requires_index = .false.)
! Copy out internal values into module level parameters
associate(self => theta_grid_salpha_config)
#include "theta_grid_salpha_copy_out_auto_gen.inc"
end associate
ierr = error_unit()
call get_option_value &
(model_option, modelopts, model_switch, &
ierr, "model_option in theta_grid_salpha_knobs",.true.)
if (alpmhdfac > epsilon(0.0)) then
shift = - alpmhd*alpmhdfac
else
shift = shift_in
end if
end subroutine read_parameters