load variables defined in sysConf
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
type(flu_state) | :: | conf | ||||
character(len=*), | intent(in) | :: | chunk | |||
type(tem_st_fun_linkedList_type), | intent(out) | :: | stfun_linkedList | |||
type(tracking_type), | intent(out) | :: | tracking | |||
type(tem_variable_type), | intent(out), | allocatable | :: | newVar(:) |
subroutine load_config( conf, chunk, stfun_linkedList, tracking, newVar )
! -------------------------------------------------------------------------!
type(flu_state) :: conf
character(len=*), intent(in) :: chunk
type(tem_st_fun_linkedList_type), intent(out) :: stfun_linkedList
type(tracking_type), intent(out) :: tracking
type(tem_variable_type), allocatable, intent(out) :: newVar(:)
! -------------------------------------------------------------------------!
integer :: nVars, iVar, thandle, iError
integer, allocatable :: vError(:)
! -------------------------------------------------------------------------!
call open_config_chunk(L=conf, chunk=trim(chunk))
call tem_variable_load( me = newVar, &
& conf = conf, &
& key = 'variable', &
& vError = vError )
call aot_table_open( L = conf, &
& thandle = thandle, &
& key = 'track_variable' )
nVars = aot_table_length( L = conf, thandle = thandle )
tracking%nRequestedVars = nVars
allocate(tracking%variable(nVars))
write(*,*) 'track_variables :'
do iVar = 1, nVars
! Get the names of the variable
call aot_get_val( L = conf, &
& thandle = thandle, &
& val = tracking%variable(iVar), &
& ErrCode = iError, &
& pos = iVar )
write(*,*) trim(tracking%variable(iVar))
end do
write(*,*)
call aot_table_close( L = conf, thandle = thandle)
end subroutine load_config