|
◆ vol7d_recompute_stat_proc_agg_multiv()
subroutine vol7d_class_compute::vol7d_recompute_stat_proc_agg_multiv |
( |
type(vol7d), intent(inout) |
this, |
|
|
type(vol7d), intent(out) |
that, |
|
|
type(timedelta), intent(in) |
step, |
|
|
type(datetime), intent(in), optional |
start, |
|
|
real, intent(in), optional |
frac_valid, |
|
|
integer, intent(in) |
multiv_proc |
|
) |
| |
- 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] | step | length of the step over which the statistical processing is performed |
[in] | start | start of statistical processing interval |
[in] | frac_valid | minimum fraction of valid data required for considering acceptable a recomputed value, default=1. |
[in] | multiv_proc | index of multivariate specific operation |
Definizione alla linea 1272 del file vol7d_class_compute.F90.
1274 TYPE(vol7d), INTENT(inout) :: this
1275 TYPE(vol7d), INTENT(inout) :: that
1276 TYPE(timedelta), INTENT(in) :: step
1277 TYPE(datetime), INTENT(in), OPTIONAL :: start
1278 TYPE(datetime), INTENT(in), OPTIONAL :: stopp
1279 TYPE(cyclicdatetime), INTENT(in), OPTIONAL :: cyclicdt
1281 TYPE(cyclicdatetime) :: lcyclicdt
1282 TYPE(datetime) :: counter, lstart, lstop
1283 INTEGER :: i, naddtime
1285 CALL safe_start_stop(this, lstart, lstop, start, stopp)
1286 IF (.NOT. c_e(lstart) .OR. .NOT. c_e(lstop) .OR. .NOT. c_e(step)) RETURN
1288 lcyclicdt=cyclicdatetime_miss
1289 if ( present(cyclicdt)) then
1290 if(c_e(cyclicdt)) lcyclicdt=cyclicdt
1293 CALL l4f_log(l4f_info, 'vol7d_fill_time: time interval '//trim(to_char(lstart))// &
1294 ' '//trim(to_char(lstop)))
1301 naddcount: DO WHILE(counter <= lstop)
1302 DO WHILE(i <= SIZE(this%time))
1303 IF (counter < this%time(i)) THEN
1306 ELSE IF (counter == this%time(i) .OR. .NOT. counter == lcyclicdt) THEN
1307 counter = counter + step
1312 naddtime = naddtime + 1
1313 counter = counter + step
1326 IF (naddtime > 0) THEN
1329 CALL vol7d_alloc(that, ntime=naddtime)
1330 CALL vol7d_alloc_vol(that)
1336 naddadd: DO WHILE(counter <= lstop)
1337 DO WHILE(i <= SIZE(this%time))
1338 IF (counter < this%time(i)) THEN
1341 ELSE IF (counter == this%time(i) .OR. .NOT. counter == lcyclicdt) THEN
1342 counter = counter + step
1347 naddtime = naddtime + 1
1348 that%time(naddtime) = counter
1349 counter = counter + step
1352 CALL vol7d_append(that, this, sort=.true.)
1357 CALL vol7d_copy(this, that, sort=.true.)
1361 END SUBROUTINE vol7d_fill_time
1375 SUBROUTINE vol7d_filter_time(this, that, step, start, stopp, cyclicdt)
1376 TYPE(vol7d), INTENT(inout) :: this
1377 TYPE(vol7d), INTENT(inout) :: that
1378 TYPE(timedelta), INTENT(in), optional :: step
1379 TYPE(datetime), INTENT(in), OPTIONAL :: start
1380 TYPE(datetime), INTENT(in), OPTIONAL :: stopp
1381 TYPE(cyclicdatetime), INTENT(in), OPTIONAL :: cyclicdt
1383 TYPE(datetime) :: lstart, lstop
1384 LOGICAL, ALLOCATABLE :: time_mask(:)
1386 CALL safe_start_stop(this, lstart, lstop, start, stopp)
1387 IF (.NOT. c_e(lstart) .OR. .NOT. c_e(lstop)) RETURN
1389 CALL l4f_log(l4f_info, 'vol7d_filter_time: time interval '//trim(to_char(lstart))// &
1390 ' '//trim(to_char(lstop)))
1392 ALLOCATE(time_mask( SIZE(this%time)))
1394 time_mask = this%time >= lstart .AND. this%time <= lstop
1396 IF ( PRESENT(cyclicdt)) THEN
1397 IF (c_e(cyclicdt)) THEN
1398 time_mask = time_mask .AND. this%time == cyclicdt
1402 IF ( PRESENT(step)) THEN
1404 time_mask = time_mask .AND. mod(this%time - lstart, step) == timedelta_0
1408 CALL vol7d_copy(this,that, ltime=time_mask)
1410 DEALLOCATE(time_mask)
1412 END SUBROUTINE vol7d_filter_time
1418 SUBROUTINE vol7d_fill_data(this, step, start, stopp, tolerance)
1419 TYPE(vol7d), INTENT(inout) :: this
1420 TYPE(timedelta), INTENT(in) :: step
1421 TYPE(datetime), INTENT(in), OPTIONAL :: start
1422 TYPE(datetime), INTENT(in), OPTIONAL :: stopp
1423 TYPE(timedelta), INTENT(in), optional :: tolerance
1425 TYPE(datetime) :: lstart, lstop
1426 integer :: indana , indtime ,indlevel ,indtimerange ,inddativarr, indnetwork, iindtime
1427 type(timedelta) :: deltato,deltat, ltolerance
1429 CALL safe_start_stop(this, lstart, lstop, start, stopp)
1430 IF (.NOT. c_e(lstart) .OR. .NOT. c_e(lstop)) RETURN
1432 CALL l4f_log(l4f_info, 'vol7d_fill_data: time interval '//trim(to_char(lstart))// &
1433 ' '//trim(to_char(lstop)))
1438 if ( present(tolerance)) then
1439 if (c_e(tolerance)) ltolerance=tolerance
1443 do indtime=1, size(this%time)
1445 IF (this%time(indtime) < lstart .OR. this%time(indtime) > lstop .OR. &
1446 mod(this%time(indtime) - lstart, step) /= timedelta_0) cycle
1447 do indtimerange=1, size(this%timerange)
1448 if (this%timerange(indtimerange)%timerange /= 254) cycle
|