libsim  Versione 7.1.8
vol7d_dballe_test.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/>.
18 PROGRAM v7ddballe_test
19 ! Programma di esempio di estrazione e scrittura dall'archivio DB-all.e
20 use dballe_class
21 USE log4fortran
22 USE vol7d_class
24 
25 IMPLICIT NONE
26 
27 TYPE(vol7d_dballe) :: v7d_dba
28 TYPE(vol7d) :: v7d
29 
30 integer :: category,ier
31 character(len=512):: a_name,filename="vol7d_dballe_test.bufr",filenameout="vol7d_dballe_test_out.bufr"
32 
33 !questa chiamata prende dal launcher il nome univoco
34 call l4f_launcher(a_name)
35 !init di log4fortran
36 ier=l4f_init()
37 
38 !imposta a_name
39 category=l4f_category_get(a_name//".main")
40 
41 call l4f_category_log(category,l4f_info,"inizio")
42 
43 print*,"!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!"
44 print*,"!! import/export from file"
45 print*,"!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!"
46 
47 ! Chiamo il costruttore della classe vol7d_dballe per il mio oggetto in export
48 CALL init(v7d_dba,filename=filename,file=.true.,categoryappend="v7ddballe_read")
49 
50 call l4f_category_log(category,l4f_info,"End data init")
51 
52 call l4f_category_log(category,l4f_info,"start import")
53 
54 CALL import(v7d_dba&
55  ,var=["B10004","B12101","B12103"]&
56 ! ,var=["B10004","B12101"]&
57 ! ,var=["B10004","B12103"]&
58 ! ,var=["B12101","B12103"]&
59  ! ,varkind=["r","i","c"]&
60  ! ,attr=["*B33196","*B33192","*B33193"],attrkind=["b","c","b"]&
61  ! ,anavar=["B12101"],anaattr=["*B33192"]&
62  )
63 
64 call l4f_category_log(category,l4f_info,"end import")
65 
66 call vol7d_copy(v7d_dba%vol7d,v7d)
67 CALL delete (v7d_dba)
68 
69 call display(v7d)
70 
71 
72 CALL init(v7d_dba,filename=filenameout,file=.true.,write=.true.,wipe=.true.,categoryappend="v7ddballe_write")
73 
74 call vol7d_copy(v7d,v7d_dba%vol7d)
75 
76 call l4f_category_log(category,l4f_info,"start export")
77 CALL export(v7d_dba)
78 call l4f_category_log(category,l4f_info,"end export")
79 
80 CALL delete (v7d_dba)
81 CALL delete (v7d)
82 
83 
84 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
85 
86 !chiudo il logger
87 call l4f_category_delete(category)
88 ier=l4f_fini()
89 
90 END PROGRAM v7ddballe_test
Emit log message for a category with specific priority.
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.