libsim Versione 7.2.1
example_vg6d_6.f90

Programma trasformazione da volgrid6d a vol7d.

Programma trasformazione da volgrid6d a vol7d

1! Copyright (C) 2010 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 demo6
19
22use grid_class
26
27implicit none
28
29integer :: category,ier,i,nana
30character(len=512):: a_name,filename="out.bufr"
31type (volgrid6d),pointer :: volgrid(:),volgrid_out(:)
32type(transform_def) :: trans
33type(vol7d) :: v7d
34type(vol7d) :: vol7d_out
35TYPE(vol7d_dballe) :: v7d_exp
36
37
38!questa chiamata prende dal launcher il nome univoco
39call l4f_launcher(a_name,a_name_force="demo6")
40
41!init di log4fortran
42ier=l4f_init()
43
44!imposta a_name
45category=l4f_category_get(a_name//".main")
46
47call l4f_category_log(category,l4f_info,"inizio")
48
49!!$ nana=5
50!!$ allocate(ana(nana))
51!!$ !target points
52!!$ call init(ana(1),lat=45.D0,lon=11.D0)
53!!$ call init(ana(2),lat=45.6D0,lon=11.8D0)
54!!$ call init(ana(3),lat=46.6D0,lon=12.8D0)
55!!$ call init(ana(4),lat=40.6D0,lon=11.8D0)
56!!$ call init(ana(5),lat=40.0D0,lon=10.0D0)
57
58call init(v7d)
59
60call import (v7d,filename="ana.v7d")
61
62call display(v7d)
63
64!trasformation object
65call init(trans, trans_type="inter",sub_type="bilin", categoryappend="trasformation")
66
67call import (volgrid,filename="in.grb",categoryappend="volume letto")
68
69call transform(trans, volgrid6d_in=volgrid, vol7d_out=vol7d_out, v7d=v7d, categoryappend="trasforma")
70
71call l4f_category_log(category,l4f_info,"trasformato")
72
73if (associated(volgrid)) call delete(volgrid)
74
75call l4f_category_log(category,l4f_info,"export to BUFR")
76
77
78! Chiamo il costruttore della classe vol7d_dballe per il mio oggetto in export
79CALL init(v7d_exp,file=.true.,write=.true.,wipe=.true.,filename=filename,&
80categoryappend="exportBUFR",format="BUFR",template="synop")
81
82CALL display(vol7d_out)
83v7d_exp%vol7d = vol7d_out
84CALL export(v7d_exp)
85
86CALL l4f_category_log(category,l4f_info,"terminato")
87
88CALL delete (v7d_exp)
89
90!chiudo il logger
91CALL l4f_category_delete(category)
92ier=l4f_fini()
93
94end program demo6
Destructors of the corresponding objects.
Definition: grid_class.F90:297
Print a brief description on stdout.
Definition: grid_class.F90:349
Export griddim object to grid_id.
Definition: grid_class.F90:344
Constructors of the corresponding objects.
Definition: grid_class.F90:292
Emit log message for a category with specific priority.
log4fortran destructor
Global log4fortran constructor.
Transform between any combination of volgrid6d and vol7d objects by means of a transform_def object d...
Module for describing geographically referenced regular grids.
Definition: grid_class.F90:237
Module for defining transformations between rectangular georeferenced grids and between grids and spa...
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
This module defines objects and methods for managing data volumes on rectangular georeferenced grids.

Generated with Doxygen.