Does swapping and smoothing (using classic algorithm) for the average profiles (the bars)
181 type(model_state_type),
intent(inout) :: current_state
182 logical,
intent(in) :: old_smoother
187 if (old_smoother)
then
188 c1 = 1.0_default_precision - current_state%tsmth
189 c2 = 2.0_default_precision * current_state%tsmth - 1.0_default_precision
191 c1 = 1.0_default_precision
192 c2 = -1.0_default_precision
195 do k=1,current_state%global_grid%size(
z_index)
197 current_state%global_grid%configuration%vertical%olzubar(k)=current_state%global_grid%configuration%vertical%olubar(k) +&
198 current_state%global_grid%configuration%vertical%olzubar(k)
199 current_state%global_grid%configuration%vertical%olubar(k)=current_state%global_grid%configuration%vertical%olzubar(k) *&
200 c1 + current_state%global_grid%configuration%vertical%olubar(k) * c2
201 current_state%global_grid%configuration%vertical%olzubar(k)=current_state%global_grid%configuration%vertical%olzubar(k) -&
202 current_state%global_grid%configuration%vertical%olubar(k)
205 current_state%global_grid%configuration%vertical%olzvbar(k)=current_state%global_grid%configuration%vertical%olvbar(k) +&
206 current_state%global_grid%configuration%vertical%olzvbar(k)
207 current_state%global_grid%configuration%vertical%olvbar(k)=current_state%global_grid%configuration%vertical%olzvbar(k) *&
208 c1 + current_state%global_grid%configuration%vertical%olvbar(k) * c2
209 current_state%global_grid%configuration%vertical%olzvbar(k)=current_state%global_grid%configuration%vertical%olzvbar(k) -&
210 current_state%global_grid%configuration%vertical%olvbar(k)
212 if (current_state%th%active)
then
213 current_state%global_grid%configuration%vertical%olzthbar(k)=current_state%global_grid%configuration%vertical%olthbar(k)+&
214 current_state%global_grid%configuration%vertical%olzthbar(k)
215 current_state%global_grid%configuration%vertical%olthbar(k)=current_state%global_grid%configuration%vertical%olzthbar(k)*&
216 c1 + current_state%global_grid%configuration%vertical%olthbar(k) * c2
217 current_state%global_grid%configuration%vertical%olzthbar(k)=&
218 current_state%global_grid%configuration%vertical%olzthbar(k)-&
219 current_state%global_grid%configuration%vertical%olthbar(k)
221 if (current_state%number_q_fields .gt. 0)
then
222 do n=1, current_state%number_q_fields
223 current_state%global_grid%configuration%vertical%olzqbar(k,n)=&
224 current_state%global_grid%configuration%vertical%olqbar(k,n)+&
225 current_state%global_grid%configuration%vertical%olzqbar(k,n)
226 current_state%global_grid%configuration%vertical%olqbar(k,n)=&
227 current_state%global_grid%configuration%vertical%olzqbar(k,n)*&
228 c1 + current_state%global_grid%configuration%vertical%olqbar(k,n) * c2
229 current_state%global_grid%configuration%vertical%olzqbar(k,n)=&
230 current_state%global_grid%configuration%vertical%olzqbar(k,n)-&
231 current_state%global_grid%configuration%vertical%olqbar(k,n)