|
◆ vol7d_recompute_stat_proc_diff()
subroutine vol7d_class_compute::vol7d_recompute_stat_proc_diff |
( |
type(vol7d), intent(inout) |
this, |
|
|
type(vol7d), intent(out) |
that, |
|
|
integer, intent(in) |
stat_proc, |
|
|
type(timedelta), intent(in) |
step, |
|
|
logical, intent(in), optional |
full_steps, |
|
|
type(vol7d), intent(out), optional |
other |
|
) |
| |
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. Only floating point single or double precision data with analysis/observation or forecast timerange are processed.
The output that vol7d object contains elements from the original volume this satisfying the conditions
- real single or double precision variables
- timerange (vol7d_timerange_class::vol7d_timerange::timerange) of type stat_proc
- any p1 (analysis/observation or forecast)
- p2 > 0 (processing interval non null, non instantaneous data) and equal to a multiplier of step if full_steps is
.TRUE.
Output data will have timerange of type stat_proc and p2 = step. The supported statistical processing methods (parameter stat_proc) are:
- 0 average
- 1 cumulation
- 4 difference
Input volume may have any value of thistime_definition, and that value will be conserved in the output volume.
- Parametri
-
[in,out] | this | volume providing data to be recomputed, it is not modified by the method, apart from performing a vol7d_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] | full_steps | if provided and .TRUE., process only data having processing interval (p2) equal to a multiplier of step |
[out] | other | optional volume that, on exit, is going to contain the data that did not contribute to the statistical processing |
Definizione alla linea 1022 del file vol7d_class_compute.F90.
1026 CALL vol7d_copy(this, that, ltimerange=tr_mask) 1027 that%timerange(:)%timerange = stat_proc 1029 ALLOCATE(int_ratio( SIZE(that%timerange)), int_ratiod( SIZE(that%timerange))) 1031 IF (stat_proc == 0) THEN 1032 int_ratio = 1./ REAL(that%timerange(:)%p2) 1033 int_ratiod = 1./dble(that%timerange(:)%p2) 1035 int_ratio = REAL(that%timerange(:)%p2) 1036 int_ratiod = dble(that%timerange(:)%p2) 1039 IF ( ASSOCIATED(that%voldatir)) THEN 1040 DO j = 1, SIZE(that%timerange) 1041 WHERE( c_e(that%voldatir(:,:,:,j,:,:))) 1042 that%voldatir(:,:,:,j,:,:) = that%voldatir(:,:,:,j,:,:)*int_ratio(j) 1044 that%voldatir(:,:,:,j,:,:) = rmiss 1049 IF ( ASSOCIATED(that%voldatid)) THEN 1050 DO j = 1, SIZE(that%timerange) 1051 WHERE( c_e(that%voldatid(:,:,:,j,:,:))) 1052 that%voldatid(:,:,:,j,:,:) = that%voldatid(:,:,:,j,:,:)*int_ratiod(j) 1054 that%voldatid(:,:,:,j,:,:) = rmiss 1060 END SUBROUTINE vol7d_compute_stat_proc_metamorph 1079 SUBROUTINE vol7d_fill_time(this, that, step, start, stopp, cyclicdt) 1080 TYPE(vol7d), INTENT(inout) :: this 1081 TYPE(vol7d), INTENT(inout) :: that 1082 TYPE(timedelta), INTENT(in) :: step 1083 TYPE(datetime), INTENT(in), OPTIONAL :: start 1084 TYPE(datetime), INTENT(in), OPTIONAL :: stopp 1085 TYPE(cyclicdatetime), INTENT(in), OPTIONAL :: cyclicdt 1087 TYPE(cyclicdatetime) :: lcyclicdt 1088 TYPE(datetime) :: counter, lstart, lstop 1089 INTEGER :: i, naddtime 1091 CALL safe_start_stop(this, lstart, lstop, start, stopp) 1092 IF (.NOT. c_e(lstart) .OR. .NOT. c_e(lstop) .OR. .NOT. c_e(step)) RETURN 1094 lcyclicdt=cyclicdatetime_miss 1095 if ( present(cyclicdt)) then 1096 if( c_e(cyclicdt)) lcyclicdt=cyclicdt 1099 CALL l4f_log(l4f_info, 'vol7d_fill_time: time interval '//trim( to_char(lstart))// & 1107 naddcount: DO WHILE(counter <= lstop) 1108 DO WHILE(i <= SIZE(this%time)) 1109 IF (counter < this%time(i)) THEN 1112 ELSE IF (counter == this%time(i) .OR. .NOT. counter == lcyclicdt) THEN 1113 counter = counter + step 1118 naddtime = naddtime + 1 1119 counter = counter + step 1132 IF (naddtime > 0) THEN 1135 CALL vol7d_alloc(that, ntime=naddtime) 1136 CALL vol7d_alloc_vol(that) 1142 naddadd: DO WHILE(counter <= lstop) 1143 DO WHILE(i <= SIZE(this%time)) 1144 IF (counter < this%time(i)) THEN 1147 ELSE IF (counter == this%time(i) .OR. .NOT. counter == lcyclicdt) THEN 1148 counter = counter + step 1153 naddtime = naddtime + 1 1154 that%time(naddtime) = counter 1155 counter = counter + step 1158 CALL vol7d_append(that, this, sort=.true.) 1163 CALL vol7d_copy(this, that, sort=.true.) 1167 END SUBROUTINE vol7d_fill_time Restituiscono il valore dell'oggetto in forma di stringa stampabile.
Costruttori per le classi datetime e timedelta.
|