subroutine CheckProgVars( xy_Ps, xyz_U, xyz_V, xyz_Temp, xyzf_QMix )
!
! 予報変数の値の確認
!
! Check values of prognostic variables
!
! モジュール引用 ; USE statements
!
! 格子点設定
! Grid points settings
!
use gridset, only: imax, jmax, kmax ! 鉛直層数.
! Number of vertical level
! 組成に関わる配列の設定
! Settings of array for atmospheric composition
!
use composition, only: ncmax, IndexH2OVap
! メッセージ出力
! Message output
!
use dc_message, only: MessageNotify
! 時刻管理
! Time control
!
use timeset, only: TimeN, TimesetClockStart, TimesetClockStop
! デバッグ用ユーティリティ
! Utilities for debug
!
use dc_trace, only: DbgMessage, BeginSub, EndSub
! 宣言文 ; Declaration statements
!
implicit none
real(DP), intent(in):: xy_Ps (0:imax-1, 1:jmax)
! $ p_s (t-\Delta t) $ . 地表面気圧. Surface pressure (Pa)
real(DP), intent(in):: xyz_U (0:imax-1, 1:jmax, 1:kmax)
! $ u $ . 東西風速. Eastward wind
real(DP), intent(in):: xyz_V (0:imax-1, 1:jmax, 1:kmax)
! $ v $ . 南北風速. Northward wind
real(DP), intent(in):: xyz_Temp (0:imax-1, 1:jmax, 1:kmax)
! $ T $ . 温度 (整数レベル).
! Temperature (full level)
real(DP), intent(in):: xyzf_QMix(0:imax-1, 1:jmax, 1:kmax, 1:ncmax)
! $ q $ . 比湿. Specific humidity
! 作業変数
! Work variables
!
integer:: i ! 経度方向に回る DO ループ用作業変数
! Work variables for DO loop in longitude
integer:: j ! 緯度方向に回る DO ループ用作業変数
! Work variables for DO loop in latitude
integer:: k ! 鉛直方向に回る DO ループ用作業変数
! Work variables for DO loop in vertical direction
integer:: n ! 組成方向に回る DO ループ用作業変数
! Work variables for DO loop in dimension of constituents
real(DP) :: minval, maxval
integer :: mini, minj, mink
integer :: maxi, maxj, maxk
! 実行文 ; Executable statement
!
! 初期化確認
! Initialization check
!
if ( .not. check_prog_vars_inited ) then
call MessageNotify( 'E', module_name, 'This module has not been initialized.' )
end if
! 計算時間計測開始
! Start measurement of computation time
!
call TimesetClockStart( module_name )
i = 0
j = 1
k = 1
minval = xyz_U(i,j,k)
maxval = xyz_U(i,j,k)
mini = i
minj = j
mink = k
maxi = i
maxj = j
maxk = k
do k = 1, kmax
do j = 1, jmax
do i = 0, imax-1
if ( xyz_U (i,j,k) < minval ) then
minval = xyz_U (i,j,k)
mini = i
minj = j
mink = k
end if
if ( maxval < xyz_U (i,j,k) ) then
maxval = xyz_U (i,j,k)
maxi = i
maxj = j
maxk = k
end if
end do
end do
end do
if ( minval < VelMin ) then
call MessageNotify( 'M', module_name, 'Minimum value : U(%d,%d,%d) = %f.', i = (/ mini, minj, mink /), d = (/ minval /) )
end if
if ( VelMax < maxval ) then
call MessageNotify( 'M', module_name, 'Maximum value : U(%d,%d,%d) = %f.', i = (/ maxi, maxj, maxk /), d = (/ maxval /) )
end if
i = 0
j = 1
k = 1
minval = xyz_V(i,j,k)
maxval = xyz_V(i,j,k)
mini = i
minj = j
mink = k
maxi = i
maxj = j
maxk = k
do k = 1, kmax
do j = 1, jmax
do i = 0, imax-1
if ( xyz_V (i,j,k) < minval ) then
minval = xyz_V (i,j,k)
mini = i
minj = j
mink = k
end if
if ( maxval < xyz_V (i,j,k) ) then
maxval = xyz_V (i,j,k)
maxi = i
maxj = j
maxk = k
end if
end do
end do
end do
if ( minval < VelMin ) then
call MessageNotify( 'M', module_name, 'Minimum value : V(%d,%d,%d) = %f.', i = (/ mini, minj, mink /), d = (/ minval /) )
end if
if ( VelMax < maxval ) then
call MessageNotify( 'M', module_name, 'Maximum value : V(%d,%d,%d) = %f.', i = (/ maxi, maxj, maxk /), d = (/ maxval /) )
end if
i = 0
j = 1
k = 1
minval = xyz_Temp(i,j,k)
maxval = xyz_Temp(i,j,k)
mini = i
minj = j
mink = k
maxi = i
maxj = j
maxk = k
do k = 1, kmax
do j = 1, jmax
do i = 0, imax-1
if ( xyz_Temp(i,j,k) < minval ) then
minval = xyz_Temp(i,j,k)
mini = i
minj = j
mink = k
end if
if ( maxval < xyz_Temp(i,j,k) ) then
maxval = xyz_Temp(i,j,k)
maxi = i
maxj = j
maxk = k
end if
end do
end do
end do
if ( minval < TempMin ) then
call MessageNotify( 'M', module_name, 'Minimum value : Temp(%d,%d,%d) = %f.', i = (/ mini, minj, mink /), d = (/ minval /) )
end if
if ( TempMax < maxval ) then
call MessageNotify( 'M', module_name, 'Maximum value : Temp(%d,%d,%d) = %f.', i = (/ maxi, maxj, maxk /), d = (/ maxval /) )
end if
! ヒストリデータ出力
! History data output
!
! 計算時間計測一時停止
! Pause measurement of computation time
!
call TimesetClockStop( module_name )
end subroutine CheckProgVars