32 type(model_state_type),
target,
intent(inout) :: current_state
42 if (current_state%th%active)
then
46 if (current_state%number_q_fields .gt. 0)
then
55 type(model_state_type),
target,
intent(inout) :: current_state
57 if (.not. current_state%halo_column)
then
58 if (current_state%field_stepping == forward_stepping)
then
67 if (current_state%field_stepping == forward_stepping)
then
79 type(model_state_type),
intent(inout) :: current_state
80 logical,
intent(in) :: old_smoother
82 integer :: y_index, x_index, k, n
83 real(kind=default_precision) :: c1, c2, existing_value
85 if (old_smoother)
then
86 c1 = 1.0_default_precision - current_state%tsmth
87 c2 = 2.0_default_precision * current_state%tsmth - 1.0_default_precision
89 c1 = 1.0_default_precision
90 c2 = -1.0_default_precision
93 x_index=current_state%column_local_x
94 y_index=current_state%column_local_y
96 do k=1,current_state%global_grid%size(z_index)
98 existing_value = current_state%u%data(k,y_index,x_index) + current_state%zu%data(k,y_index,x_index)
99 current_state%u%data(k,y_index,x_index)=existing_value * c1 + current_state%u%data(k,y_index,x_index) * c2
100 current_state%zu%data(k,y_index,x_index)=existing_value - current_state%u%data(k,y_index,x_index)
103 existing_value = current_state%v%data(k,y_index,x_index) + current_state%zv%data(k,y_index,x_index)
104 current_state%v%data(k,y_index,x_index)=existing_value * c1 + current_state%v%data(k,y_index,x_index) * c2
105 current_state%zv%data(k,y_index,x_index)=existing_value - current_state%v%data(k,y_index,x_index)
108 existing_value = current_state%w%data(k,y_index,x_index) + current_state%zw%data(k,y_index,x_index)
109 current_state%w%data(k,y_index,x_index)=existing_value * c1 + current_state%w%data(k,y_index,x_index) * c2
110 current_state%zw%data(k,y_index,x_index)=existing_value - current_state%w%data(k,y_index,x_index)
112 if (current_state%th%active)
then
113 existing_value = current_state%th%data(k,y_index,x_index) + current_state%zth%data(k,y_index,x_index)
114 current_state%th%data(k,y_index,x_index)=existing_value * c1 + current_state%th%data(k,y_index,x_index) * c2
115 current_state%zth%data(k,y_index,x_index)=existing_value - current_state%th%data(k,y_index,x_index)
117 do n=1,current_state%number_q_fields
118 if (current_state%q(n)%active)
then
119 existing_value = current_state%q(n)%data(k,y_index,x_index) + current_state%zq(n)%data(k,y_index,x_index)
120 current_state%q(n)%data(k,y_index,x_index)=existing_value * c1 + current_state%q(n)%data(k,y_index,x_index) * c2
121 current_state%zq(n)%data(k,y_index,x_index)=existing_value - current_state%q(n)%data(k,y_index,x_index)
130 type(model_state_type),
intent(inout) :: current_state
132 integer :: y_index, x_index, k, n
133 real(kind=default_precision) :: c1, c2, existing_value
135 x_index=current_state%column_local_x
136 y_index=current_state%column_local_y
138 c1 = 1.0_default_precision - 2.0_default_precision*current_state%tsmth
139 c2 = current_state%tsmth
141 do k=1,current_state%global_grid%size(z_index)
143 existing_value = current_state%u%data(k,y_index,x_index)
144 current_state%u%data(k,y_index,x_index)=current_state%zu%data(k,y_index,x_index)
145 current_state%zu%data(k,y_index,x_index)=c1*existing_value+c2*(current_state%u%data(k, y_index, x_index)+&
146 current_state%savu%data(k,y_index,x_index) -current_state%ugal)
149 existing_value = current_state%v%data(k,y_index,x_index)
150 current_state%v%data(k,y_index,x_index)=current_state%zv%data(k,y_index,x_index)
151 current_state%zv%data(k,y_index,x_index)=c1*existing_value+c2*(current_state%v%data(k, y_index, x_index)+&
152 current_state%savv%data(k,y_index,x_index)-current_state%vgal)
155 existing_value = current_state%w%data(k,y_index,x_index)
156 current_state%w%data(k,y_index,x_index)=current_state%zw%data(k,y_index,x_index)
157 current_state%zw%data(k,y_index,x_index)=c1*existing_value+c2*(current_state%w%data(k, y_index, x_index)+&
158 current_state%savw%data(k,y_index,x_index))
160 if (current_state%th%active)
then
162 existing_value = current_state%zth%data(k,y_index,x_index)
163 current_state%zth%data(k,y_index,x_index)=current_state%th%data(k,y_index,x_index) + current_state%tsmth * existing_value
164 current_state%th%data(k,y_index,x_index)=existing_value
166 do n=1, current_state%number_q_fields
167 if (current_state%q(n)%active)
then
169 existing_value = current_state%zq(n)%data(k,y_index,x_index)
170 current_state%zq(n)%data(k,y_index,x_index)=current_state%q(n)%data(k,y_index,x_index)+&
171 current_state%tsmth * existing_value
172 current_state%q(n)%data(k,y_index,x_index)=existing_value
181 type(model_state_type),
intent(inout) :: current_state
182 logical,
intent(in) :: old_smoother
185 real(kind=default_precision) :: c1, c2
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)
240 type(model_state_type),
intent(inout) :: current_state
243 real(kind=default_precision) :: c1, c2, existing_value
245 c1 = 1.0_default_precision - 2.0_default_precision*current_state%tsmth
246 c2 = current_state%tsmth
248 do k=1,current_state%global_grid%size(z_index)
250 existing_value=current_state%global_grid%configuration%vertical%olubar(k)
251 current_state%global_grid%configuration%vertical%olubar(k)=current_state%global_grid%configuration%vertical%olzubar(k)
252 current_state%global_grid%configuration%vertical%olzubar(k)=c1*existing_value+c2*&
253 (current_state%global_grid%configuration%vertical%olubar(k) + &
254 current_state%global_grid%configuration%vertical%savolubar(k))
257 existing_value=current_state%global_grid%configuration%vertical%olvbar(k)
258 current_state%global_grid%configuration%vertical%olvbar(k)=current_state%global_grid%configuration%vertical%olzvbar(k)
259 current_state%global_grid%configuration%vertical%olzvbar(k)=c1*existing_value+c2*&
260 (current_state%global_grid%configuration%vertical%olvbar(k) + &
261 current_state%global_grid%configuration%vertical%savolvbar(k))
263 if (current_state%th%active)
then
264 existing_value=current_state%global_grid%configuration%vertical%olzthbar(k)
265 current_state%global_grid%configuration%vertical%olzthbar(k)=&
266 current_state%global_grid%configuration%vertical%olthbar(k) + current_state%tsmth * existing_value
267 current_state%global_grid%configuration%vertical%olthbar(k)=existing_value
269 if (current_state%number_q_fields .gt. 0)
then
270 do n=1, current_state%number_q_fields
271 existing_value=current_state%global_grid%configuration%vertical%olzqbar(k,n)
272 current_state%global_grid%configuration%vertical%olzqbar(k,n)=&
273 current_state%global_grid%configuration%vertical%olqbar(k,n) + current_state%tsmth * existing_value
274 current_state%global_grid%configuration%vertical%olqbar(k,n)=existing_value