libsim Versione 8.0.0
vol7d_dballe_test2.F90
1! Copyright (C) 2016 ARPA-SIM <urpsim@smr.arpa.emr.it>
2! authors:
3! Davide Cesari <dcesari@arpa.emr.it>
4! Paolo Patruno <ppatruno@arpa.emr.it>
5
6! This program is free software; you can redistribute it and/or
7! modify it under the terms of the GNU General Public License as
8! published by the Free Software Foundation; either version 2 of
9! the License, or (at your option) any later version.
10
11! This program is distributed in the hope that it will be useful,
12! but WITHOUT ANY WARRANTY; without even the implied warranty of
13! MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14! GNU General Public License for more details.
15
16! You should have received a copy of the GNU General Public License
17! along with this program. If not, see <http://www.gnu.org/licenses/>.
18PROGRAM v7ddballe_test
19! Programma di esempio di estrazione e scrittura dall'archivio DB-all.e
24
25IMPLICIT NONE
26
27TYPE(vol7d_dballe) :: v7d_dba
28TYPE(vol7d) :: v7d
29TYPE(vol7d_network):: network
30
31INTEGER :: ier
32TYPE(l4f_handle) :: category
33CHARACTER(len=512):: a_name,filename="vol7d_dballe_test2.bufr",filenameout="vol7d_dballe_test2_out.bufr"
34
35!questa chiamata prende dal launcher il nome univoco
36call l4f_launcher(a_name)
37!init di log4fortran
38ier=l4f_init()
39
40!imposta a_name
41category=l4f_category_get_handle(a_name//".main")
42
43call l4f_category_log(category,l4f_info,"inizio")
44
45print*,"!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!"
46print*,"!! import/export from file"
47print*,"!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!"
48
49! Chiamo il costruttore della classe vol7d_dballe per il mio oggetto in export
50CALL init(v7d_dba,filename=filename,file=.true.,categoryappend="v7ddballe_read")
51
52call l4f_category_log(category,l4f_info,"End data init")
53
54call l4f_category_log(category,l4f_info,"start import")
55
56call init(network,'TEMP')
57CALL import(v7d_dba,["B10004","B12101","B12103"],varkind=["r","d","i"], &
58 network=network,anavar=["B01001","B07030"],anavarkind=["r","i"])
59
60call l4f_category_log(category,l4f_info,"end import")
61
62call vol7d_copy(v7d_dba%vol7d,v7d)
63CALL delete (v7d_dba)
64
65call display(v7d)
66
67
68CALL init(v7d_dba,filename=filenameout,file=.true.,write=.true.,wipe=.true.,categoryappend="v7ddballe_write")
69
70call vol7d_copy(v7d,v7d_dba%vol7d)
71
72call l4f_category_log(category,l4f_info,"start export")
73CALL export(v7d_dba)
74call l4f_category_log(category,l4f_info,"end export")
75
76CALL delete (v7d_dba)
77CALL delete (v7d)
78
79
80!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
81
82!chiudo il logger
83call l4f_category_delete(category)
84ier=l4f_fini()
85
86END PROGRAM v7ddballe_test
Emit log message for a category with specific priority.
Global log4fortran destructor.
Global log4fortran constructor.
Scrittura su file.
Lettura da file.
Costruttore per la classe vol7d.
class for import and export data from e to DB-All.e.
classe per la gestione del logging
Classe per la gestione di un volume completo di dati osservati.
classe per import ed export di volumi da e in DB-All.e

Generated with Doxygen.