57 integer,
intent(in) :: ka, ks, ke
58 integer,
intent(in) :: ia, is, ie
59 integer,
intent(in) :: ja, js, je
61 real(
rp) :: spnudge_uv_tau = 0.0_rp
62 real(
rp) :: spnudge_pt_tau = 0.0_rp
63 real(
rp) :: spnudge_qv_tau = 0.0_rp
65 real(
rp) :: spnudge_level1 = 0.0_rp
66 real(
rp) :: spnudge_level2 = 0.0_rp
67 real(
rp) :: spnudge_level3 = 1e10_rp
68 real(
rp) :: spnudge_level4 = 1e10_rp
70 namelist /param_spnudge/ &
89 real(
rp) :: uv_alpha, pt_alpha, qv_alpha
97 log_info(
"SPNUDGE_setup",*)
'Setup'
103 log_info(
"SPNUDGE_setup",*)
'Not found namelist. Default used.'
104 elseif( ierr > 0 )
then
105 log_error(
"SPNUDGE_setup",*)
'Not appropriate names in namelist PARAM_SPNUDGE. Check!'
108 log_nml(param_spnudge)
110 if ( spnudge_level1 > spnudge_level2 )
then
111 log_error(
"SPNUDGE_setup",*)
'SPNUDGE_level1 must be lowere or equal to SPNUDGE_level2'
114 if ( spnudge_level2 > spnudge_level3 )
then
115 log_error(
"SPNUDGE_setup",*)
'SPNUDGE_level2 must be lowere or equal to SPNUDGE_level3'
118 if ( spnudge_level3 > spnudge_level4 )
then
119 log_error(
"SPNUDGE_setup",*)
'SPNUDGE_level3 must be lowere or equal to SPNUDGE_level4'
124 log_warn(
"SPNUDGE_setup",*)
'Spectrul nudging is still experimental'
132 if (
spnudge_uv .and. spnudge_uv_tau > 0.0_rp )
then
133 uv_alpha = 1.0_rp / spnudge_uv_tau
139 if ( real_czuy(k,i,j) < spnudge_level1 )
then
141 elseif ( real_czuy(k,i,j) < spnudge_level2 )
then
142 spnudge_u_alpha(k,i,j) = ( real_czuy(k,i,j) - spnudge_level1 ) / ( spnudge_level2 - spnudge_level1 ) * uv_alpha
143 elseif ( real_czuy(k,i,j) < spnudge_level3 )
then
145 elseif ( real_czuy(k,i,j) < spnudge_level4 )
then
146 spnudge_u_alpha(k,i,j) = ( real_czuy(k,i,j) - spnudge_level3 ) / ( spnudge_level4 - spnudge_level3 ) * uv_alpha
158 if ( real_czxv(k,i,j) < spnudge_level1 )
then
160 elseif ( real_czxv(k,i,j) < spnudge_level2 )
then
161 spnudge_v_alpha(k,i,j) = ( real_czxv(k,i,j) - spnudge_level1 ) / ( spnudge_level2 - spnudge_level1 ) * uv_alpha
162 elseif ( real_czxv(k,i,j) < spnudge_level3 )
then
164 elseif ( real_czxv(k,i,j) < spnudge_level4 )
then
165 spnudge_v_alpha(k,i,j) = ( real_czxv(k,i,j) - spnudge_level3 ) / ( spnudge_level4 - spnudge_level3 ) * uv_alpha
187 if (
spnudge_pt .and. spnudge_pt_tau > 0.0_rp )
then
188 pt_alpha = 1.0_rp / spnudge_pt_tau
194 if ( real_cz(k,i,j) < spnudge_level1 )
then
196 elseif ( real_cz(k,i,j) < spnudge_level2 )
then
197 spnudge_pt_alpha(k,i,j) = ( real_cz(k,i,j) - spnudge_level1 ) / ( spnudge_level2 - spnudge_level1 ) * pt_alpha
198 elseif ( real_cz(k,i,j) < spnudge_level3 )
then
200 elseif ( real_cz(k,i,j) < spnudge_level4 )
then
201 spnudge_pt_alpha(k,i,j) = ( real_cz(k,i,j) - spnudge_level3 ) / ( spnudge_level4 - spnudge_level3 ) * pt_alpha
222 if (
spnudge_qv .and. spnudge_qv_tau > 0.0_rp )
then
223 qv_alpha = 1.0_rp / spnudge_qv_tau
229 if ( real_cz(k,i,j) < spnudge_level1 )
then
231 elseif ( real_cz(k,i,j) < spnudge_level2 )
then
232 spnudge_qv_alpha(k,i,j) = ( real_cz(k,i,j) - spnudge_level1 ) / ( spnudge_level2 - spnudge_level1 ) * qv_alpha
233 elseif ( real_cz(k,i,j) < spnudge_level3 )
then
235 elseif ( real_cz(k,i,j) < spnudge_level4 )
then
236 spnudge_qv_alpha(k,i,j) = ( real_cz(k,i,j) - spnudge_level3 ) / ( spnudge_level4 - spnudge_level3 ) * qv_alpha
257 call dft_setup( ka, ks, ke, ia, is, ie, ja, js, je, &