141 type(model_state_type),
target,
intent(inout) :: current_state
144 integer :: icol, jcol, target_x_index, target_y_index
146 icol=current_state%column_local_x
147 jcol=current_state%column_local_y
148 target_y_index=jcol-current_state%local_grid%halo_size(y_index)
149 target_x_index=icol-current_state%local_grid%halo_size(x_index)
151 if (current_state%first_timestep_column) then
152 psedl_tot(:)= 0.0_default_precision
153 pcond_tot(:)= 0.0_default_precision
154 praut_tot(:)= 0.0_default_precision
155 pracw_tot(:)= 0.0_default_precision
156 prevp_tot(:)= 0.0_default_precision
157 psedr_tot(:)= 0.0_default_precision
158 dth_mphys_tot(:)= 0.0_default_precision
159 dth_cond_evap_tot(:)= 0.0_default_precision
160 dqv_mphys_tot(:)= 0.0_default_precision
161 dqv_cond_evap_tot(:)= 0.0_default_precision
162 dqc_mphys_tot(:)= 0.0_default_precision
163 dqr_mphys_tot(:)= 0.0_default_precision
164 if (.not. l_warm)
then
165 phomc_tot(:)= 0.0_default_precision
166 pinuc_tot(:)= 0.0_default_precision
167 pidep_tot(:)= 0.0_default_precision
168 piacw_tot(:)= 0.0_default_precision
169 pisub_tot(:)= 0.0_default_precision
170 pimlt_tot(:)= 0.0_default_precision
171 psedi_tot(:)= 0.0_default_precision
172 psacw_tot(:)= 0.0_default_precision
173 psacr_tot(:)= 0.0_default_precision
174 pssub_tot(:)= 0.0_default_precision
175 psmlt_tot(:)= 0.0_default_precision
176 psaut_tot(:)= 0.0_default_precision
177 psaci_tot(:)= 0.0_default_precision
178 psdep_tot(:)= 0.0_default_precision
179 pseds_tot(:)= 0.0_default_precision
180 pgacw_tot(:)= 0.0_default_precision
181 pgacs_tot(:)= 0.0_default_precision
182 pgmlt_tot(:)= 0.0_default_precision
183 pgsub_tot(:)= 0.0_default_precision
184 psedg_tot(:)= 0.0_default_precision
185 dqi_mphys_tot(:)= 0.0_default_precision
186 dqs_mphys_tot(:)= 0.0_default_precision
187 dqg_mphys_tot(:)= 0.0_default_precision
191 if (.not. current_state%halo_column) then
192 if ( casdiags % l_psedl ) &
193 psedl_tot(:)= psedl_tot(:) + casim_monc_dgs % psedl(:,target_y_index,target_x_index)
194 if ( casdiags % l_pcond ) &
195 pcond_tot(:)= pcond_tot(:) + casim_monc_dgs % pcond(:,target_y_index,target_x_index)
196 if ( casdiags % l_praut ) &
197 praut_tot(:)= praut_tot(:) + casim_monc_dgs % praut(:,target_y_index,target_x_index)
198 if ( casdiags % l_pracw ) &
199 pracw_tot(:)= pracw_tot(:) + casim_monc_dgs % pracw(:,target_y_index,target_x_index)
200 if ( casdiags % l_prevp ) &
201 prevp_tot(:)= prevp_tot(:) + casim_monc_dgs % prevp(:,target_y_index,target_x_index)
202 if ( casdiags % l_psedr ) &
203 psedr_tot(:)= psedr_tot(:) + casim_monc_dgs % psedr(:,target_y_index,target_x_index)
204 if ( casdiags % l_dth ) then
205 dth_mphys_tot(:)= dth_mphys_tot(:) + &
206 casim_monc_dgs % dth_total(:,target_y_index,target_x_index)
208 dth_cond_evap_tot(:)= dth_cond_evap_tot(:) + &
209 casim_monc_dgs % dth_cond_evap(:,target_y_index,target_x_index)
212 if ( casdiags % l_dqv ) then
213 dqv_mphys_tot(:)= dqv_mphys_tot(:) + &
214 casim_monc_dgs % dqv_total(:,target_y_index,target_x_index)
215 dqv_cond_evap_tot(:)= dqv_cond_evap_tot(:) + &
216 casim_monc_dgs % dqv_cond_evap(:,target_y_index,target_x_index)
219 if ( casdiags % l_dqc ) &
220 dqc_mphys_tot(:)= dqc_mphys_tot(:) + &
221 casim_monc_dgs % dqc(:,target_y_index,target_x_index)
222 if ( casdiags % l_dqr ) &
223 dqr_mphys_tot(:)= dqr_mphys_tot(:) + &
224 casim_monc_dgs % dqr(:,target_y_index,target_x_index)
226 if (.not. l_warm) then
227 if ( casdiags % l_phomc ) &
228 phomc_tot(:)= phomc_tot(:) + &
229 casim_monc_dgs % phomc(:,target_y_index,target_x_index)
230 if ( casdiags % l_pinuc ) &
231 pinuc_tot(:)= pinuc_tot(:) + &
232 casim_monc_dgs % pinuc(:,target_y_index,target_x_index)
233 if ( casdiags % l_pidep ) &
234 pidep_tot(:)= pidep_tot(:) + &
235 casim_monc_dgs % pidep(:,target_y_index,target_x_index)
236 if ( casdiags % l_piacw ) &
237 piacw_tot(:)= piacw_tot(:) + &
238 casim_monc_dgs % piacw(:,target_y_index,target_x_index)
239 if ( casdiags % l_pisub ) &
240 pisub_tot(:)= pisub_tot(:) + &
241 casim_monc_dgs % pisub(:,target_y_index,target_x_index)
242 if ( casdiags % l_pimlt ) &
243 pimlt_tot(:)= pimlt_tot(:) + &
244 casim_monc_dgs % pimlt(:,target_y_index,target_x_index)
245 if ( casdiags % l_psedi ) &
246 psedi_tot(:)= psedi_tot(:) + &
247 casim_monc_dgs % psedi(:,target_y_index,target_x_index)
248 if ( casdiags % l_psacw ) &
249 psacw_tot(:)= psacw_tot(:) + &
250 casim_monc_dgs % psacw(:,target_y_index,target_x_index)
251 if ( casdiags % l_psacr ) &
252 psacr_tot(:)= psacr_tot(:) + &
253 casim_monc_dgs % psacr(:,target_y_index,target_x_index)
254 if ( casdiags % l_pssub ) &
255 pssub_tot(:)= pssub_tot(:) + &
256 casim_monc_dgs % pssub(:,target_y_index,target_x_index)
257 if ( casdiags % l_psmlt ) &
258 psmlt_tot(:)= psmlt_tot(:) + &
259 casim_monc_dgs % psmlt(:,target_y_index,target_x_index)
260 if ( casdiags % l_psaut ) &
261 psaut_tot(:)= psaut_tot(:) + &
262 casim_monc_dgs % psaut(:,target_y_index,target_x_index)
263 if ( casdiags % l_psaci ) &
264 psaci_tot(:)= psaci_tot(:) + &
265 casim_monc_dgs % psaci(:,target_y_index,target_x_index)
266 if ( casdiags % l_psdep ) &
267 psdep_tot(:)= psdep_tot(:) + &
268 casim_monc_dgs % psdep(:,target_y_index,target_x_index)
269 if ( casdiags % l_pseds ) &
270 pseds_tot(:)= pseds_tot(:) + &
271 casim_monc_dgs % pseds(:,target_y_index,target_x_index)
272 if ( casdiags % l_pgacw ) &
273 pgacw_tot(:)= pgacw_tot(:) + &
274 casim_monc_dgs % pgacw(:,target_y_index,target_x_index)
275 if ( casdiags % l_pgacs ) &
276 pgacs_tot(:)= pgacs_tot(:) + &
277 casim_monc_dgs % pgacs(:,target_y_index,target_x_index)
278 if ( casdiags % l_pgmlt ) &
279 pgmlt_tot(:)= pgmlt_tot(:) + &
280 casim_monc_dgs % pgmlt(:,target_y_index,target_x_index)
281 if ( casdiags % l_pgsub ) &
282 pgsub_tot(:)= pgsub_tot(:) + &
283 casim_monc_dgs % pgsub(:,target_y_index,target_x_index)
284 if ( casdiags % l_psedg ) &
285 psedg_tot(:)= psedg_tot(:) + &
286 casim_monc_dgs % psedg(:,target_y_index,target_x_index)
287 if ( casdiags % l_dqi ) &
288 dqi_mphys_tot(:)= dqi_mphys_tot(:) + &
289 casim_monc_dgs % dqi(:,target_y_index,target_x_index)
290 if ( casdiags % l_dqs ) &
291 dqs_mphys_tot(:)= dqs_mphys_tot(:) + &
292 casim_monc_dgs % dqs(:,target_y_index,target_x_index)
293 if ( casdiags % l_dqg ) &
294 dqg_mphys_tot(:)= dqg_mphys_tot(:) + &
295 casim_monc_dgs % dqg(:,target_y_index,target_x_index)