libsim  Versione6.3.0

◆ volgrid6d_recompute_stat_proc_diff()

subroutine volgrid6d_class_compute::volgrid6d_recompute_stat_proc_diff ( type(volgrid6d), intent(inout)  this,
type(volgrid6d), intent(out)  that,
integer, intent(in)  stat_proc,
type(timedelta), intent(in)  step,
logical, intent(in), optional  full_steps,
type(datetime), intent(in), optional  start,
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 difference of different intervals. Data with both analysis/observation or forecast timerange are processed.

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
  • 1 accumulation
  • 4 difference

Input volume may have any value of thistime_definition, and that value will be conserved in the output volume.

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_proctype 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]steplength of the step over which the statistical processing is performed
[in]full_stepsif provided and .TRUE., process only data having processing interval (p2) equal to a multiple of step
[in]startif provided, together with full_steps, processes data on intervals starting at start +- an integer amount of step intervals
[in]cloneif provided and .TRUE. , clone the gaid's from this to that

Definizione alla linea 753 del file volgrid6d_class_compute.F90.

753 CALL compute_stat_proc_metamorph_common(stat_proc_input, this%timerange, stat_proc, &
754  that%timerange, map_tr)
755 
756 ! complete the definition of the output volume
757 CALL volgrid6d_alloc_vol(that, decode=ASSOCIATED(this%voldati))
758 
759 IF (stat_proc == 0) THEN ! average -> integral
760  int_ratio = 1./REAL(that%timerange(:)%p2)
761 ELSE ! cumulation
762  int_ratio = REAL(that%timerange(:)%p2)
763 ENDIF
764 
765 DO i6 = 1, SIZE(this%var)
766  DO j = 1, SIZE(map_tr)
767  DO i4 = 1, SIZE(that%time)
768  DO i3 = 1, SIZE(this%level)
769 
770  IF (lclone) THEN
771  CALL copy(this%gaid(i3,i4,map_tr(j),i6), that%gaid(i3,i4,j,i6))
772  ELSE
773  that%gaid(i3,i4,map_tr(j),i6) = this%gaid(i3,i4,j,i6)
774  ENDIF
775  CALL volgrid_get_vol_2d(this, i3, i4, map_tr(j), i6, voldatiin)
776  CALL volgrid_get_vol_2d(that, i3, i4, j, i6, voldatiout)
777  WHERE (c_e(voldatiin))
778  voldatiout = voldatiin*int_ratio(j)
779  ELSEWHERE
780  voldatiout = rmiss
781  END WHERE
782  CALL volgrid_set_vol_2d(that, i3, i4, j, i6, voldatiout)
783  ENDDO
784  ENDDO
785  ENDDO
786 ENDDO
787 
788 
789 END SUBROUTINE volgrid6d_compute_stat_proc_metamorph
790 
791 END MODULE volgrid6d_class_compute
792 
Extension of volgrid6d_class with methods for performing simple statistical operations on entire volu...

Generated with Doxygen.