|
|
◆ volgrid6d_compute_stat_proc_agg()
| subroutine volgrid6d_class_compute::volgrid6d_compute_stat_proc_agg |
( |
type(volgrid6d), intent(inout) |
this, |
|
|
type(volgrid6d), intent(out) |
that, |
|
|
integer, intent(in) |
stat_proc, |
|
|
type(timedelta), intent(in) |
step, |
|
|
type(datetime), intent(in), optional |
start, |
|
|
logical, intent(in), optional |
full_steps, |
|
|
type(timedelta), intent(in), optional |
max_step, |
|
|
logical, intent(in), optional |
clone |
|
) |
| |
Method for statistically processing a set of instantaneous data.
This method performs statistical processing by aggregation of instantaneous data.
The output that volgrid6d object contains elements from the original volume this satisfying the conditions
Output data will have timerange of type stat_proc, and p2 = step. The supported statistical processing methods (parameter stat_proc) are:
- 0 average
- 2 maximum
- 3 minimum
- 4 difference
A maximum distance in time for input valid data can be assigned with the optional argument max_step, in order to filter datasets with too long "holes".
- Parametri
-
| [in,out] | this | volume providing data to be recomputed, it is not modified by the method, apart from performing a volgrid6d_alloc_vol on it |
| [out] | that | output volume which will contain the recomputed data |
| [in] | stat_proc | type of statistical processing to be recomputed (from grib2 table), only data having timerange of this type will be recomputed and will appear in the output volume |
| [in] | step | length of the step over which the statistical processing is performed |
| [in] | start | start of statistical processing interval |
| [in] | full_steps | if .TRUE. and start is not provided, apply processing only on intervals starting at a forecast time or a reference time modulo step |
| [in] | max_step | maximum allowed distance in time between two contiguougs valid data within an interval, for the interval to be eligible for statistical processing |
| [in] | clone | if provided and .TRUE. , clone the gaid's from this to that |
Definizione alla linea 604 del file volgrid6d_class_compute.F90.
604 nlevel= SIZE(this%level), nvar= SIZE(this%var), ini=.false.) 605 that%level = this%level 609 CALL getval(step, asec=steps) 613 CALL recompute_stat_proc_diff_common(this%time, this%timerange, stat_proc, step, & 614 that%time, that%timerange, map_tr, f, keep_tr, & 615 this%time_definition, full_steps, start) 619 CALL volgrid6d_alloc_vol(that, decode= ASSOCIATED(this%voldati)) 621 IF (.NOT. ASSOCIATED(that%voldati)) THEN 622 ALLOCATE(voldatiin1(this%griddim%dim%nx, this%griddim%dim%ny), & 623 voldatiin2(this%griddim%dim%nx, this%griddim%dim%ny), & 624 voldatiout(this%griddim%dim%nx, this%griddim%dim%ny)) 628 DO i4 = 1, SIZE(this%time) 630 IF (c_e(keep_tr(i, i4, 2))) THEN 631 l = keep_tr(i, i4, 1) 632 k = keep_tr(i, i4, 2) 634 CALL l4f_category_log(this%category, l4f_debug, & 635 'volgrid6d_recompute_stat_proc_diff, good timerange: '//t2c(f(i))// & 638 DO i6 = 1, SIZE(this%var) 639 DO i3 = 1, SIZE(this%level) 640 IF (c_e(this%gaid(i3,i4,f(i),i6))) THEN 642 CALL copy(this%gaid(i3,i4,f(i),i6), that%gaid(i3,l,k,i6)) 644 that%gaid(i3,l,k,i6) = this%gaid(i3,i4,f(i),i6) 646 IF ( ASSOCIATED(that%voldati)) THEN 647 that%voldati(:,:,i3,l,k,i6) = this%voldati(:,:,i3,i4,f(i),i6) 649 CALL volgrid_get_vol_2d(this, i3, i4, f(i), i6, voldatiout) 650 CALL volgrid_set_vol_2d(that, i3, l, k, i6, voldatiout) 660 IF (stat_proc == 1) THEN 661 ALLOCATE(varbufr( SIZE(this%var))) 662 DO i6 = 1, SIZE(this%var) 663 varbufr(i6) = convert(this%var(i6)) 664 CALL vol7d_var_features_set(varbufr(i6)) 668 DO l = 1, SIZE(this%time) 670 DO j = 1, SIZE(this%time) 672 IF (c_e(map_tr(i,j,k,l,1))) THEN 673 DO i6 = 1, SIZE(this%var) 674 DO i3 = 1, SIZE(this%level) 676 IF (c_e(this%gaid(i3,j,f(i),i6)) .AND. & 677 c_e(this%gaid(i3,l,f(k),i6))) THEN 681 CALL copy(this%gaid(i3,l,f(k),i6), & 682 that%gaid(i3,map_tr(i,j,k,l,1),map_tr(i,j,k,l,2),i6)) 684 that%gaid(i3,map_tr(i,j,k,l,1),map_tr(i,j,k,l,2),i6) = & 685 this%gaid(i3,l,f(k),i6) 689 CALL volgrid_get_vol_2d(this, i3, l, f(k), i6, voldatiin1) 690 CALL volgrid_get_vol_2d(this, i3, j, f(i), i6, voldatiin2) 691 IF ( ASSOCIATED(that%voldati)) & 692 CALL volgrid_get_vol_2d(that, i3, & 693 map_tr(i,j,k,l,1), map_tr(i,j,k,l,2), i6, voldatiout) 695 IF (stat_proc == 0) THEN 696 WHERE(c_e(voldatiin1(:,:)) .AND. c_e(voldatiin2(:,:))) 698 (voldatiin1(:,:)*this%timerange(f(k))%p2 - & 699 voldatiin2(:,:)*this%timerange(f(i))%p2)/ & 702 voldatiout(:,:) = rmiss 704 ELSE IF (stat_proc == 1 .OR. stat_proc == 4) THEN 705 WHERE(c_e(voldatiin1(:,:)) .AND. c_e(voldatiin2(:,:))) 706 voldatiout(:,:) = voldatiin1(:,:) - voldatiin2(:,:) 708 voldatiout(:,:) = rmiss 710 IF (stat_proc == 1) THEN 711 CALL vol7d_var_features_posdef_apply(varbufr(i6), voldatiout) 715 CALL volgrid_set_vol_2d(that, i3, & 716 map_tr(i,j,k,l,1), map_tr(i,j,k,l,2), i6, voldatiout) 727 IF (.NOT. ASSOCIATED(that%voldati)) THEN 728 DEALLOCATE(voldatiin1, voldatiin2, voldatiout) 731 END SUBROUTINE volgrid6d_recompute_stat_proc_diff
|