Nodes of different colours represent the following:
Solid arrows point from a parent (sub)module to the submodule which is descended from it. Dashed arrows point from a module being used to the module or program unit using it. Where possible, edges connecting nodes are given different colours to make them easier to distinguish in large graphs.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
integer, | intent(in) | :: | nlayer | |||
integer, | intent(in) | :: | index | |||
real(kind=r64), | intent(in), | dimension(maxlay) | :: | theta | ||
real(kind=r64), | intent(in) | :: | Trmout | |||
real(kind=r64), | intent(in) | :: | Tamb | |||
real(kind=r64), | intent(in) | :: | Trmin | |||
real(kind=r64), | intent(in) | :: | Troom | |||
real(kind=r64), | intent(in) | :: | Ebsky | |||
real(kind=r64), | intent(in) | :: | Ebroom | |||
real(kind=r64), | intent(in) | :: | hcin | |||
real(kind=r64), | intent(in) | :: | hcout | |||
real(kind=r64), | intent(in) | :: | hrin | |||
real(kind=r64), | intent(in) | :: | hrout | |||
real(kind=r64), | intent(in) | :: | hin | |||
real(kind=r64), | intent(in) | :: | hout | |||
real(kind=r64), | intent(in), | dimension(maxlay) | :: | Ebb | ||
real(kind=r64), | intent(in), | dimension(maxlay) | :: | Ebf | ||
real(kind=r64), | intent(in), | dimension(maxlay) | :: | Rb | ||
real(kind=r64), | intent(in), | dimension(maxlay) | :: | Rf | ||
integer, | intent(inout) | :: | nperr |
Nodes of different colours represent the following:
Solid arrows point from a procedure to one which it calls. Dashed arrows point from an interface to procedures which implement that interface. This could include the module procedures in a generic interface or the implementation in a submodule of an interface in a parent module. Where possible, edges connecting nodes are given different colours to make them easier to distinguish in large graphs.
subroutine storeIterationResults(nlayer, index, theta, Trmout, Tamb, Trmin, Troom, Ebsky, Ebroom, &
hcin, hcout, hrin, hrout, hin, hout, Ebb, Ebf, Rb, Rf, nperr)
use DataGlobals, only: KelvinConv
integer, intent(inout) :: nperr
!character*(*), intent(inout) :: ErrorMessage
integer, intent(in) :: nlayer, index
real(r64), dimension(maxlay), intent(in) :: theta
real(r64), intent(in) :: Trmout, Tamb, Trmin, Troom
real(r64), intent(in) :: Ebsky, Ebroom
real(r64), intent(in) :: hcin, hcout, hrin, hrout, hin, hout
real(r64), dimension(maxlay), intent(in) :: Ebb, Ebf, Rb, Rf
!localy used
character(len=1024) :: dynFormat = ''
character(len=3) :: a
integer :: i
!open(unit=InArgumentsFile, file=TRIM(DBGD)//'TarcogIterations.dbg', status='unknown', access='APPEND', &
! & form='formatted', iostat=nperr)
!if (nperr.ne.0) open(unit=InArgumentsFile, file='TarcogIterations.dbg', status='unknown', access='APPEND', &
! & form='formatted', iostat=nperr)
!open(unit=IterationCSV, file=TRIM(DBGD)//Trim(IterationCSVName), status='unknown', access='APPEND', &
! & form='formatted', iostat=nperr)
!if (nperr.ne.0) open(unit=IterationCSV, file=Trim(IterationCSVName), status='unknown', access='APPEND', &
! & form='formatted', iostat=nperr)
!open(unit=IterationHHAT, file=TRIM(DBGD)//Trim(IterationHHATName), status='unknown', access='APPEND', &
! & form='formatted', iostat=nperr)
!if (nperr.ne.0) open(unit=IterationHHAT, file=Trim(IterationHHATName), status='unknown', access='APPEND', &
! & form='formatted', iostat=nperr)
!write(a,1000) index
write(TarcogIterationsFileNumber, '("*********************************************************************************'// &
&'****************")')
write(TarcogIterationsFileNumber, '("Iteration number: ", i5)') index
write(TarcogIterationsFileNumber, '("Trmin = ", f8.4)') Trmin - KelvinConv
write(TarcogIterationsFileNumber, '("Troom = ", f12.6)') Troom - KelvinConv
write(TarcogIterationsFileNumber, '("Trmout = ", f8.4)') Trmout - KelvinConv
write(TarcogIterationsFileNumber, '("Tamb = ", f12.6)') Tamb - KelvinConv
write(TarcogIterationsFileNumber, '("Ebsky = ", f8.4)') Ebsky
write(TarcogIterationsFileNumber, '("Ebroom = ", f8.4)') Ebroom
write(TarcogIterationsFileNumber, '("hcin = ", f8.4)') hcin
write(TarcogIterationsFileNumber, '("hcout = ", f8.4)') hcout
write(TarcogIterationsFileNumber, '("hrin = ", f8.4)') hrin
write(TarcogIterationsFileNumber, '("hrout = ", f8.4)') hrout
write(TarcogIterationsFileNumber, '("hin = ", f8.4)') hin
write(TarcogIterationsFileNumber, '("hout = ", f8.4)') hout
!Write headers for Ebb and Ebf
do i = 1, 2*nlayer
write(a,1000) (i + 1)/2 !this is just to simulate correct integer in brackets
if (i.eq.1) then
dynFormat = '("'
end if
if (mod(i, 2).eq.1) then
dynFormat = TRIM(dynFormat)//'Ebf('//a//')'
else
dynFormat = TRIM(dynFormat)//'Ebb('//a//')'
end if
if (i.eq.2*nlayer) then
dynFormat = TRIM(dynFormat)//'")'
else
dynFormat = TRIM(dynFormat)//'==='
end if
end do
write(TarcogIterationsFileNumber, dynFormat)
!write Ebb and Ebf
do i = 1, 2*nlayer
if (i.eq.1) then
dynFormat = '( '
end if
dynFormat = TRIM(dynFormat)//'f16.8'
if (i.eq.2*nlayer) then
dynFormat = TRIM(dynFormat)//')'
else
dynFormat = TRIM(dynFormat)//'," " '
end if
end do
write(TarcogIterationsFileNumber, dynFormat) (Ebf(i), Ebb(i), i=1,nlayer)
!Write headers for Rb and Rf
do i = 1, 2*nlayer
write(a,1000) (i + 1)/2 !this is just to simulate correct integer in brackets
if (i.eq.1) then
dynFormat = '("'
end if
if (mod(i, 2).eq.1) then
dynFormat = TRIM(dynFormat)//'Rf('//a//')'
else
dynFormat = TRIM(dynFormat)//'Rb('//a//')'
end if
if (i.eq.2*nlayer) then
dynFormat = TRIM(dynFormat)//'")'
else
dynFormat = TRIM(dynFormat)//'==='
end if
end do
write(TarcogIterationsFileNumber, dynFormat)
!write Rb and Rf
do i = 1, 2*nlayer
if (i.eq.1) then
dynFormat = '( '
end if
dynFormat = TRIM(dynFormat)//'f16.8'
if (i.eq.2*nlayer) then
dynFormat = TRIM(dynFormat)//')'
else
dynFormat = TRIM(dynFormat)//'," " '
end if
end do
write(TarcogIterationsFileNumber, dynFormat) (Rf(i), Rb(i), i=1,nlayer)
!Write header for temperatures
do i = 1, 2*nlayer
write(a,1000) i
if (i.eq.1) then
dynFormat = '("'
end if
dynFormat = TRIM(dynFormat)//'theta('//a//')'
if (i.eq.(2*nlayer)) then
dynFormat = TRIM(dynFormat)//'")'
else
dynFormat = TRIM(dynFormat)//'=='
end if
end do
write(TarcogIterationsFileNumber, dynFormat)
!write temperatures
do i = 1, 2*nlayer
if (i.eq.1) then
dynFormat = '( '
end if
dynFormat = TRIM(dynFormat)//'f8.4'
if (i.eq.(2*nlayer)) then
dynFormat = TRIM(dynFormat)//')'
else
dynFormat = TRIM(dynFormat)//'," " '
end if
end do
write(TarcogIterationsFileNumber, dynFormat) (theta(i) - KelvinConv, i=1,2*nlayer)
!close(TarcogIterationsFileNumber)
!write results in csv file
if (index.eq.0) then
dynFormat = '(" '
do i = 1, 2*nlayer
write(a,1000) i !this is just to simulate correct integer in brackets
if (i.ne.2*nlayer) then
dynFormat = trim(dynFormat)//'theta('//a//'),'
else
dynFormat = trim(dynFormat)//'theta('//a//')'
end if
end do
dynFormat = trim(dynFormat)//'")'
write(IterationCSVFileNumber, dynFormat)
end if
do i = 1, 2*nlayer
if (i.eq.1) then
dynFormat = '( '
end if
dynFormat = TRIM(dynFormat)//'f8.4'
if (i.eq.(2*nlayer)) then
dynFormat = TRIM(dynFormat)//')'
else
dynFormat = TRIM(dynFormat)//',", " '
end if
end do
write(IterationCSVFileNumber, dynFormat) (theta(i) - KelvinConv, i=1,2*nlayer)
!close(IterationCSVFileNumber)
1000 format(I3)
end subroutine storeIterationResults