/brief Programma esempio per l'uso di vol7d con DB-All.eVengono estratte più reti
28 TYPE(vol7d_dballe) :: v7d
29 TYPE(vol7d_network) :: dummy_network,network(8)
30 TYPE(datetime) :: ti, tf, tc
31 TYPE(vol7d) :: vol_cumh, vol_cumd
32 TYPE(timedelta) :: dt_cum
33 CHARACTER(len=12) :: c
35 REAL,
POINTER :: vol2d(:,:), vol2d_cum(:,:)
37 CHARACTER(len=512) :: filesim
38 TYPE(geo_coordvect),
POINTER :: macroa(:)
39 INTEGER,
ALLOCATABLE :: in_macroa(:)
42 CALL init(ti, year=2007, month=3, day=18, hour=00)
43 CALL init(tf, year=2007, month=3, day=21, hour=00)
44 CALL init(dummy_network,
'generic')
45 CALL init(network(1),
'rete11')
46 CALL init(network(2),
'rete13')
47 CALL init(network(3),
'rete15')
48 CALL init(network(4),
'rete18')
49 CALL init(network(5),
'rete19')
50 CALL init(network(6),
'rete20')
51 CALL init(network(7),
'rete21')
52 CALL init(network(8),
'rete22')
58 CALL init(v7d,dsn=
"test",user=
"test",password=
"")
61 CALL import(v7d, (/
'B13011'/), network, timei=ti, timef=tf, set_network=dummy_network,varkind=(/
"r"/))
63 print*,shape(v7d%vol7d%voldatir)
68 CALL init(dt_cum, hour=1)
69 CALL vol7d_compute_stat_proc(v7d%vol7d, vol_cumh, 1, 1, dt_cum)
71 CALL vol7d_get_voldatir(vol_cumh, (/vol7d_ana_d,vol7d_time_d/), vol2dp=vol2d_cum)
73 DO i = 1,
SIZE(vol_cumh%time)
74 CALL getval(vol_cumh%time(i), simpledate=c)
75 n = count(vol2d_cum(:,i) /= rmiss)
77 print
'(2A,G12.5)',c,
' prec. media (mm): ', &
78 sum(vol2d_cum(:,i), mask=(vol2d_cum(:,i) /= rmiss))/n
83 CALL init(dt_cum, day=1)
84 CALL init(tc, year=2007, month=3, day=17, hour=00)
85 CALL vol7d_compute_stat_proc(vol_cumh, vol_cumd, 1, 1, dt_cum, tc)
87 CALL vol7d_get_voldatir(vol_cumd, (/vol7d_ana_d,vol7d_time_d/), vol2dp=vol2d_cum)
90 un = open_package_file(
'polipciv4.dat', filetype_data)
92 INQUIRE(unit=un, name=filesim)
94 CALL import(macroa, shpfilesim=filesim)
95 ALLOCATE(in_macroa(
SIZE(vol_cumd%ana)))
98 DO 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
108 DO 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)
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
120 END 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