Subroutine : |
|
xyz_UB(0:imax-1, 1:jmax, 1:kmax) : | real(DP), intent(out)
: | $ u (t-\Delta t) $ . 東西風速. Eastward wind
|
|
xyz_VB(0:imax-1, 1:jmax, 1:kmax) : | real(DP), intent(out)
: | $ v (t-\Delta t) $ . 南北風速. Northward wind
|
|
xyz_TempB(0:imax-1, 1:jmax, 1:kmax) : | real(DP), intent(out)
: | $ T (t-\Delta t) $ . 温度. Temperature
|
|
xyz_QVapB(0:imax-1, 1:jmax, 1:kmax) : | real(DP), intent(out)
: | $ q (t-\Delta t) $ . 比湿. Specific humidity
|
|
xy_PsB(0:imax-1, 1:jmax) : | real(DP), intent(out)
: | $ p_s (t-\Delta t) $ . 地表面気圧. Surface pressure
|
|
xyz_UN(0:imax-1, 1:jmax, 1:kmax) : | real(DP), intent(out)
: | $ u (t) $ . 東西風速. Eastward wind
|
|
xyz_VN(0:imax-1, 1:jmax, 1:kmax) : | real(DP), intent(out)
: | $ v (t) $ . 南北風速. Northward wind
|
|
xyz_TempN(0:imax-1, 1:jmax, 1:kmax) : | real(DP), intent(out)
: | $ T (t) $ . 温度. Temperature
|
|
xyz_QVapN(0:imax-1, 1:jmax, 1:kmax) : | real(DP), intent(out)
: | $ q (t) $ . 比湿. Specific humidity
|
|
xy_PsN(0:imax-1, 1:jmax) : | real(DP), intent(out)
: | $ p_s (t) $ . 地表面気圧. Surface pressure
|
|
初期値データ (リスタートデータ) のサンプルを提供します.
subroutine InitDataGet( xyz_UB, xyz_VB, xyz_TempB, xyz_QVapB, xy_PsB, xyz_UN, xyz_VN, xyz_TempN, xyz_QVapN, xy_PsN )
!
! 初期値データ (リスタートデータ) のサンプルを提供します.
!
! Prepare sample data of initial data (restart data)
!
! モジュール引用 ; USE statements
!
! 座標データ設定
! Axes data settings
!
use axesset, only: x_Lon, y_Lat, z_Sigma
! $ \sigma $ レベル (整数).
! Full $ \sigma $ level
! 物理定数設定
! Physical constants settings
!
use constants, only: CpDry, GasRDry ! $ R $ [J kg-1 K-1].
! 乾燥大気の気体定数.
! Gas constant of air
! 飽和比湿計算 (Nakajima et al., 1992)
! Evaluate saturation specific humidity (Nakajima et al., 1992)
!
use saturate_nha1992, only: CalcQVapSat
! 文字列操作
! Character handling
!
use dc_string, only: LChar
! 宣言文 ; Declaration statements
!
implicit none
real(DP), intent(out):: xyz_UB (0:imax-1, 1:jmax, 1:kmax)
! $ u (t-\Delta t) $ . 東西風速. Eastward wind
real(DP), intent(out):: xyz_VB (0:imax-1, 1:jmax, 1:kmax)
! $ v (t-\Delta t) $ . 南北風速. Northward wind
real(DP), intent(out):: xyz_TempB (0:imax-1, 1:jmax, 1:kmax)
! $ T (t-\Delta t) $ . 温度. Temperature
real(DP), intent(out):: xyz_QVapB (0:imax-1, 1:jmax, 1:kmax)
! $ q (t-\Delta t) $ . 比湿. Specific humidity
real(DP), intent(out):: xy_PsB (0:imax-1, 1:jmax)
! $ p_s (t-\Delta t) $ . 地表面気圧. Surface pressure
real(DP), intent(out):: xyz_UN (0:imax-1, 1:jmax, 1:kmax)
! $ u (t) $ . 東西風速. Eastward wind
real(DP), intent(out):: xyz_VN (0:imax-1, 1:jmax, 1:kmax)
! $ v (t) $ . 南北風速. Northward wind
real(DP), intent(out):: xyz_TempN (0:imax-1, 1:jmax, 1:kmax)
! $ T (t) $ . 温度. Temperature
real(DP), intent(out):: xyz_QVapN (0:imax-1, 1:jmax, 1:kmax)
! $ q (t) $ . 比湿. Specific humidity
real(DP), intent(out):: xy_PsN (0:imax-1, 1:jmax)
! $ p_s (t) $ . 地表面気圧. Surface pressure
! Sugiyama et al. (2008) 用作業変数
! Work variables for Sugiyama et al. (2008)
!
real(DP):: xyz_PotTemp (0:imax-1, 1:jmax, 1:kmax)
! 温位. Potential temperature
real(DP):: xyz_Press (0:imax-1, 1:jmax, 1:kmax)
! 気圧. Air pressure
real(DP):: xy_TempMin (0:imax-1, 1:jmax)
! 温度の最小値. Minimum value of temperature
real(DP):: xyz_QVapSat (0:imax-1, 1:jmax, 1:kmax)
! 飽和比湿. Saturation 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
! 実行文 ; Executable statement
if ( .not. initial_data_inited ) call InitDataInit
! 微小な温度擾乱のある静止場
! Stationary field with small disturbance of temperature
!
select case ( LChar( trim(Pattern) ) )
case ( 'small disturbance of temperature' )
xyz_UB = 0.0_DP
xyz_VB = 0.0_DP
xyz_TempB = TempAvr
xy_PsB = PsAvr
xyz_QVapB = QVapAvr
! 温度に擾乱を与える
! Add perturbation to temperature
!
do k = 1, kmax
do j = 1, jmax
do i = 0, imax - 1
xyz_TempB(i,j,k) = xyz_TempB(i,j,k) + 0.1_DP * sin ( x_Lon(i) * y_Lat(j) ) - 0.1_DP * ( 1.0_DP - z_Sigma(k) )
end do
end do
end do
! ステップ $ t-\Delta t $ のデータをステップ $ t $ へコピー
! Copy data on step $ t-\Delta t $ to step $ t $
!
xyz_UN = xyz_UB
xyz_VN = xyz_VB
xyz_TempN = xyz_TempB
xy_PsN = xy_PsB
xyz_QVapN = xyz_QVapB
! AGCM5.3 のデフォルト初期値
! AGCM5.3 default initial values
!
case ( 'agcm 5.3 default' )
xyz_UB = 0.0_DP
xyz_VB = 0.0_DP
xyz_TempB = TempAvr
xy_PsB = PsAvr
xyz_QVapB = QVapAvr
! 温度に擾乱を与える
! Add perturbation to temperature
!
do k = 1, kmax
do j = 1, jmax
do i = 0, imax - 1
xyz_TempB(i,j,k) = xyz_TempB(i,j,k) + 0.1_DP * sin ( real( ( i + 1 ) * ( jmax - j + 1 ) * ( kmax - k ), DP ) / real( imax * jmax * kmax, DP ) * 10.0_DP )
end do
end do
end do
! ステップ $ t-\Delta t $ のデータをステップ $ t $ へコピー
! Copy data on step $ t-\Delta t $ to step $ t $
!
xyz_UN = xyz_UB
xyz_VN = xyz_VB
xyz_TempN = xyz_TempB
xy_PsN = xy_PsB
xyz_QVapN = xyz_QVapB
! Sugiyama et al. (2008) の初期値
! Initial values of Sugiyama et al. (2008)
!
case ( 'sugiyama et al. (2008)' )
xyz_UB = 0.0_DP
xyz_VB = 0.0_DP
xyz_TempB = TempAvr
xy_PsB = PsAvr
xyz_QVapB = QVapAvr
! 温度の計算
! Calculate temperature
!
xyz_PotTemp = TempAvr
xy_TempMin = TempAvr
do k = 1, kmax
xyz_TempB(:,:,k) = xyz_PotTemp(:,:,k) * ( z_Sigma(k) )**( GasRDry / CpDry )
if ( PsAvr * z_Sigma(k) < 1.0e+4_DP ) then
xyz_TempB(:,:,k) = xy_TempMin
else
xy_TempMin = xyz_TempB(:,:,k)
end if
end do
! 温度に擾乱を与える
! Add perturbation to temperature
!
do k = 1, kmax
do j = 1, jmax
do i = 0, imax - 1
xyz_TempB(i,j,k) = xyz_TempB(i,j,k) + 0.1_DP * sin ( real( ( i + 1 ) * ( jmax - j + 1 ) * ( kmax - k ), DP ) / real( imax * jmax * kmax, DP ) * 10.0_DP )
end do
end do
end do
! 飽和比湿計算
! Calculate saturation specific humidity
!
do k = 1, kmax
xyz_Press(:,:,k) = xy_PsB * z_Sigma(k)
end do
call CalcQVapSat( xyz_TempB, xyz_Press, xyz_QVapSat ) ! (out)
!!$ call PhySatNhaCreate( &
!!$ & phy_sat_nha = phy_sat, & ! (out)
!!$ & imax = imax, jmax = jmax, kmax = kmax, & ! (in)
!!$ & EpsV = EpsV, & ! (in)
!!$ & err = err ) ! (out)
!!$
!!$ do k = 0, kmax - 1
!!$ xyz_Press(:,:,k) = xy_Ps * z_Sigma(k)
!!$ end do
!!$
!!$ call CalcQVapSat( &
!!$ & phy_sat_nha = phy_sat, & ! (in)
!!$ & xyz_Temp = xyz_Temp, & ! (in)
!!$ & xyz_Press = xyz_Press, & ! (in)
!!$ & xyz_QVapSat = xyz_QVapSat, & ! (out)
!!$ & err = err ) ! (out)
! 比湿の計算
! Calculate specific humidity
!
where ( xyz_QVapB > xyz_QVapSat * 0.75 )
xyz_QVapB = xyz_QVapSat * 0.75
end where
! ステップ $ t-\Delta t $ のデータをステップ $ t $ へコピー
! Copy data on step $ t-\Delta t $ to step $ t $
!
xyz_UN = xyz_UB
xyz_VN = xyz_VB
xyz_TempN = xyz_TempB
xy_PsN = xy_PsB
xyz_QVapN = xyz_QVapB
end select
end subroutine InitDataGet