45 logical,
private :: PARAM_ATMOS_PHY_CP_wadapt = .true.
46 integer,
private :: PARAM_ATMOS_PHY_CP_w_time = 16
56 namelist / param_atmos_phy_cp_common / &
57 param_atmos_phy_cp_wadapt, &
58 param_atmos_phy_cp_w_time
64 log_info(
"ATMOS_PHY_CP_common_setup",*)
'Setup'
65 log_info(
"ATMOS_PHY_CP_common_setup",*)
'CP-COMMON'
69 read(
io_fid_conf,nml=param_atmos_phy_cp_common,iostat=ierr)
71 log_info(
"ATMOS_PHY_CP_common_setup",*)
'Not found namelist. Default used.'
72 elseif( ierr > 0 )
then
73 log_error(
"ATMOS_PHY_CP_common_setup",*)
'Not appropriate names in namelist PARAM_ATMOS_PHY_CP_COMMON. Check!'
76 log_nml(param_atmos_phy_cp_common)
80 log_info(
"ATMOS_PHY_CP_common_setup",*)
"Use running mean of w in adaptive timestep? : ", param_atmos_phy_cp_wadapt
81 log_info(
"ATMOS_PHY_CP_common_setup",*)
"Fixed time scale for running mean of w : ", param_atmos_phy_cp_w_time
98 KA, KS, KE, IA, IS, IE, JA, JS, JE, &
100 TIME_DTSEC, CP_DTSEC, &
103 integer,
intent(in) ::
ka,
ks,
ke
104 integer,
intent(in) ::
ia,
is,
ie
105 integer,
intent(in) ::
ja,
js,
je
108 real(
dp),
intent(in) :: time_dtsec
109 real(
dp),
intent(in) :: cp_dtsec
111 real(
rp),
intent(inout) :: w0_mean(
ka,
ia,
ja)
113 real(
rp) :: fact_w0_mean, fact_w0
118 if ( param_atmos_phy_cp_wadapt )
then
119 fact_w0_mean = 2.0_rp * max(cp_dtsec,time_dtsec) - time_dtsec
122 fact_w0_mean = real(param_atmos_phy_cp_w_time,
rp)
129 w0_mean(
k,i,j) = ( w0_mean(
k,i,j) * fact_w0_mean &
130 + w(
k,i,j) * fact_w0 ) / ( fact_w0_mean + fact_w0 )