tem_get_ncoeffs_miescat Function

private function tem_get_ncoeffs_miescat(conf, thandle) result(nCoeffs)

Todo

JZ: Currently, we read the number of necessary coefficients from the lua script. However, there are also some automatic ways to estimate the number of coefficients necessary to obtain a certain numerical accuaracy, e.g. in [Wiscombe1980] .

Arguments

Type IntentOptional Attributes Name
type(flu_State) :: conf

lua state type

integer, intent(in) :: thandle

aotus parent handle

Return Value integer

The number of coefficients necessary for the Fourier series


Source Code

  function tem_get_ncoeffs_miescat(conf, thandle ) result(nCoeffs)
    ! --------------------------------------------------------------------------
    !> lua state type
    type(flu_State) :: conf
    !> aotus parent handle
    integer, intent(in) :: thandle
    !> The number of coefficients necessary for the Fourier series
    integer :: nCoeffs
    ! --------------------------------------------------------------------------
    integer :: iError
    ! --------------------------------------------------------------------------

    !> @todo JZ: Currently, we read the number of necessary coefficients
    !! from the lua script. However, there are also some automatic ways
    !! to estimate the number of coefficients necessary to obtain a certain
    !! numerical accuaracy, e.g. in [Wiscombe1980] .

    ! Read the frequency
    call aot_get_val( L       = conf,                                          &
      &               thandle = thandle,                                       &
      &               key     = 'nCoeffs',                                     &
      &               val     = nCoeffs,                                       &
      &               ErrCode = iError )
    if ( iError.ne.0 ) then
      call tem_abort( 'ERROR in tem_get_ncoeffs_miescat: Not able to read' &
        & // ' nCoeffs for Mie-Scatter solution from lua'                  )
    end if

  end function tem_get_ncoeffs_miescat