libsim Versione 8.0.0
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 :: ier,i,nana
30type(l4f_handle) :: category
31character(len=512):: a_name,filename="out.bufr"
32type (volgrid6d),pointer :: volgrid(:),volgrid_out(:)
33type(transform_def) :: trans
34type(vol7d) :: v7d
35type(vol7d) :: vol7d_out
36TYPE(vol7d_dballe) :: v7d_exp
37
38
39!questa chiamata prende dal launcher il nome univoco
40call l4f_launcher(a_name,a_name_force="demo6")
41
42!init di log4fortran
43ier=l4f_init()
44
45!imposta a_name
46category=l4f_category_get_handle(a_name//".main")
47
48call l4f_category_log(category,l4f_info,"inizio")
49
50!!$ nana=5
51!!$ allocate(ana(nana))
52!!$ !target points
53!!$ call init(ana(1),lat=45.D0,lon=11.D0)
54!!$ call init(ana(2),lat=45.6D0,lon=11.8D0)
55!!$ call init(ana(3),lat=46.6D0,lon=12.8D0)
56!!$ call init(ana(4),lat=40.6D0,lon=11.8D0)
57!!$ call init(ana(5),lat=40.0D0,lon=10.0D0)
58
59call init(v7d)
60
61call import (v7d,filename="ana.v7d")
62
63call display(v7d)
64
65!trasformation object
66call init(trans, trans_type="inter",sub_type="bilin", categoryappend="trasformation")
67
68call import (volgrid,filename="in.grb",categoryappend="volume letto")
69
70call transform(trans, volgrid6d_in=volgrid, vol7d_out=vol7d_out, v7d=v7d, categoryappend="trasforma")
71
72call l4f_category_log(category,l4f_info,"trasformato")
73
74if (associated(volgrid)) call delete(volgrid)
75
76call l4f_category_log(category,l4f_info,"export to BUFR")
77
78
79! Chiamo il costruttore della classe vol7d_dballe per il mio oggetto in export
80CALL init(v7d_exp,file=.true.,write=.true.,wipe=.true.,filename=filename,&
81categoryappend="exportBUFR",format="BUFR",template="synop")
82
83CALL display(vol7d_out)
84v7d_exp%vol7d = vol7d_out
85CALL export(v7d_exp)
86
87CALL l4f_category_log(category,l4f_info,"terminato")
88
89CALL delete (v7d_exp)
90
91!chiudo il logger
92CALL l4f_category_delete(category)
93ier=l4f_fini()
94
95end program demo6
Destructors of the corresponding objects.
Print a brief description on stdout.
Export griddim object to grid_id.
Constructors of the corresponding objects.
Emit log message for a category with specific priority.
Global 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.
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.