|
◆ 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, |
|
|
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] | 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 580 del file volgrid6d_class_compute.F90.
580 voldatiin2(this%griddim%dim%nx, this%griddim%dim%ny), & 581 voldatiout(this%griddim%dim%nx, this%griddim%dim%ny)) 585 DO i = 1, SIZE(mask_timerange) 586 IF (mask_timerange(i)) THEN 587 k = firsttrue(that%timerange(:) == this%timerange(i)) 589 CALL l4f_category_log(this%category, l4f_info, & 590 'volgrid6d_recompute_stat_proc_diff, good timerange: '// t2c(i)// & 595 DO i6 = 1, SIZE(this%var) 596 DO i4 = 1, SIZE(this%time) 597 l = firsttrue(that%time(:) == this%time(i4)) 599 DO i3 = 1, SIZE(this%level) 600 IF ( c_e(this%gaid(i3,i4,i,i6))) THEN 602 CALL copy(this%gaid(i3,i4,i,i6), that%gaid(i3,l,k,i6)) 604 that%gaid(i3,l,k,i6) = this%gaid(i3,i4,i,i6) 606 IF ( ASSOCIATED(that%voldati)) THEN 607 that%voldati(:,:,i3,l,k,i6) = this%voldati(:,:,i3,i4,i,i6) 609 CALL volgrid_get_vol_2d(this, i3, i4, i, i6, voldatiout) 610 CALL volgrid_set_vol_2d(that, i3, l, k, i6, voldatiout) 623 DO l = 1, SIZE(this%time) 625 DO j = 1, SIZE(this%time) 627 IF ( c_e(map_tr(i,j,k,l,1))) THEN 628 DO i6 = 1, SIZE(this%var) 629 DO i3 = 1, SIZE(this%level) 631 IF ( c_e(this%gaid(i3,j,f(i),i6)) .AND. & 632 c_e(this%gaid(i3,l,f(k),i6))) THEN 636 CALL copy(this%gaid(i3,l,f(k),i6), & 637 that%gaid(i3,map_tr(i,j,k,l,1),map_tr(i,j,k,l,2),i6)) 639 that%gaid(i3,map_tr(i,j,k,l,1),map_tr(i,j,k,l,2),i6) = & 640 this%gaid(i3,l,f(k),i6) 644 CALL volgrid_get_vol_2d(this, i3, l, f(k), i6, voldatiin1) 645 CALL volgrid_get_vol_2d(this, i3, j, f(i), i6, voldatiin2) 646 IF ( ASSOCIATED(that%voldati)) & 647 CALL volgrid_get_vol_2d(that, i3, & 648 map_tr(i,j,k,l,1), map_tr(i,j,k,l,2), i6, voldatiout) 650 IF (stat_proc == 0) THEN 651 WHERE( c_e(voldatiin1(:,:)) .AND. c_e(voldatiin2(:,:))) 653 (voldatiin1(:,:)*this%timerange(f(k))%p2 - & 654 voldatiin2(:,:)*this%timerange(f(i))%p2)/ & 657 voldatiout(:,:) = rmiss 659 ELSE IF (stat_proc == 1 .OR. stat_proc == 4) THEN 660 WHERE( c_e(voldatiin1(:,:)) .AND. c_e(voldatiin2(:,:))) 661 voldatiout(:,:) = voldatiin1(:,:) - voldatiin2(:,:) 663 voldatiout(:,:) = rmiss 667 CALL volgrid_set_vol_2d(that, i3, & 668 map_tr(i,j,k,l,1), map_tr(i,j,k,l,2), i6, voldatiout) 679 IF (.NOT. ASSOCIATED(that%voldati)) THEN 680 DEALLOCATE(voldatiin1, voldatiin2, voldatiout) 683 END SUBROUTINE volgrid6d_recompute_stat_proc_diff 713 SUBROUTINE volgrid6d_compute_stat_proc_metamorph(this, that, stat_proc_input, stat_proc, clone) 714 TYPE(volgrid6d), INTENT(inout) :: this 715 TYPE(volgrid6d), INTENT(out) :: that 716 INTEGER, INTENT(in) :: stat_proc_input 717 INTEGER, INTENT(in) :: stat_proc 718 LOGICAL , INTENT(in), OPTIONAL :: clone 720 INTEGER i, j, n, i3, i4, i6 721 INTEGER, POINTER :: map_tr(:), map_trc(:,:), count_trc(:,:) 722 REAL, POINTER :: voldatiin(:,:), voldatiout(:,:) 723 REAL, ALLOCATABLE :: int_ratio(:) Functions that return a trimmed CHARACTER representation of the input variable.
|