libsim  Versione6.3.0

◆ volgrid6d_compute_stat_proc()

subroutine volgrid6d_class_compute::volgrid6d_compute_stat_proc ( type(volgrid6d), intent(inout)  this,
type(volgrid6d), intent(out)  that,
integer, intent(in)  stat_proc_input,
integer, intent(in)  stat_proc,
type(timedelta), intent(in)  step,
type(datetime), intent(in), optional  start,
logical, intent(in), optional  full_steps,
real, intent(in), optional  frac_valid,
type(timedelta), intent(in), optional  max_step,
logical, intent(in), optional  weighted,
logical, intent(in), optional  clone 
)

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:

  • stat_proc_input = 254

    • stat_proc = 0 average instantaneous observations
    • stat_proc = 2 compute maximum of instantaneous observations
    • stat_proc = 3 compute minimum of instantaneous observations
    • stat_proc = 4 compute difference of instantaneous observations

    processing is computed on longer time intervals by aggregation, see the description of volgrid6d_compute_stat_proc_agg()

  • stat_proc_input = *

    • stat_proc = 254 consider statistically processed values as instantaneous without any extra processing

    see the description of volgrid6d_decompute_stat_proc()

  • stat_proc_input = 0, 1, 2, 3, 4

    • stat_proc = stat_proc_input recompute input data on different intervals

    the same statistical processing is applied to obtain data processed on a different interval, either longer, by aggregation, or shorter, by differences, see the description of volgrid6d_recompute_stat_proc_agg() and volgrid6d_recompute_stat_proc_diff() respectively; it is also possible to provide stat_proc_input /= stat_proc, but it has to be used with care.

  • stat_proc_input = 0

    • stat_proc = 1

    a time-averaged rate or flux is transformed into a time-integrated value (sometimes called accumulated) on the same interval by multiplying the values by the length of the time interval in seconds, keeping constant all the rest, including the variable; the unit of the variable implicitly changes accordingly, this is supported officially in grib2 standard, in the other cases it is a forcing of the standards.

  • stat_proc_input = 1

    • stat_proc = 0

    a time-integrated value (sometimes called accumulated) is transformed into a time-averaged rate or flux on the same interval by dividing the values by the length of the time interval in seconds, see also the previous description of the opposite computation.

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.

Parametri
[in,out]thisvolume providing data to be recomputed, it is not modified by the method, apart from performing a volgrid6d_alloc_vol on it
[out]thatoutput volume which will contain the recomputed data
[in]stat_proc_inputtype of statistical processing of data that has to be processed (from grib2 table), only data having timerange of this type will be processed, the actual statistical processing performed and which will appear in the output volume, is however determined by stat_proc argument
[in]stat_proctype of statistical processing to be recomputed (from grib2 table), data in output volume that will have a timerange of this type
[in]steplength of the step over which the statistical processing is performed
[in]startstart of statistical processing interval
[in]full_stepsif .TRUE. cumulate only on intervals starting at a forecast time modulo step, default is to cumulate on all possible combinations of intervals
[in]frac_validminimum fraction of valid data required for considering acceptable a recomputed value, default=1.
[in]weightedif provided and .TRUE., the statistical process is computed, if possible, by weighting every value with a weight proportional to its validity interval
[in]cloneif provided and .TRUE. , clone the gaid's from this to that

Definizione alla linea 316 del file volgrid6d_class_compute.F90.

316  END SELECT
317 
318  ENDIF ! first time
319  ENDIF ! dtratio(n1)
320  ENDDO ! ttr
321 
322  IF (REAL(ndtr)/REAL(dtratio(n1)) >= lfrac_valid) THEN ! success
323  IF (stat_proc == 0) THEN ! average
324  WHERE(c_e(voldatiout(:,:)))
325  voldatiout(:,:) = voldatiout(:,:)/ndtr
326  END WHERE
327  ENDIF
328  CALL volgrid_set_vol_2d(that, i3, i, j, i6, voldatiout)
329  ENDIF
330 
331  ENDDO ! level
332  ENDDO ! var
333  ENDDO ! dtratio
334  CALL delete(map_ttr(i,j))
335  ENDDO do_otime
336 ENDDO do_otimerange
337 
338 DEALLOCATE(dtratio, map_ttr)
339 
340 END SUBROUTINE volgrid6d_recompute_stat_proc_agg
341 
342 
366 SUBROUTINE volgrid6d_compute_stat_proc_agg(this, that, stat_proc, step, start, max_step, clone)
367 TYPE(volgrid6d),INTENT(inout) :: this
368 TYPE(volgrid6d),INTENT(out) :: that
369 INTEGER,INTENT(in) :: stat_proc
370 TYPE(timedelta),INTENT(in) :: step
371 TYPE(datetime),INTENT(in),OPTIONAL :: start
372 TYPE(timedelta),INTENT(in),OPTIONAL :: max_step
373 LOGICAL , INTENT(in),OPTIONAL :: clone
374 
375 INTEGER :: tri
376 INTEGER i, j, n, ninp, i3, i6
377 TYPE(arrayof_ttr_mapper),POINTER :: map_ttr(:,:)
378 TYPE(timedelta) :: lmax_step
379 LOGICAL :: lclone
380 REAL,POINTER :: voldatiin(:,:), voldatiout(:,:)
381 
382 
383 NULLIFY(voldatiin, voldatiout)
384 tri = 254
385 IF (PRESENT(max_step)) THEN
386  lmax_step = max_step
387 ELSE
388  lmax_step = timedelta_max
389 ENDIF
390 
391 CALL init(that)
392 ! be safe
Distruttori per le 2 classi.
Costruttori per le classi datetime e timedelta.

Generated with Doxygen.