Subroutine : |
|
xy_Ps(0:imax-1, 1:jmax) : | real(DP), intent(in)
: | $ p_s (t-\Delta t) $ . 地表面気圧. Surface pressure
|
|
xyz_Temp(0:imax-1, 1:jmax, 1:kmax) : | real(DP), intent(in)
: | $ T $ . 温度. Temperature
|
|
xyr_Temp(0:imax-1, 1:jmax, 0:kmax) : | real(DP), intent(out), optional
: | $ hat{T} $ . 温度 (半整数レベル). Temperature (half level)
|
|
xyz_Press(0:imax-1, 1:jmax, 1:kmax) : | real(DP), intent(out), optional
: | $ p $ . 気圧 (整数レベル). Air pressure (full level)
|
|
xyr_Press(0:imax-1, 1:jmax, 0:kmax) : | real(DP), intent(out), optional
: | $ hat{p} $ . 気圧 (半整数レベル). Air pressure (half level)
|
|
xyz_Height(0:imax-1, 1:jmax, 1:kmax) : | real(DP), intent(out), optional
: | 高度 (整数レベル). Height (full level)
|
|
xyr_Height(0:imax-1, 1:jmax, 0:kmax) : | real(DP), intent(out), optional
: | 高度 (半整数レベル). Height (half level)
|
|
xyz_Exner(0:imax-1, 1:jmax, 1:kmax) : | real(DP), intent(out), optional
: | Exner 関数 (整数レベル). Exner function (full level)
|
|
xyr_Exner(0:imax-1, 1:jmax, 0:kmax) : | real(DP), intent(out), optional
: | Exner 関数 (半整数レベル). Exner function (half level)
|
|
温度の半整数σレベルの補間, 気圧と高度の算出,
エクスナー関数の計算を行います.
Interpolate temperature on half sigma level, and calculate pressure and
height, and calculate exner function.
subroutine AuxVars( xy_Ps, xyz_Temp, xyr_Temp, xyz_Press, xyr_Press, xyz_Height, xyr_Height, xyz_Exner, xyr_Exner )
!
! 温度の半整数σレベルの補間, 気圧と高度の算出,
! エクスナー関数の計算を行います.
!
! Interpolate temperature on half sigma level,
! and calculate pressure and height,
! and calculate exner function.
! モジュール引用 ; USE statements
!
! 座標データ設定
! Axes data settings
!
use axesset, only: z_Sigma, r_Sigma, z_DelSigma, r_DelSigma
! $ \Delta \sigma $ (半整数).
! $ \Delta \sigma $ (Half)
! 物理定数設定
! Physical constants settings
!
use constants, only: Grav, GasRDry, CpDry
! $ C_p $ [J kg-1 K-1].
! 乾燥大気の定圧比熱.
! Specific heat of air at constant pressure
! 時刻管理
! Time control
!
use timeset, only: TimesetClockStart, TimesetClockStop
! 宣言文 ; Declaration statements
!
implicit none
real(DP), intent(in):: xy_Ps (0:imax-1, 1:jmax)
! $ p_s (t-\Delta t) $ . 地表面気圧. Surface pressure
real(DP), intent(in):: xyz_Temp (0:imax-1, 1:jmax, 1:kmax)
! $ T $ . 温度. Temperature
real(DP), intent(out), optional:: xyr_Temp (0:imax-1, 1:jmax, 0:kmax)
! $ \hat{T} $ . 温度 (半整数レベル).
! Temperature (half level)
real(DP), intent(out), optional:: xyz_Press (0:imax-1, 1:jmax, 1:kmax)
! $ p $ . 気圧 (整数レベル).
! Air pressure (full level)
real(DP), intent(out), optional:: xyr_Press (0:imax-1, 1:jmax, 0:kmax)
! $ \hat{p} $ . 気圧 (半整数レベル).
! Air pressure (half level)
real(DP), intent(out), optional:: xyz_Height (0:imax-1, 1:jmax, 1:kmax)
! 高度 (整数レベル).
! Height (full level)
real(DP), intent(out), optional:: xyr_Height (0:imax-1, 1:jmax, 0:kmax)
! 高度 (半整数レベル).
! Height (half level)
real(DP), intent(out), optional:: xyz_Exner (0:imax-1, 1:jmax, 1:kmax)
! Exner 関数 (整数レベル).
! Exner function (full level)
real(DP), intent(out), optional:: xyr_Exner (0:imax-1, 1:jmax, 0:kmax)
! Exner 関数 (半整数レベル).
! Exner function (half level)
! 作業変数
! Work variables
!
real(DP):: xyz_PressWork (0:imax-1, 1:jmax, 1:kmax)
! $ p $ . 気圧 (整数レベル).
! Air pressure (full level)
real(DP):: xyr_PressWork (0:imax-1, 1:jmax, 0:kmax)
! $ \hat{p} $ . 気圧 (半整数レベル).
! Air pressure (half level)
integer:: k ! 鉛直方向に回る DO ループ用作業変数
! Work variables for DO loop in vertical direction
! 実行文 ; Executable statement
!
! 計算時間計測開始
! Start measurement of computation time
!
call TimesetClockStart( module_name )
! 初期化
! Initialization
!
if ( .not. auxiliary_inited ) call AuxInit
! 温度の補間
! Interpolate temperature
!
if ( present( xyr_Temp ) ) then
do k = 2, kmax
xyr_Temp(:,:,k-1) = z_TempInpolM(k) * xyz_Temp(:,:,k-1) + z_TempInpol (k) * xyz_Temp(:,:,k)
end do
xyr_Temp(:,:,kmax) = xyz_Temp(:,:,kmax)
xyr_Temp(:,:,0) = xyz_Temp(:,:,1)
end if
! 気圧の計算
! Calculate pressure
!
if ( present( xyz_Press ) ) then
do k = 1, kmax
xyz_Press(:,:,k) = xy_Ps * z_Sigma(k)
end do
end if
if ( present( xyr_Press ) ) then
do k = 0, kmax
xyr_Press(:,:,k) = xy_Ps * r_Sigma(k)
end do
end if
! 高度の計算
! Calculate height
!
if ( present( xyz_Height ) ) then
xyz_Height(:,:,1) = GasRDry / Grav * xyz_Temp(:,:,1) * ( 1. - z_Sigma(1) )
do k = 2, kmax
xyz_Height(:,:,k) = xyz_Height(:,:,k-1) + GasRDry / Grav * xyr_Temp(:,:,k-1) * r_DelSigma(k-1) / r_Sigma(k-1)
end do
end if
if ( present( xyr_Height ) ) then
xyr_Height = 0.
do k = 1, kmax
xyr_Height(:,:,k) = xyr_Height(:,:,k-1) + GasRDry / Grav * xyz_Temp(:,:,k) * z_DelSigma(k) / z_Sigma(k)
end do
end if
! エクスナー関数の計算
! Calculate exner function
!
if ( present( xyz_Exner ) ) then
if ( present( xyz_Press ) ) then
xyz_PressWork = xyz_Press
else
do k = 1, kmax
xyz_PressWork(:,:,k) = xy_Ps * z_Sigma(k)
end do
end if
xyz_Exner = ( xyz_PressWork / RefPress ) ** ( GasRDry / CpDry )
end if
if ( present( xyr_Exner ) ) then
if ( present( xyr_Press ) ) then
xyr_PressWork = xyr_Press
else
do k = 0, kmax
xyr_PressWork(:,:,k) = xy_Ps * r_Sigma(k)
end do
end if
xyr_Exner = ( xyr_PressWork / RefPress ) ** ( GasRDry / CpDry )
end if
! 計算時間計測一時停止
! Pause measurement of computation time
!
call TimesetClockStop( module_name )
end subroutine AuxVars