libsim  Versione7.2.1

◆ vol7d_compute_stat_proc_metamorph()

subroutine vol7d_class_compute::vol7d_compute_stat_proc_metamorph ( type(vol7d), intent(inout)  this,
type(vol7d), intent(out)  that,
integer, intent(in)  stat_proc_input,
integer, intent(in)  stat_proc 
)

Specialized method for statistically processing a set of data by integration/differentiation.

This method performs statistical processing by integrating (accumulating) in time values representing time-average rates or fluxes, (stat_proc_input=0 stat_proc=1) or by transforming a time-integrated (accumulated) value in a time-average rate or flux (stat_proc_input=1 stat_proc=0). Analysis/observation or forecast timeranges are processed. The only operation performed is respectively multiplying or dividing the values by the length of the time interval in seconds.

The output that vol7d object contains elements from the original volume this satisfying the conditions

Output data will have timerange of type stat_proc (1 or 0) and p1 and p2 equal to the corresponding input values. The supported statistical processing methods (parameter stat_proc) are:

  • 0 average
  • 1 cumulation

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 vol7d_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

Definizione alla linea 1203 del file vol7d_class_compute.F90.

1203  IF (dtratio(n1) <= 0) cycle ! safety check
1204  ttr_mask = .false.
1205  DO n = 1, map_ttr(i,j)%arraysize
1206  IF (map_ttr(i,j)%array(n)%extra_info == dtratio(n1)) THEN
1207  IF (c_e(this%voldatid(i1,map_ttr(i,j)%array(n)%it,i3, &
1208  map_ttr(i,j)%array(n)%itr,i5,i6))) THEN
1209  ttr_mask(map_ttr(i,j)%array(n)%it, &
1210  map_ttr(i,j)%array(n)%itr) = .true.
1211  ENDIF
1212  ENDIF
1213  ENDDO
1214 
1215  ndtr = count(ttr_mask)
1216  frac_c = REAL(ndtr)/REAL(dtratio(n1))
1217 
1218  IF (ndtr > 0 .AND. frac_c >= max(lfrac_valid, frac_m)) THEN
1219  frac_m = frac_c
1220  SELECT CASE(stat_proc)
1221  CASE (0) ! average
1222  that%voldatid(i1,i,i3,j,i5,i6) = &
1223  sum(this%voldatid(i1,:,i3,:,i5,i6), &
1224  mask=ttr_mask)/ndtr
1225  CASE (1, 4) ! accumulation, difference
1226  that%voldatid(i1,i,i3,j,i5,i6) = &
1227  sum(this%voldatid(i1,:,i3,:,i5,i6), &
1228  mask=ttr_mask)
1229  CASE (2) ! maximum
1230  that%voldatid(i1,i,i3,j,i5,i6) = &
1231  maxval(this%voldatid(i1,:,i3,:,i5,i6), &
1232  mask=ttr_mask)
1233  CASE (3) ! minimum
1234  that%voldatid(i1,i,i3,j,i5,i6) = &
1235  minval(this%voldatid(i1,:,i3,:,i5,i6), &
1236  mask=ttr_mask)
1237  CASE (6) ! stddev
1238  that%voldatid(i1,i,i3,j,i5,i6) = &
1239  stat_stddev( &
1240  reshape(this%voldatid(i1,:,i3,:,i5,i6), shape=linshape), &
1241  mask=reshape(ttr_mask, shape=linshape))
1242  END SELECT
1243  ENDIF
1244 
1245  ENDDO ! dtratio
1246  ENDDO ! var
1247  ENDDO ! network
1248  ENDDO ! level
1249  ENDDO ! ana
1250  CALL delete(map_ttr(i,j))
1251  ENDDO ! otime
1252  ENDDO ! otimerange
1253 ENDIF
1254 
1255 DEALLOCATE(ttr_mask)
1256 
1257 END SUBROUTINE vol7d_recompute_stat_proc_agg_multiv
1258 

Generated with Doxygen.