58 integer,
intent(in) :: ka, ks, ke
59 integer,
intent(in) :: ia, is, ie
60 integer,
intent(in) :: ja, js, je
62 real(
rp) :: spnudge_uv_tau = 0.0_rp
63 real(
rp) :: spnudge_pt_tau = 0.0_rp
64 real(
rp) :: spnudge_qv_tau = 0.0_rp
66 real(
rp) :: spnudge_level1 = 0.0_rp
67 real(
rp) :: spnudge_level2 = 0.0_rp
68 real(
rp) :: spnudge_level3 = 1e10_rp
69 real(
rp) :: spnudge_level4 = 1e10_rp
71 namelist /param_spnudge/ &
90 real(
rp) :: uv_alpha, pt_alpha, qv_alpha
98 log_info(
"SPNUDGE_setup",*)
'Setup'
104 log_info(
"SPNUDGE_setup",*)
'Not found namelist. Default used.'
105 elseif( ierr > 0 )
then
106 log_error(
"SPNUDGE_setup",*)
'Not appropriate names in namelist PARAM_SPNUDGE. Check!'
109 log_nml(param_spnudge)
111 if ( spnudge_level1 > spnudge_level2 )
then
112 log_error(
"SPNUDGE_setup",*)
'SPNUDGE_level1 must be lowere or equal to SPNUDGE_level2'
115 if ( spnudge_level2 > spnudge_level3 )
then
116 log_error(
"SPNUDGE_setup",*)
'SPNUDGE_level2 must be lowere or equal to SPNUDGE_level3'
119 if ( spnudge_level3 > spnudge_level4 )
then
120 log_error(
"SPNUDGE_setup",*)
'SPNUDGE_level3 must be lowere or equal to SPNUDGE_level4'
125 log_warn(
"SPNUDGE_setup",*)
'Spectrul nudging is still experimental'
133 if (
spnudge_uv .and. spnudge_uv_tau > 0.0_rp )
then
134 uv_alpha = 1.0_rp / spnudge_uv_tau
140 if ( real_czuy(k,i,j) < spnudge_level1 )
then
142 elseif ( real_czuy(k,i,j) < spnudge_level2 )
then
143 spnudge_u_alpha(k,i,j) = ( real_czuy(k,i,j) - spnudge_level1 ) / ( spnudge_level2 - spnudge_level1 ) * uv_alpha
144 elseif ( real_czuy(k,i,j) < spnudge_level3 )
then
146 elseif ( real_czuy(k,i,j) < spnudge_level4 )
then
147 spnudge_u_alpha(k,i,j) = ( real_czuy(k,i,j) - spnudge_level3 ) / ( spnudge_level4 - spnudge_level3 ) * uv_alpha
159 if ( real_czxv(k,i,j) < spnudge_level1 )
then
161 elseif ( real_czxv(k,i,j) < spnudge_level2 )
then
162 spnudge_v_alpha(k,i,j) = ( real_czxv(k,i,j) - spnudge_level1 ) / ( spnudge_level2 - spnudge_level1 ) * uv_alpha
163 elseif ( real_czxv(k,i,j) < spnudge_level3 )
then
165 elseif ( real_czxv(k,i,j) < spnudge_level4 )
then
166 spnudge_v_alpha(k,i,j) = ( real_czxv(k,i,j) - spnudge_level3 ) / ( spnudge_level4 - spnudge_level3 ) * uv_alpha
188 if (
spnudge_pt .and. spnudge_pt_tau > 0.0_rp )
then
189 pt_alpha = 1.0_rp / spnudge_pt_tau
195 if ( real_cz(k,i,j) < spnudge_level1 )
then
197 elseif ( real_cz(k,i,j) < spnudge_level2 )
then
198 spnudge_pt_alpha(k,i,j) = ( real_cz(k,i,j) - spnudge_level1 ) / ( spnudge_level2 - spnudge_level1 ) * pt_alpha
199 elseif ( real_cz(k,i,j) < spnudge_level3 )
then
201 elseif ( real_cz(k,i,j) < spnudge_level4 )
then
202 spnudge_pt_alpha(k,i,j) = ( real_cz(k,i,j) - spnudge_level3 ) / ( spnudge_level4 - spnudge_level3 ) * pt_alpha
223 if (
spnudge_qv .and. spnudge_qv_tau > 0.0_rp )
then
224 qv_alpha = 1.0_rp / spnudge_qv_tau
230 if ( real_cz(k,i,j) < spnudge_level1 )
then
232 elseif ( real_cz(k,i,j) < spnudge_level2 )
then
233 spnudge_qv_alpha(k,i,j) = ( real_cz(k,i,j) - spnudge_level1 ) / ( spnudge_level2 - spnudge_level1 ) * qv_alpha
234 elseif ( real_cz(k,i,j) < spnudge_level3 )
then
236 elseif ( real_cz(k,i,j) < spnudge_level4 )
then
237 spnudge_qv_alpha(k,i,j) = ( real_cz(k,i,j) - spnudge_level3 ) / ( spnudge_level4 - spnudge_level3 ) * qv_alpha
260 call dft_setup( ka, ks, ke, ia, is, ie, ja, js, je, &