libsim  Versione6.3.0

◆ 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 1201 del file vol7d_class_compute.F90.

1201 
1202 IF (PRESENT(cyclicdt)) THEN
1203  IF (c_e(cyclicdt)) THEN
1204  time_mask = time_mask .AND. this%time == cyclicdt
1205  ENDIF
1206 ENDIF
1207 
1208 IF (PRESENT(step)) THEN
1209  IF (c_e(step)) THEN
1210  time_mask = time_mask .AND. mod(this%time - lstart, step) == timedelta_0
1211  ENDIF
1212 ENDIF
1213 
1214 CALL vol7d_copy(this,that, ltime=time_mask)
1215 
1216 DEALLOCATE(time_mask)
1217 
1218 END SUBROUTINE vol7d_filter_time
1219 
1220 
1224 SUBROUTINE vol7d_fill_data(this, step, start, stopp, tolerance)
1225 TYPE(vol7d),INTENT(inout) :: this
1226 TYPE(timedelta),INTENT(in) :: step
1227 TYPE(datetime),INTENT(in),OPTIONAL :: start
1228 TYPE(datetime),INTENT(in),OPTIONAL :: stopp
1229 TYPE(timedelta),INTENT(in),optional :: tolerance
1230 
1231 TYPE(datetime) :: lstart, lstop
1232 integer :: indana , indtime ,indlevel ,indtimerange ,inddativarr, indnetwork, iindtime
1233 type(timedelta) :: deltato,deltat, ltolerance
1234 
1235 CALL safe_start_stop(this, lstart, lstop, start, stopp)
1236 IF (.NOT. c_e(lstart) .OR. .NOT. c_e(lstop)) RETURN
1237 
1238 CALL l4f_log(l4f_info, 'vol7d_fill_data: time interval '//trim(to_char(lstart))// &
1239  ' '//trim(to_char(lstop)))
1240 
1241 
1242 ltolerance=step/2
1243 
1244 if (present(tolerance))then
1245  if (c_e(tolerance)) ltolerance=tolerance
1246 end if
1247 
1248 
1249 do indtime=1,size(this%time)
1250 
1251  IF (this%time(indtime) < lstart .OR. this%time(indtime) > lstop .OR. &
1252  mod(this%time(indtime) - lstart, step) /= timedelta_0) cycle
1253  do indtimerange=1,size(this%timerange)
1254  if (this%timerange(indtimerange)%timerange /= 254) cycle
1255  do indnetwork=1,size(this%network)
1256  do inddativarr=1,size(this%dativar%r)
1257  do indlevel=1,size(this%level)
1258  do indana=1,size(this%ana)
1259 
1260  !find the nearest data in time if data is missing
1261  if (.not. c_e(this%voldatir(indana, indtime, indlevel, indtimerange, inddativarr, indnetwork)))then
1262  deltato=timedelta_miss
1263 
1264  !do iindtime=max(indtime-20,1),min(indtime+20,size(this%time)) !check on a chunk: 20 should be enought
1265 
1266  do iindtime=indtime+1,size(this%time) !check forward
1267 
1268  if (c_e(this%voldatir (indana, iindtime, indlevel, indtimerange, inddativarr, indnetwork )))then
1269  deltat=this%time(iindtime)-this%time(indtime)
1270 
1271  if (deltat >= ltolerance) exit
1272 
Restituiscono il valore dell&#39;oggetto in forma di stringa stampabile.
Operatore di resto della divisione.

Generated with Doxygen.