|
◆ volgrid6d_recompute_stat_proc_agg()
subroutine volgrid6d_class_compute::volgrid6d_recompute_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, |
|
|
real, intent(in), optional |
frac_valid, |
|
|
logical, intent(in), optional |
clone |
|
) |
| |
Specialized method for statistically processing a set of data already processed with the same statistical processing, on a different time interval.
This method performs statistical processing by aggregation of shorter intervals.
The output that volgrid6d object contains elements from the original volume this satisfying the conditions
- timerange (vol7d_timerange_class::vol7d_timerange::timerange) of type stat_proc (or stat_proc_input if provided)
- any p1 (analysis/observation or forecast)
- p2 > 0 (processing interval non null, non instantaneous data) and equal to a multiplier of step
Output data will have timerange of type stat_proc and p2 = step. The supported statistical processing methods (parameter stat_proc) are:
- 0 average
- 1 accumulation
- 2 maximum
- 3 minimum
- 4 difference
The start of processing period can be computed automatically from the input intervals as the first possible interval modulo step, or, for a better control, it can be specified explicitely by the optional argument start. Be warned that, in the final volume, the first reference time will actually be start + step, since start indicates the beginning of first processing interval, while reference time (for analysis/oservation) is the end of the interval.
The purpose of the optional argument stat_proc_input is to allow processing with a certain statistical processing operator a dataset already processed with a different operator, by specifying the latter as stat_proc_input; this is useful, for example, if one wants to compute the monthly average of daily maximum temperatures; however this has to be used with care since the resulting data volume will not carry all the information about the processing which has been done, in the previous case, for example, the temperatures will simply look like monthly average temperatures.
- 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] | frac_valid | minimum fraction of valid data required for considering acceptable a recomputed value, default=1. |
[in] | clone | if provided and .TRUE. , clone the gaid's from this to that |
Definizione alla linea 438 del file volgrid6d_class_compute.F90.
438 CALL copy(this%gaid(i3, map_ttr(i,j)%array(1)%it,& 439 map_ttr(i,j)%array(1)%itr,i6), that%gaid(i3,i,j,i6)) 441 that%gaid(i3,i,j,i6) = this%gaid(i3, map_ttr(i,j)%array(1)%it, & 442 map_ttr(i,j)%array(1)%itr,i6) 445 CALL volgrid_get_vol_2d(this, i3, map_ttr(i,j)%array(ninp)%it, & 446 map_ttr(i,j)%array(ninp)%itr, i6, voldatiin) 447 voldatiout = voldatiin 448 CALL volgrid_get_vol_2d(this, i3, map_ttr(i,j)%array(1)%it, & 449 map_ttr(i,j)%array(1)%itr, i6, voldatiin) 451 WHERE( c_e(voldatiin(:,:)) .AND. c_e(voldatiout(:,:))) 452 voldatiout(:,:) = voldatiout(:,:) - voldatiin(:,:) 454 voldatiout(:,:) = rmiss 459 CALL volgrid_get_vol_2d(this, i3, map_ttr(i,j)%array(n)%it, & 460 map_ttr(i,j)%array(n)%itr, i6, voldatiin) 463 voldatiout = voldatiin 465 CALL copy(this%gaid(i3, map_ttr(i,j)%array(n)%it,& 466 map_ttr(i,j)%array(n)%itr,i6), that%gaid(i3,i,j,i6)) 468 that%gaid(i3,i,j,i6) = this%gaid(i3, map_ttr(i,j)%array(n)%it, & 469 map_ttr(i,j)%array(n)%itr,i6) 473 SELECT CASE(stat_proc) 475 WHERE( c_e(voldatiin(:,:)) .AND. c_e(voldatiout(:,:))) 476 voldatiout(:,:) = voldatiout(:,:) + voldatiin(:,:) 478 voldatiout(:,:) = rmiss 481 WHERE( c_e(voldatiin(:,:)) .AND. c_e(voldatiout(:,:))) 482 voldatiout(:,:) = max(voldatiout(:,:), voldatiin(:,:)) 484 voldatiout(:,:) = rmiss 487 WHERE( c_e(voldatiin(:,:)) .AND. c_e(voldatiout(:,:))) 488 voldatiout(:,:) = min(voldatiout(:,:), voldatiin(:,:)) 490 voldatiout(:,:) = rmiss 496 IF (stat_proc == 0) THEN 497 WHERE( c_e(voldatiout(:,:))) 498 voldatiout(:,:) = voldatiout(:,:)/ninp 502 CALL volgrid_set_vol_2d(that, i3, i, j, i6, voldatiout) 512 END SUBROUTINE volgrid6d_compute_stat_proc_agg 539 SUBROUTINE volgrid6d_recompute_stat_proc_diff(this, that, stat_proc, step, full_steps, start, clone) 540 TYPE(volgrid6d), INTENT(inout) :: this 541 TYPE(volgrid6d), INTENT(out) :: that 542 INTEGER, INTENT(in) :: stat_proc 543 TYPE(timedelta), INTENT(in) :: step 544 LOGICAL, INTENT(in), OPTIONAL :: full_steps 545 TYPE(datetime), INTENT(in), OPTIONAL :: start 546 LOGICAL, INTENT(in), OPTIONAL :: clone 547 INTEGER :: i3, i4, i6, i, j, k, l, nitr, steps 548 INTEGER, POINTER :: map_tr(:,:,:,:,:), f(:) 549 REAL, POINTER :: voldatiin1(:,:), voldatiin2(:,:), voldatiout(:,:) 550 LOGICAL, POINTER :: mask_timerange(:) Distruttori per le 2 classi.
|