!================================================= ! 2D cumulus model - kaminari ! ! Author : TAKAHASHI Koko ! Date : 2003/12/24 最終更新 ! 2003/09/01 新規作成 ! Note : - 単位は MKS 系 ! - 2次元 (x-z) ! - 計算領域 ! i = 0:im ! k = 0:km ! - 境界計算用の配列 ! i = -1, -2, im+1, im+2 ! k = -1, -2, km+1, km+2 ! - 側面境界は周期境界条件 ! - 出力データ形式: NetCDF 形式 ! - 無次元圧力 = エクスナー関数 ! !================================================= program kaminari_2d !------------------------------------------------- ! 変数・定数の設定 !------------------------------------------------- use gtool_history implicit none ! 空間解像度設定: 格子点数 im+1, km+1 integer(8), parameter :: im = 23 ! 格子点の設定 (x) integer(8), parameter :: km = 19 ! 格子点の設定 (z) integer(8), parameter :: km_t = 15 ! 格子点の設定 ! 座標変数 real(8), parameter :: xmin = 0.0d0 ! モデル領域の左側面 real(8), parameter :: xmax = 2.4d4 ! モデル領域の左側面 real(8), parameter :: dx = (xmax-xmin)/(im+1) ! x の格子間隔 real(8), parameter :: zmin = 0.0d0 ! モデル領域の底 real(8), parameter :: zmax = 1.0d4 ! モデル領域の高さ real(8), parameter :: dz = (zmax-zmin)/(km+1) ! z^{*} の格子間隔 ! 時間変数 integer(8), parameter :: nts = 5 ! 短い時間ステップ数 integer(8), parameter :: ntb = 100 ! 長い時間ステップ数 real(8), parameter :: dts = 2.0d0 ! 短い時間間隔 d tau ! real(8), parameter :: dtb = nts*dts ! 長い時間間隔 dt real(8), parameter :: dtb = 1.0d1 ! 長い時間間隔 dt integer(8) :: i, k ! do 変数/空間 integer(8) :: its ! do 変数/時間 integer(8) :: itb ! do 変数/時間 ! ベクトル用格子 real(8) :: x_u(-2:im+2,-2:km+2) ! 地形に沿った座標系での x 座標 real(8) :: z_u(-2:im+2,-2:km+2) ! 地形に沿った座標系での z 座標 real(8) :: x_w(-2:im+2,-2:km+3) ! 地形に沿った座標系での x 座標 real(8) :: z_w(-2:im+2,-2:km+3) ! 地形に沿った座標系での z 座標 ! スカラー用格子 real(8) :: x_s(-2:im+2,-2:km+2) ! 地形に沿った座標系での x 座標 real(8) :: z_s(-2:im+2,-2:km+2) ! 地形に沿った座標系での z 座標 !--- 変数 !--- 基本場の変数 real(8) :: pi_bs(-2:im+2,-2:km+2) ! 無次元圧力 real(8) :: prss_bs(-2:im+2,-2:km+2) ! 圧力 real(8) :: dens_bs(-2:im+2,-2:km+2) ! 密度 real(8) :: temp_bs(-2:im+2,-2:km+2) ! 温度 real(8) :: ptemp_bs(-2:im+2,-2:km+2) ! 温位 real(8) :: vptemp_bs(-2:im+2,-2:km+2) ! 仮温位 real(8) :: qv_bs(-2:im+2,-2:km+2) ! 水蒸気の混合比 !--- 擾乱の変数 real(8) :: u(-2:im+2,-2:km+2) ! x 方向速度 real(8) :: w(-2:im+2,-2:km+3) ! z 方向速度 real(8) :: omg(-2:im+2,-2:km+3) ! z^{*} 方向速度 real(8) :: pi(-2:im+2,-2:km+2) ! 無次元圧力 !--- 基本場 + 擾乱場の変数 real(8) :: pi_all(-2:im+2,-2:km+2) ! 無次元圧力 real(8) :: temp(-2:im+2,-2:km+2) ! 温度 real(8) :: prss(-2:im+2,-2:km+2) ! 圧力 real(8) :: dens(-2:im+2,-2:km+2) ! 密度 real(8) :: ptemp(-2:im+2,-2:km+2) ! 温位 real(8) :: vptemp(-2:im+2,-2:km+2) ! 仮温位 real(8) :: qv(-2:im+2,-2:km+2) ! 水蒸気の混合比 ! real(8) :: qc(-2:im+2,-2:km+2) ! 雲水の混合比 ! real(8) :: qr(-2:im+2,-2:km+2) ! 雨水の混合比 ! real(8) :: qvs(-2:im+2,-2:km+2) ! 水蒸気の飽和混合比 ! real(8) :: km_sub(-2:im+2,-2:km+2) ! 渦混合係数 K_{m} !--- t - dt での値 ! real(8) :: u_old(-2:im+2,-2:km+3) ! x 方向速度 ! real(8) :: w_old(-2:im+2,-2:km+3) ! z 方向速度 real(8) :: pi_old(-2:im+2,-2:km+2) ! 無次元圧力 real(8) :: ptemp_old(-2:im+2,-2:km+2) ! 温位 ! real(8) :: qv_old(-2:im+2,-2:km+2) ! 水蒸気の混合比 ! real(8) :: qc_old(-2:im+2,-2:km+2) ! 雲水の混合比 ! real(8) :: qr_old(-2:im+2,-2:km+2) ! 雨水の混合比 ! real(8) :: qvs_old(-2:im+2,-2:km+2) ! 水蒸気の飽和混合比 ! real(8) :: km_sub_old(-2:im+2,-2:km+2) ! サブグリッド運動エネルギー !--- t - 2*dt での値 real(8) :: ptemp_old2(-2:im+2,-2:km+2)! 温位 ! real(8) :: qv_old2(-2:im+2,-2:km+2) ! 水蒸気の混合比 ! real(8) :: qc_old2(-2:im+2,-2:km+2) ! 雲水の混合比 ! real(8) :: qr_old2(-2:im+2,-2:km+2) ! 雨水の混合比 ! real(8) :: qvs_old2(-2:im+2,-2:km+2) ! 水蒸気の飽和混合比 ! real(8) :: km_sub_old2(-2:im+2,-2:km+2) ! サブグリッド運動エネルギー !--- 計算領域のみの変数 real(8) :: u_cal(0:im,0:km) ! x 方向速度 real(8) :: omg_cal(0:im,0:km+1) ! z 方向速度 real(8) :: prss_cal(0:im,0:km) ! 圧力 real(8) :: pi_cal(0:im,0:km) ! 無次元圧力 real(8) :: temp_cal(0:im,0:km) ! 温度 real(8) :: ptemp_cal(0:im,0:km) ! 温位 real(8) :: dens_cal(0:im,0:km) ! 密度 !--- 移流項, コリオリ項, 浮力項, 拡散項 real(8) :: u_adv(-2:im+2,-2:km+2) ! x 方向速度 real(8) :: u_cori(-2:im+2,-2:km+2) ! x 方向速度 real(8) :: u_trb(-2:im+2,-2:km+2) ! x 方向速度 real(8) :: w_adv(-2:im+2,-2:km+3) ! x 方向速度 real(8) :: w_buoy(-2:im+2,-2:km+3) ! x 方向速度 real(8) :: w_trb(-2:im+2,-2:km+3) ! x 方向速度 !--- 音波減衰項 real(8) :: div_x_u(0:im+1,0:km+1) ! x 方向微分 real(8) :: div_z_u(0:im+1,0:km+1) ! z^{*} 方向微分 real(8) :: div_z_w(0:im+1,0:km+1) ! z^{*} 方向微分 !--- その他の変数 real(8) :: g_sqrt(-2:im+2,-2:km+2) ! ヤコビアンの1/2乗 real(8) :: g_sqrt_x(-2:im+2,-2:km+2) ! g_sqrtをx方向に平均化 real(8) :: g_sqrt_z(-2:im+2,-2:km+2) ! g_sqrtをz^{*}方向に平均化 real(8) :: g_sqrt_xz(-2:im+2,-2:km+2) ! g_sqrtをz^{*}方向に平均化 real(8) :: g13(-2:im+2,-2:km+2) ! ヤコビアンの13成分 real(8) :: g13x(-2:im+2,-2:km+2) ! g13をx方向に平均化 real(8) :: g13z(-2:im+2,-2:km+2) ! g13をz^{*}方向に平均化 real(8) :: g13xz(-2:im+2,-2:km+2) ! g13をxz^{*}方向に平均化 !--- 物理パラメータ ! サブルーチン内だけで使う定数もここで定義 real(8), parameter :: prss_sfc = 1.0d5 ! 地表面での圧力 [Pa] real(8), parameter :: rd = 2.87d2 ! 乾燥空気の気体定数 real(8), parameter :: cp = 1.952d3 ! 定圧比熱 real(8), parameter :: cv = 1.463d3 ! 定積比熱 real(8), parameter :: grv = 9.8d0 ! 重力 real(8), parameter :: alp = 5.0d-8*dx*dx/dts ! 定数 ! real(8), parameter :: alp = 0.0d0 ! 定数 ! real(8), parameter :: eps = 6.22d-1 ! 定数 ! real(8), parameter :: lv = 5.8d2 ! 蒸発の潜熱 関数にする? real(8), parameter :: beta = 1.0d0 ! 鉛直陰解法の係数 real(8), parameter :: nuh = 1.0d-2*dx*dx/dtb ! 水平方向の数値粘性項の係数 real(8), parameter :: nuv = 1.0d-2*dz*dz/dtb ! 鉛直方向の数値粘性項の係数 ! real(8), parameter :: cm = 2d-1 ! 比例定数 ! 混合距離: parameter だとべき乗計算するとエラーになる ! real(8) :: ml ! 混合距離 ! real(8),parameter :: ml = sqrt(dx*dz) ! 混合距離 real(8), parameter :: gamma_d = grv/cp ! 乾燥断熱減率 !--- 出力 (gtool history) 用 type(GT_HISTORY) :: vector_u, vector_u_cal type(GT_HISTORY) :: vector_omg, vector_omg_cal type(GT_HISTORY) :: scalar, scalar_cal ! ml = sqrt(dx*dz) !------------------------------------------------- ! 地形関連(マップファクター)の設定 !------------------------------------------------- !--- ヤコビアン !--- 1 行目: 入力, 2 行目: 出力 call jacobian(im,km,g_sqrt,g_sqrt_x,g_sqrt_z,g_sqrt_xz, & & g13,g13x,g13z,g13xz) !------------------------------------------------- ! x-z^{*} 座標の設定 !------------------------------------------------- !--- ベクトル量 u do k = -2, km+2 do i = -2, im+2 x_u(i,k) = dx*i z_u(i,k) = dz*(k + 5.0d-1) end do end do !--- ベクトル量 w do k = -2, km+3 do i = -2, im+2 x_w(i,k) = dx*(i + 5.0d-1) z_w(i,k) = dz*k end do end do !--- スカラー量 do k = -2, km+2 do i = -2, im+2 x_s(i,k) = dx*(i + 5.0d-1) z_s(i,k) = dz*(k + 5.0d-1) end do end do !--- 出力 call output_gtool4_init !------------------------------------------------- ! 基本場 !------------------------------------------------- !--- 1 行目: 入力, 2,3 行目: 出力 call base(im,km,km_t,dz,prss_sfc,rd,cp,cv,grv,gamma_d,g_sqrt,& & qv_bs,prss_bs,pi_bs,temp_bs,ptemp_bs, & & vptemp_bs,dens_bs) !------------------------------------------------- ! 基本場の境界条件 !--- 1 行目: 入力, 2,3 行目: 出力 call boundary_bs(im,km, & & qv_bs,prss_bs,pi_bs,temp_bs,ptemp_bs, & & vptemp_bs,dens_bs) !--- 出力 call output_base_gtool4 !------------------------------------------------- ! 擾乱場の計算 !------------------------------------------------- !------------------------------------------------- ! 初期値 ! its = 0, itb = 0 !--- 速度, 圧力, 温度を与える !--- 1,2行目入力変数, 3行目出力変数 call init_value(im,km,dx,dz,cp,rd,prss_sfc,prss_bs, & & pi_bs,temp_bs, & & u,w,prss,pi,temp,ptemp,vptemp,qv) !--- 境界条件とそれより外の配列値 !--- 1行目入力変数, 2行目出力変数 call boundary(im,km, & & u,w,pi,ptemp) !--------------------- do k = -2,km+2 do i = -2,im+2 !--- 次(t + dt)の計算時に使用: t の値 pi_old(i,k) = pi(i,k) ptemp_old(i,k) = ptemp(i,k) !--- 無次元圧力 pi_all(i,k) = pi_bs(i,k) + pi(i,k) !--- 密度 dens(i,k) = prss_sfc*pi_all(i,k)**(cv/rd)/(rd*vptemp(i,k)) end do end do !--- 地形に沿った座標系での鉛直速度 call omgw(im,km,g_sqrt_z,g13x,u,w, & & omg) !--- 計算領域のみ出力するための変数置き換え call cal_value(im,km,u,omg,prss,pi,temp,ptemp,dens, & & u_cal,omg_cal,prss_cal,pi_cal, & & temp_cal,ptemp_cal,dens_cal) !--- 出力 call output_gtool4 !------------------------------------------------- ! 長い時間の 1 ステップ目 !------------------------------------------------- !--- 運動方程式中の長い時間間隔で計算する部分 call vel_u_tb(im,km,nuh,nuv,dx,dz,u,omg, & & u_adv,u_cori,u_trb) call vel_w_tb(im,km,dx,dz,nuh,nuv,grv,ptemp_bs,ptemp, & & u,w,omg, & & w_adv,w_buoy,w_trb) !--------------------------- !--- 温位 call ptn_temp_1stp(im,km,nuh,nuv,dx,dz,dtb,u,omg, & & ptemp) !------------------------------------------------- !--- 短い時間間隔 do its = 1,nts !--- 音波減衰項 !--- 1行目入力変数, 2行目出力変数 call div_diff(im,km,dx,dz,u,w,g_sqrt,g13xz, & & div_x_u,div_z_u,div_z_w) !--- 速度 u !--- 1,2,3行目入力変数, 4行目入出力変数 call vel_u(im,km,dx,dz,cp,alp,dts,g13z,div_x_u, & & div_z_u,vptemp_bs,pi,u_adv,u_cori,u_trb, & & u) !--- 無次元圧力 pi (SSL2使用) !--- 1,2,3,4行目入力変数, 「k」と5行目入出力変数 call non_dim_pi(its,im,km,cp,cv,rd,alp,beta,dx,dz, & & dts,pi_bs,vptemp_bs,dens_bs,u,w, & & w_adv,w_buoy,w_trb,g_sqrt,g_sqrt_z, & & g13xz,div_z_w, & & pi) !--- 速度 w !--- 1,2,3行目入力変数, 4行目入出力変数 call vel_w(im,km,dts,cp,alp,beta,dz,vptemp_bs,pi, & & pi_old,g_sqrt_z,div_z_w,w_adv,w_buoy, & & w_trb, & & w) !--- 境界条件とそれより外の配列値 call boundary(im,km, & & u,w,pi,ptemp) do k = -2,km+2 do i = -2,im+2 !--- 次(t + dt)の計算時に使用: t の値 ptemp_old2(i,k) = ptemp_old(i,k) pi_old(i,k) = pi(i,k) ptemp_old(i,k) = ptemp(i,k) !--- 無次元圧力 pi_all(i,k) = pi_bs(i,k) + pi(i,k) !--- 圧力, 温度, 密度, 仮温位 call pi2prss(i,k,im,km,prss_sfc,rd,cp,pi_all,prss) temp(i,k) = ptemp(i,k)*pi_all(i,k) dens(i,k) = prss_sfc*pi_all(i,k)**(cv/rd)/(rd*vptemp(i,k)) end do end do !--- 地形に沿った座標系での鉛直速度 call omgw(im,km,g_sqrt_z,g13x,u,w, & & omg) !--- 計算領域のみ出力するための変数置き換え call cal_value(im,km,u,omg,prss,pi,temp,ptemp,dens, & & u_cal,omg_cal,prss_cal,pi_cal, & & temp_cal,ptemp_cal,dens_cal) !--- 出力 call output_gtool4 end do !------------------------------------------------- ! 長い時間の 2 ステップ目以降 !------------------------------------------------- do itb = 2,ntb !--------------------------- !--- 運動方程式中の長い時間間隔で計算する部分 call vel_u_tb(im,km,nuh,nuv,dx,dz,u,omg, & & u_adv,u_cori,u_trb) call vel_w_tb(im,km,dx,dz,nuh,nuv,grv,ptemp_bs,ptemp, & & u,w,omg, & & w_adv,w_buoy,w_trb) !--------------------------- !--- 温位 call ptn_temp(im,km,nuh,nuv,dx,dz,dtb, & & u,omg,ptemp_old2, & & ptemp) !------------------------------------------------- !--- 短い時間間隔(長い時間間隔の1ステップ目まで) do its = 1,nts !--- 音波減衰項 !--- 1行目入力変数, 2行目出力変数 call div_diff(im,km,dx,dz,u,w,g_sqrt,g13xz, & & div_x_u,div_z_u,div_z_w) !--- 速度 u !--- 1,2,3行目入力変数, 4行目入出力変数 call vel_u(im,km,dx,dz,cp,alp,dts,g13z,div_x_u, & & div_z_u,vptemp_bs,pi,u_adv,u_cori,u_trb, & & u) !--- 無次元圧力 pi (SSL2使用) !--- 1,2,3,4行目入力変数, 「k」と5行目入出力変数 call non_dim_pi(its,im,km,cp,cv,rd,alp,beta,dx,dz, & & dts,pi_bs,vptemp_bs,dens_bs,u,w, & & w_adv,w_buoy,w_trb,g_sqrt,g_sqrt_z, & & g13xz,div_z_w, & & pi) !--- 速度 w !--- 1,2,3行目入力変数, 4行目入出力変数 call vel_w(im,km,dts,cp,alp,beta,dz,vptemp_bs,pi, & & pi_old,g_sqrt_z,div_z_w,w_adv,w_buoy, & & w_trb, & & w) !--- 境界条件とそれより外の配列値 call boundary(im,km, & & u,w,pi,ptemp) do k = -2,km+2 do i = -2,im+2 !--- 次(t + dt)の計算時に使用: t の値 ptemp_old2(i,k) = ptemp_old(i,k) pi_old(i,k) = pi(i,k) ptemp_old(i,k) = ptemp(i,k) !--- 無次元圧力 pi_all(i,k) = pi_bs(i,k) + pi(i,k) !--- 圧力, 温度, 密度, 仮温位 call pi2prss(i,k,im,km,prss_sfc,rd,cp,pi_all,prss) temp(i,k) = ptemp(i,k)*pi_all(i,k) dens(i,k) = prss_sfc*pi_all(i,k)**(cv/rd)/(rd*vptemp(i,k)) end do end do !--- 地形に沿った座標系での鉛直速度 call omgw(im,km,g_sqrt_z,g13x,u,w, & & omg) !--- 計算領域のみ出力するための変数置き換え call cal_value(im,km,u,omg,prss,pi,temp,ptemp,dens, & & u_cal,omg_cal,prss_cal,pi_cal, & & temp_cal,ptemp_cal,dens_cal) !--- 出力 call output_gtool4 end do end do call output_gtool4_close contains !----------------------------------------------------------- !--- gtool4 出力関連 subroutine output_gtool4_init ! ヒストリー作成 ! ベクトル量 u call HistoryCreate( & & file='kaminari_2d_u.nc', & & title='2D cumulus model', & & source='kaminari - 2D cumulus model', & & institution='GFD_Dennou Club deepconv project', & & dims=(/'x','z','t'/), & & dimsizes=(/int(im+5,4),int(km+5,4),0/), & & longnames=(/'X-coordinate','Z-coordinate', & & ' Time '/), & & units=(/'m','m','s'/), origin=0.0, & & interval=real(dts), history=vector_u) ! ベクトル量の変数出力 call HistoryPut('x',x_u(-2:im+2,0),vector_u) call HistoryPut('z',z_u(0,-2:km+2),vector_u) ! ベクトル量 omg call HistoryCreate( & & file='kaminari_2d_omg.nc', & & title='2D cumulus model', & & source='kaminari - 2D cumulus model', & & institution='GFD_Dennou Club deepconv project', & & dims=(/'x','z','t'/), & & dimsizes=(/int(im+5,4),int(km+6,4),0/), & & longnames=(/'X-coordinate','Z-coordinate', & & ' Time '/), & & units=(/'m','m','s'/), origin=0.0, & & interval=real(dts), history=vector_omg) ! ベクトル量の変数出力 call HistoryPut('x',x_w(-2:im+2,0),vector_omg) call HistoryPut('z',z_w(0,-2:km+3),vector_omg) ! スカラー量 call HistoryCreate( & & file='kaminari_2d_scl.nc', & & title='2D cumulus model', & & source='kaminari - 2D cumulus model', & & institution='GFD_Dennou Club deepconv project', & & dims=(/'x','z','t'/), & & dimsizes=(/int(im+5,4),int(km+5,4),0/), & & longnames=(/'X-coordinate','Z-coordinate', & & ' Time '/), & & units=(/'m','m','s'/), origin=0.0, & & interval=real(dts),history=scalar) ! スカラー量の変数出力 call HistoryPut('x',x_s(-2:im+2,0),scalar) call HistoryPut('z',z_s(0,-2:km+2),scalar) !--- 計算領域のみ ! ベクトル量 u call HistoryCreate( & & file='kaminari_2d_u_cal.nc', & & title='2D cumulus model', & & source='kaminari - 2D cumulus model', & & institution='GFD_Dennou Club deepconv project', & & dims=(/'x','z','t'/), & & dimsizes=(/int(im+1,4),int(km+1,4),0/), & & longnames=(/'X-coordinate','Z-coordinate', & & ' Time '/), & & units=(/'m','m','s'/), origin=0.0, & & interval=real(dts), history=vector_u_cal) ! ベクトル量の変数出力 call HistoryPut('x',x_u(0:im,0),vector_u_cal) call HistoryPut('z',z_u(0,0:km),vector_u_cal) ! ベクトル量 omg call HistoryCreate( & & file='kaminari_2d_omg_cal.nc', & & title='2D cumulus model', & & source='kaminari - 2D cumulus model', & & institution='GFD_Dennou Club deepconv project', & & dims=(/'x','z','t'/), & & dimsizes=(/int(im+1,4),int(km+2,4),0/), & & longnames=(/'X-coordinate','Z-coordinate', & & ' Time '/), & & units=(/'m','m','s'/), origin=0.0, & & interval=real(dts), history=vector_omg_cal) ! ベクトル量の変数出力 call HistoryPut('x',x_w(0:im,0),vector_omg_cal) call HistoryPut('z',z_w(0,0:km+1),vector_omg_cal) ! スカラー量 call HistoryCreate( & & file='kaminari_2d_scl_cal.nc', & & title='2D cumulus model', & & source='kaminari - 2D cumulus model', & & institution='GFD_Dennou Club deepconv project', & & dims=(/'x','z','t'/), & & dimsizes=(/int(im+1,4),int(km+1,4),0/), & & longnames=(/'X-coordinate','Z-coordinate', & & ' Time '/), & & units=(/'m','m','s'/), origin=0.0, & & interval=real(dts),history=scalar_cal) ! スカラー量の変数出力 call HistoryPut('x',x_s(0:im,0),scalar_cal) call HistoryPut('z',z_s(0,0:km),scalar_cal) !---------------------- ! 変数定義 ! 基本場の無次元圧力 call HistoryAddVariable( & & varname='pi_bs', dims=(/'x','z'/), & & longname='nondimensional pressure (base)', & & units='1', xtype='double' ,history=scalar) ! 基本場の圧力 call HistoryAddVariable( & & varname='prss_bs', dims=(/'x','z'/), & & longname='pressure (base)', units='Pa', & & xtype='double', history=scalar) ! 基本場の密度 call HistoryAddVariable( & & varname='dens_bs', dims=(/'x','z'/), & & longname='density (base)', units='kg/m3', & & xtype='double', history=scalar) ! 基本場の水蒸気混合比 call HistoryAddVariable( & & varname='qv_bs', dims=(/'x','z'/), & & longname='mixing ratio of water vapor (base)', & & units='g/g', xtype='double', history=scalar) ! 基本場の温度 call HistoryAddVariable( & & varname='temp_bs', dims=(/'x','z'/), & & longname='temperature (base)', units='K', & & xtype='double', history=scalar) ! 基本場の温位 call HistoryAddVariable( & & varname='ptemp_bs', dims=(/'x','z'/), & & longname='potential temperature (base)', & & units='K', xtype='double', history=scalar) ! 速度 u call HistoryAddVariable( & & varname='u', dims=(/'x','z','t'/), & & longname='u-velocity', units='m/s', & & xtype='double', history=vector_u) ! 速度 w call HistoryAddVariable( & & varname='omg', dims=(/'x','z','t'/), & & longname='w-velocity', units='m/s', & & xtype='double', history=vector_omg) ! 無次元圧力 call HistoryAddVariable( & & varname='pi', dims=(/'x','z','t'/), & & longname='nondimensional pressure', units='1', & & xtype='double', history=scalar) ! 圧力 call HistoryAddVariable( & & varname='prss', dims=(/'x','z','t'/), & & longname='pressure', units='Pa', xtype='double', & & history=scalar) ! 温度 call HistoryAddVariable( & & varname='temp', dims=(/'x','z','t'/), & & longname='temperature', units='K', & & xtype='double', history=scalar) ! 温位 call HistoryAddVariable( & & varname='ptemp', dims=(/'x','z','t'/), & & longname='potential temperature', units='K', & & xtype='double', history=scalar) ! 密度 call HistoryAddVariable( & & varname='dens', dims=(/'x','z','t'/), & & longname='density', units='kg/m^3', & & xtype='double', history=scalar) ! 水蒸気混合比 ! call HistoryAddVariable( & ! & varname='qv', dims=(/'x','z','t'/), & ! & longname='mixing ratio of water vapor', & ! & units='g/g', xtype='double', history=scalar) ! 雲水混合比 ! call HistoryAddVariable( & ! & varname='qc', dims=(/'x','z','t'/), & ! & longname='mixing ratio of cloud drops', & ! & units='g/g', xtype='double', history=scalar) ! 雨水混合比 ! call HistoryAddVariable( & ! & varname='qr', dims=(/'x','z','t'/), & ! & longname='mixing ratio of rainwater', & ! & units='g/g', xtype='double', history=scalar) ! 飽和水蒸気混合比 ! call HistoryAddVariable( & ! & varname='qvs', dims=(/'x','z','t'/), & ! & longname='saturation mixing ratio', & ! & units='g/g', xtype='double', history=scalar) ! 渦混合係数 ! call HistoryAddVariable( & ! & varname='km_sub', dims=(/'x','z','t'/), & ! & longname='momentum eddy mixing coefficient', & ! & units='1', xtype='double', history=scalar) ! サブグリッド運動エネルギー ! call HistoryAddVariable( & ! & varname='e_sub', dims=(/'x','z','t'/), & ! & longname='kinetic energy', & ! & units='1', xtype='double', history=scalar) !--- 計算領域のみ ! 速度 u call HistoryAddVariable( & & varname='u', dims=(/'x','z','t'/), & & longname='u-velocity', units='m/s', & & xtype='double', history=vector_u_cal) ! 速度 w call HistoryAddVariable( & & varname='omg', dims=(/'x','z','t'/), & & longname='w-velocity', units='m/s', & & xtype='double', history=vector_omg_cal) ! 無次元圧力 call HistoryAddVariable( & & varname='pi', dims=(/'x','z','t'/), & & longname='nondimensional pressure', units='1', & & xtype='double', history=scalar_cal) ! 圧力 call HistoryAddVariable( & & varname='prss', dims=(/'x','z','t'/), & & longname='pressure', units='Pa', xtype='double', & & history=scalar_cal) ! 温度 call HistoryAddVariable( & & varname='temp', dims=(/'x','z','t'/), & & longname='temperature', units='K', & & xtype='double', history=scalar_cal) ! 温位 call HistoryAddVariable( & & varname='ptemp', dims=(/'x','z','t'/), & & longname='potential temperature', units='K', & & xtype='double', history=scalar_cal) ! 密度 call HistoryAddVariable( & & varname='dens', dims=(/'x','z','t'/), & & longname='density', units='kg/m^3', & & xtype='double', history=scalar_cal) ! 水蒸気混合比 ! call HistoryAddVariable( & ! & varname='qv', dims=(/'x','z','t'/), & ! & longname='mixing ratio of water vapor', & ! & units='g/g', xtype='double', history=scalar_cal) ! 雲水混合比 ! call HistoryAddVariable( & ! & varname='qc', dims=(/'x','z','t'/), & ! & longname='mixing ratio of cloud drops', & ! & units='g/g', xtype='double', history=scalar_cal) ! 雨水混合比 ! call HistoryAddVariable( & ! & varname='qr', dims=(/'x','z','t'/), & ! & longname='mixing ratio of rainwater', & ! & units='g/g', xtype='double', history=scalar_cal) ! 飽和水蒸気混合比 ! call HistoryAddVariable( & ! & varname='qvs', dims=(/'x','z','t'/), & ! & longname='saturation mixing ratio', & ! & units='g/g', xtype='double', history=scalar_cal) ! 渦混合係数 ! call HistoryAddVariable( & ! & varname='km_sub', dims=(/'x','z','t'/), & ! & longname='momentum eddy mixing coefficient', & ! & units='1', xtype='double', history=scalar_cal) ! サブグリッド運動エネルギー ! call HistoryAddVariable( & ! & varname='e_sub', dims=(/'x','z','t'/), & ! & longname='kinetic energy', & ! & units='1', xtype='double', history=scalar_cal) end subroutine output_gtool4_init subroutine output_base_gtool4 call HistoryPut('pi_bs', pi_bs,scalar) call HistoryPut('prss_bs', prss_bs,scalar) call HistoryPut('temp_bs', temp_bs,scalar) call HistoryPut('ptemp_bs', ptemp_bs,scalar) call HistoryPut('qv_bs', qv_bs,scalar) call HistoryPut('dens_bs', dens_bs,scalar) end subroutine output_base_gtool4 subroutine output_gtool4 write(*,*) 'itb =', itb,'its =', its call HistoryPut('u', u, vector_u) call HistoryPut('omg', omg, vector_omg) call HistoryPut('pi', pi, scalar) call HistoryPut('prss', prss, scalar) call HistoryPut('temp', temp, scalar) call HistoryPut('ptemp', ptemp, scalar) call HistoryPut('dens', dens, scalar) ! call HistoryPut('qv', qv, scalar) ! call HistoryPut('qc', qc, scalar) ! call HistoryPut('qr', qr, scalar) ! call HistoryPut('qvs', qvs, scalar) ! call HistoryPut('km_sub', km_sub, scalar) ! call HistoryPut('e_sub', e_sub, scalar) call HistoryPut('u', u_cal, vector_u_cal) call HistoryPut('omg', omg_cal, vector_omg_cal) call HistoryPut('pi', pi_cal, scalar_cal) call HistoryPut('prss', prss_cal, scalar_cal) call HistoryPut('temp', temp_cal, scalar_cal) call HistoryPut('ptemp', ptemp_cal, scalar_cal) call HistoryPut('dens', dens_cal, scalar_cal) ! call HistoryPut('qv', qv_cal, scalar_cal) ! call HistoryPut('qc', qc_cal, scalar_cal) ! call HistoryPut('qr', qr_cal, scalar_cal) ! call HistoryPut('qvs', qvs_cal, scalar_cal) ! call HistoryPut('km_sub', km_sub_cal, scalar_cal) ! call HistoryPut('e_sub', e_sub_cal, scalar_cal) end subroutine output_gtool4 subroutine output_gtool4_close call HistoryClose(vector_u) call HistoryClose(vector_omg) call HistoryClose(scalar) call HistoryClose(vector_u_cal) call HistoryClose(vector_omg_cal) call HistoryClose(scalar_cal) end subroutine output_gtool4_close end program kaminari_2d