libsim Versione 7.1.11
|
◆ volgrid6d_compute_stat_proc()
General-purpose method for computing a statistical processing on data in a volgrid6d object already processed with the same statistical processing, on a different time interval specified by step and start. This method tries to apply all the suitable specialized statistical processing methods according to the input and output statistical processing requested. The argument stat_proc_input determines which data will be processed, while the stat_proc argument determines the type of statistical process to be applied and which will be owned by output data. The possible combinations are:
If a particular statistical processing cannot be performed on the input data, the program continues with a warning and, if requested, the input data is passed over to the volume specified by the other argument, in order to allow continuation of processing. All the other parameters are passed over to the specifical statistical processing methods and are documented there.
Definizione alla linea 296 del file volgrid6d_class_compute.F90. 298 ENDIF
299
300 ELSE ! second or more time
301 SELECT CASE(stat_proc)
302 CASE (0, 200, 1, 4) ! average, vectorial mean, accumulation, difference
303 WHERE(c_e(voldatiin(:,:)) .AND. c_e(voldatiout(:,:)))
304 voldatiout(:,:) = voldatiout(:,:) + voldatiin(:,:)
305 ELSEWHERE
306 voldatiout(:,:) = rmiss
307 END WHERE
308 CASE(2) ! maximum
309 WHERE(c_e(voldatiin(:,:)) .AND. c_e(voldatiout(:,:)))
310 voldatiout(:,:) = max(voldatiout(:,:), voldatiin(:,:))
311 ELSEWHERE
312 voldatiout(:,:) = rmiss
313 END WHERE
314 CASE(3) ! minimum
315 WHERE(c_e(voldatiin(:,:)) .AND. c_e(voldatiout(:,:)))
316 voldatiout(:,:) = min(voldatiout(:,:), voldatiin(:,:))
317 ELSEWHERE
318 voldatiout(:,:) = rmiss
319 END WHERE
320 END SELECT
321
322 ENDIF ! first time
323 ENDIF ! dtratio(n1)
324 ENDDO ! ttr
325
326#ifdef DEBUG
327 CALL l4f_log(l4f_debug, &
328 'compute_stat_proc_agg, ndtr/dtratio/frac_valid: '// &
329 t2c(ndtr)//'/'//t2c(dtratio(n1))//'/'//t2c(lfrac_valid))
330#endif
331 IF (ndtr > 0) THEN ! why this condition was not here before?
332 IF (real(ndtr)/real(dtratio(n1)) >= lfrac_valid) THEN ! success
333 IF (stat_proc == 0) THEN ! average
334 WHERE(c_e(voldatiout(:,:)))
335 voldatiout(:,:) = voldatiout(:,:)/ndtr
336 END WHERE
337 ENDIF
338 CALL volgrid_set_vol_2d(that, i3, i, j, i6, voldatiout)
339#ifdef DEBUG
340 CALL l4f_log(l4f_debug, &
341 'compute_stat_proc_agg, coding lev/t/tr/var: '// &
342 t2c(i3)//'/'//t2c(i)//'/'//t2c(j)//'/'//t2c(i6))
343#endif
344 ELSE
345! must nullify the output gaid here, otherwise an incomplete field will be output
346 IF (lclone) THEN
347 CALL delete(that%gaid(i3,i,j,i6))
348 ELSE
349 CALL init(that%gaid(i3,i,j,i6)) ! grid_id lacks a nullify method
350 ENDIF
351#ifdef DEBUG
352 CALL l4f_log(l4f_debug, &
353 'compute_stat_proc_agg, skipping lev/t/tr/var: '// &
354 t2c(i3)//'/'//t2c(i)//'/'//t2c(j)//'/'//t2c(i6))
355#endif
356 ENDIF
357 ENDIF ! ndtr > 0
358
359 ENDDO ! level
360 ENDDO ! var
361 ENDDO ! dtratio
362 CALL delete(map_ttr(i,j))
363 ENDDO do_otime
364ENDDO do_otimerange
365
366DEALLOCATE(dtratio, map_ttr)
367
368END SUBROUTINE volgrid6d_recompute_stat_proc_agg
369
370
|