Allows the output of the single variable to lua out.
The data is written into the file, the lunit is connected to. It is formatted as a Lua table.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
type(tem_variable_type), | intent(in) | :: | me |
variable to write into the lua file |
||
type(aot_out_type), | intent(inout) | :: | conf |
aotus type handling the output to the file in lua format |
||
integer, | intent(in), | optional | :: | level |
to dump variable with key or without key |
subroutine tem_variable_out_single(me, conf, level)
! ---------------------------------------------------------------------------
!> variable to write into the lua file
type(tem_variable_type), intent(in) :: me
!> aotus type handling the output to the file in lua format
type(aot_out_type), intent(inout) :: conf
!> to dump variable with key or without key
integer, optional, intent(in) :: level
! ---------------------------------------------------------------------------
integer :: level_loc
! ---------------------------------------------------------------------------
if (present(level)) then
level_loc = level
else
level_loc = 0
end if
if( level_loc == 0) then
call aot_out_open_table( put_conf = conf, tname = 'variable' )
else
call aot_out_open_table( put_conf = conf )
end if
call aot_out_val( put_conf = conf, &
& val = trim(me%label), &
& vname = 'name' )
call aot_out_val( put_conf = conf, &
& val = me%nComponents, &
& vname = 'ncomponents' )
if (trim(me%varType) /= '') then
call aot_out_val( put_conf = conf, &
& val = me%varType, &
& vname = 'vartype' )
if( trim(me%varType) == 'operation' ) then
! write the operation kind and dependent variables
call aot_out_open_table( put_conf = conf, tname='operation' )
call aot_out_val( put_conf = conf, &
& val = me%operType, &
& vname = 'kind' )
call aot_out_val( put_conf = conf, &
& val = me%input_varName, &
& vname = 'input_varname' )
if (allocated(me%input_varIndex)) then
call aot_out_val( put_conf = conf, &
& val = me%input_varIndex, &
& vname = 'input_varindex' )
end if
call aot_out_close_table( put_conf = conf )
end if
end if
call aot_out_close_table( put_conf = conf )
end subroutine tem_variable_out_single