1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18PROGRAM v7ddballe
19
25
26IMPLICIT NONE
27
28TYPE(vol7d_dballe) :: v7d
29TYPE(vol7d_network) :: dummy_network,network(8)
30TYPE(datetime) :: ti, tf, tc
31TYPE(vol7d) :: vol_cumh, vol_cumd
32TYPE(timedelta) :: dt_cum
33CHARACTER(len=12) :: c
34INTEGER :: i,j, n
35REAL, POINTER :: vol2d(:,:), vol2d_cum(:,:)
36INTEGER :: un
37CHARACTER(len=512) :: filesim
38TYPE(geo_coordvect),POINTER :: macroa(:)
39INTEGER, ALLOCATABLE :: in_macroa(:)
40
41
42CALL init(ti, year=2007, month=3, day=18, hour=00)
43CALL init(tf, year=2007, month=3, day=21, hour=00)
44CALL init(dummy_network,
'generic')
45CALL init(network(1),
'rete11')
46CALL init(network(2),
'rete13')
47CALL init(network(3),
'rete15')
48CALL init(network(4),
'rete18')
49CALL init(network(5),
'rete19')
50CALL init(network(6),
'rete20')
51CALL init(network(7),
'rete21')
52CALL init(network(8),
'rete22')
53
54
55
56
57
58CALL init(v7d,dsn=
"test",user=
"test",password=
"")
59
60
61CALL import(v7d, (/
'B13011'/), network, timei=ti, timef=tf, set_network=dummy_network,varkind=(/
"r"/))
62
63print*,shape(v7d%vol7d%voldatir)
64
66
67
68CALL init(dt_cum, hour=1)
69CALL vol7d_compute_stat_proc(v7d%vol7d, vol_cumh, 1, 1, dt_cum)
70
71CALL vol7d_get_voldatir(vol_cumh, (/vol7d_ana_d,vol7d_time_d/), vol2dp=vol2d_cum)
72
73DO i = 1, SIZE(vol_cumh%time)
74 CALL getval(vol_cumh%time(i), simpledate=c)
75 n = count(vol2d_cum(:,i) /= rmiss)
76 IF (n > 0) THEN
77 print'(2A,G12.5)',c,' prec. media (mm): ', &
78 sum(vol2d_cum(:,i), mask=(vol2d_cum(:,i) /= rmiss))/n
79 ENDIF
80ENDDO
81
82
83CALL init(dt_cum, day=1)
84CALL init(tc, year=2007, month=3, day=17, hour=00)
85CALL vol7d_compute_stat_proc(vol_cumh, vol_cumd, 1, 1, dt_cum, tc)
86
87CALL vol7d_get_voldatir(vol_cumd, (/vol7d_ana_d,vol7d_time_d/), vol2dp=vol2d_cum)
88
89
90un = open_package_file('polipciv4.dat', filetype_data)
91IF (un < 0) stop 1
92INQUIRE(unit=un, name=filesim)
93CLOSE(un)
94CALL import(macroa, shpfilesim=filesim)
95ALLOCATE(in_macroa(SIZE(vol_cumd%ana)))
96in_macroa = 0
97
98DO i = 1, SIZE(vol_cumd%ana)
99 DO j = 1, SIZE(macroa)
100 IF (geo_coord_inside(vol_cumd%ana(i)%coord, macroa(j))) THEN
101 in_macroa(i) = j
102 cycle
103 ENDIF
104 ENDDO
105ENDDO
106
107
108DO i = 1, SIZE(vol_cumd%time)
109 CALL getval(vol_cumd%time(i), simpledate=c)
110 DO j = 1, SIZE(macroa)
111 n = count(vol2d_cum(:,i) /= rmiss .AND. in_macroa(:) == j)
112 IF (n > 0) THEN
113 print'(2A,I3,A,G12.5)',c,' macroarea: ',j,' prec media (mm): ', &
114 sum(vol2d_cum(:,i), mask=(vol2d_cum(:,i) /= rmiss &
115 .AND. in_macroa(:) == j))/n
116 ENDIF
117 ENDDO
118ENDDO
119
120END PROGRAM v7ddballe
Restituiscono il valore dell'oggetto nella forma desiderata.
Costruttori per le classi datetime e timedelta.
Classi per la gestione delle coordinate temporali.
Utilities for managing files.
Extension of vol7d_class with methods for performing simple statistical operations on entire volumes ...
Classe per la gestione di un volume completo di dati osservati.
classe per import ed export di volumi da e in DB-All.e