Class | MoistBuoyancy |
In: |
moist/moistbuoyancy.f90
|
Subroutine : |
subroutine MoistBuoy_Init( ) !暗黙の型宣言禁止 implicit none !変数定義 integer :: s real(8), allocatable :: xza_MixRtBasicZPerMolWt(:,:,:) !基本場の混合比 / 分子量 !----------------------------------------------------------- ! 混合距離 !----------------------------------------------------------- ! MixLen = sqrt(DelX * DelZ) MixLen = min(DelX, DelZ) !----------------------------------------------------------- ! 作業配列の初期化. !----------------------------------------------------------- allocate( xza_MixRtBasicZPerMolWt(DimXMin:DimXMax, DimZMin:DimZMax, GasNum), xr_MixRtBasicZPerMolWt(DimXMin:DimXMax, DimZMin:DimZMax), xz_MixRtBasicZPerMolWt(DimXMin:DimXMax, DimZMin:DimZMax), xr_MixRtBasicZ(DimXMin:DimXMax, DimZMin:DimZMax), xz_MixRtBasicZ(DimXMin:DimXMax, DimZMin:DimZMax) ) xza_MixRtBasicZPerMolWt = 0.0d0 xr_MixRtBasicZPerMolWt = 0.0d0 xz_MixRtBasicZPerMolWt = 0.0d0 xr_MixRtBasicZ = 0.0d0 xz_MixRtBasicZ = 0.0d0 if (cpurank == 0) then call MessageNotify( "M", "MoistBuoy_Init", "MolWtWet = %f", d=(/pack(MolWtWet(:), .true.) /) ) end if do s = 1, GasNum xza_MixRtBasicZPerMolWt(:,:,s) = xza_MixRtBasicZ(:,:,IdxG(s)) / MolWtWet(IdxG(s)) end do xz_MixRtBasicZPerMolWt = sum(xza_MixRtBasicZPerMolWt, 3) xr_MixRtBasicZPerMolWt = xr_avr_xz( sum(xza_MixRtBasicZPerMolWt, 3) ) xz_MixRtBasicZ = sum(xza_MixRtBasicZ, 3) xr_MixRtBasicZ = xr_avr_xz( sum(xza_MixRtBasicZ, 3) ) end subroutine MoistBuoy_Init
Function : | |||
xr_BuoyDrag(DimXMin:DimXMax, DimZMin:DimZMax) : | real(8)
| ||
xza_MixRt(DimXMin:DimXMax, DimZMin:DimZMax, SpcNum) : | real(8), intent(in)
|
鉛直方向の運動方程式に現れる浮力項のうち, 引きづりのの効果だけを求める
function xr_BuoyDrag(xza_MixRt) ! ! 鉛直方向の運動方程式に現れる浮力項のうち, ! 引きづりのの効果だけを求める ! !暗黙の型宣言禁止 implicit none !変数定義 real(8), intent(in) :: xza_MixRt(DimXMin:DimXMax, DimZMin:DimZMax, SpcNum) !凝縮成分の混合比 real(8) :: xr_BuoyDrag(DimXMin:DimXMax, DimZMin:DimZMax) !浮力項(分子量効果) !初期化 xr_BuoyDrag = 0.0d0 !浮力項の計算 xr_BuoyDrag = - Grav * xr_avr_xz( sum(xza_MixRt(:,:,GasNum+1:SpcNum), 3) ) / ( 1.0d0 + xr_MixRtBasicZ ) call StoreBuoyDrag(xz_avr_xr(xr_BuoyDrag)) end function xr_BuoyDrag
Function : | |||
xr_BuoyMolWt(DimXMin:DimXMax, DimZMin:DimZMax) : | real(8)
| ||
xza_MixRt(DimXMin:DimXMax, DimZMin:DimZMax, SpcNum) : | real(8), intent(in)
|
鉛直方向の運動方程式に現れる浮力項のうち, 分子量の効果だけを求める
function xr_BuoyMolWt(xza_MixRt) ! ! 鉛直方向の運動方程式に現れる浮力項のうち, ! 分子量の効果だけを求める ! !暗黙の型宣言禁止 implicit none !変数定義 real(8), intent(in) :: xza_MixRt(DimXMin:DimXMax, DimZMin:DimZMax, SpcNum) !凝縮成分の混合比 real(8) :: xr_BuoyMolWt(DimXMin:DimXMax, DimZMin:DimZMax) !浮力項(分子量効果) real(8) :: xza_MixRtPerMolWt(DimXMin:DimXMax, DimZMin:DimZMax, GasNum) !混合比/分子量 integer :: s !初期化 xr_BuoyMolWt = 0.0d0 !作業配列の初期化. 気体のみ利用 do s = 1, GasNum xza_MixRtPerMolWt(:,:,s) = xza_MixRt(:,:,IdxG(s)) / MolWtWet(IdxG(s)) end do !浮力項の計算 xr_BuoyMolWt = + Grav * xr_avr_xz( sum(xza_MixRtPerMolWt, 3) ) / ( 1.0d0 / MolWtDry + xr_MixRtBasicZPerMolWt ) - Grav * xr_avr_xz( sum(xza_MixRt(:,:,1:GasNum), 3) ) / ( 1.0d0 + xr_MixRtBasicZ ) call StoreBuoyMolWt(xz_avr_xr(xr_BuoyMolWt)) end function xr_BuoyMolWt
Function : | |||
xz_BuoyMoistKm(DimXMin:DimXMax, DimZMin:DimZMax) : | real(8) | ||
xz_PotTemp(DimXMin:DimXMax, DimZMin:DimZMax) : | real(8), intent(in)
| ||
xz_Exner(DimXMin:DimXMax, DimZMin:DimZMax) : | real(8), intent(in)
| ||
xza_MixRt(DimXMin:DimXMax, DimZMin:DimZMax, SpcNum) : | real(8), intent(in)
|
function xz_BuoyMoistKm(xz_PotTemp, xz_Exner, xza_MixRt) ! !暗黙の型宣言禁止 implicit none !変数定義 real(8), intent(in) :: xz_PotTemp(DimXMin:DimXMax, DimZMin:DimZMax) !温位 real(8), intent(in) :: xz_Exner(DimXMin:DimXMax, DimZMin:DimZMax) !無次元圧力 real(8), intent(in) :: xza_MixRt(DimXMin:DimXMax, DimZMin:DimZMax, SpcNum) !凝縮成分の混合比 real(8) :: xza_MixRtAll(DimXMin:DimXMax, DimZMin:DimZMax, SpcNum) !凝縮成分の混合比 real(8) :: xza_MixRtAll2(DimXMin:DimXMax, DimZMin:DimZMax, SpcNum) !凝縮成分の混合比 real(8) :: xz_BuoyMoistKm(DimXMin:DimXMax, DimZMin:DimZMax) ! real(8) :: xza_LatentHeat(DimXMin:DimXMax, DimZMin:DimZMax, GasNum) !潜熱 real(8) :: xz_TempAll(DimXMin:DimXMax, DimZMin:DimZMax) !温度 real(8) :: xz_EffHeat(DimXMin:DimXMax, DimZMin:DimZMax) ! real(8) :: xz_EffPotTemp(DimXMin:DimXMax, DimZMin:DimZMax) real(8) :: xz_EffMolWt(DimXMin:DimXMax, DimZMin:DimZMax) ! real(8) :: xza_MixRtPerMolWt(DimXMin:DimXMax, DimZMin:DimZMax, GasNum) !混合比/分子量 integer :: s !温度, 圧力, 混合比の全量を求める !擾乱成分と平均成分の足し算 xz_TempAll = ( xz_PotTemp + xz_PotTempBasicZ ) * ( xz_Exner + xz_ExnerBasicZ ) xza_MixRtAll = xza_MixRtBasicZ + xza_MixRt xza_LatentHeat = 0.0d0 !作業配列の初期化. 気体のみ利用 do s = 1, GasNum xza_MixRtPerMolWt(:,:,s) = xza_MixRt(:,:,IdxG(s)) / MolWtWet(IdxG(s)) end do !温度の効果 xz_EffPotTemp = xz_PotTemp / xz_PotTempBasicZ !分子量効果 + 引きづりの効果 xz_EffMolWt = + sum(xza_MixRtPerMolWt, 3) / ( 1.0d0 / MolWtDry + xz_MixRtBasicZPerMolWt ) - sum(xza_MixRt, 3) / ( 1.0d0 + xz_MixRtBasicZ ) !蒸気が蒸発する場合の潜熱を計算 ! 分子量の部分はいつでも効くが潜熱は飽和していないと効かないので, ! 雲の混合比がゼロの時には, 潜熱の寄与はゼロとなるように調節している xza_MixRtAll2 = xza_MixRtAll ! xza_MixRtAll2(:,:,IdxNH3) = xza_MixRtAll(:,:,IdxNH3) - xza_MixRtAll(:,:,IdxH2S) do s = 1, CondNum xza_LatentHeat(:,:,s) = xz_LatentHeat( SpcWetID(IdxCC(s)), xz_TempAll ) * xza_MixRtAll2(:,:,IdxCG(s)) * ( 5.0d-1 + sign( 5.0d-1, (xza_MixRtAll2(:,:,IdxCC(s)) - 1.0d-4) ) ) end do xz_EffHeat = ( sum( xza_LatentHeat, 3 ) * xz_EffMolWtBasicZ ) / ( CpDry * xz_ExnerBasicZ ) !乱流拡散係数の時間発展式の浮力項を決める xz_BuoyMoistKm = - 3.0d0 * Grav * ( Cm ** 2.0d0 ) * ( MixLen ** 2.0d0 ) * xz_avr_xr( xr_dz_xz( xz_EffHeat + xz_PotTempBasicZ / xz_EffMolWtBasicZ * ( 1.0d0 + xz_EffPotTemp + xz_EffMolWt ) ) ) / ( 2.0d0 * xz_PotTempBasicZ / xz_EffMolWtBasicZ) end function xz_BuoyMoistKm