libsim Versione 7.2.4
example_vg6d_7.f90

Programma trasformazione da vol7d a volgrid6d.

Programma trasformazione da vol7d a volgrid6d

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 demo7
19
22use grid_class
27
28implicit none
29
30integer :: category,ier
31character(len=512):: a_name,filename="out.bufr"
32type (volgrid6d),pointer :: volgrid(:)
33type(transform_def) :: trans
34TYPE(vol7d_dballe) :: v7d_import
35type(griddim_def) :: griddim_out
36
37integer :: nx=40,ny=40,component_flag=0
38type(grid_id) :: gaid_template
39doubleprecision :: xmin=0., xmax=30., ymin=30., ymax=60.
40doubleprecision :: latitude_south_pole=-32.5,longitude_south_pole=10.,angle_rotation=0.
41character(len=80) :: type='regular_ll',trans_type='inter',sub_type='linear'
42
43!questa chiamata prende dal launcher il nome univoco
44call l4f_launcher(a_name,a_name_force="demo7")
45
46!init di log4fortran
47ier=l4f_init()
48
49!imposta a_name
50category=l4f_category_get(a_name//".main")
51
52call l4f_category_log(category,l4f_info,"inizio")
53
54allocate (volgrid(1))
55
56call init(griddim_out,&
57 proj_type=type,nx=nx,ny=ny, &
58 xmin=xmin, xmax=xmax, ymin=ymin, ymax=ymax, component_flag=component_flag, &
59 latitude_south_pole=latitude_south_pole,longitude_south_pole=longitude_south_pole,angle_rotation=angle_rotation, &
60 categoryappend=type)
61
62call griddim_unproj(griddim_out)
63
64print*,'grid di interpolazione >>>>>>>>>>>>>>>>>>>>'
65call display(griddim_out)
66
67gaid_template = grid_id_new(grib_api_template="regular_ll_sfc_grib1")
68
69!trasformation object
70call init(trans, trans_type=trans_type,sub_type=sub_type, categoryappend="trasformation")
71
72! Chiamo il costruttore della classe vol7d_dballe per il mio oggetto in import
73CALL init(v7d_import,file=.true.,write=.false.,filename=filename,&
74 categoryappend="importBUFR",format="BUFR")
75
76call import (v7d_import,var=(/"B12101"/),varkind=(/"r"/))
77
78call display(v7d_import%vol7d)
79
80call l4f_category_log(category,l4f_info,"trasformato")
81call transform(trans,griddim_out, vol7d_in=v7d_import%vol7d, &
82 volgrid6d_out=volgrid(1), gaid_template=gaid_template, &
83 categoryappend="trasform->")
84
85call l4f_category_log(category,l4f_info,"export to GRIB")
86CALL export(volgrid, 'examp[le_v7d.grb', gaid_template=gaid_template,&
87 categoryappend="volume scritto")
88
89if (associated(volgrid)) call delete(volgrid)
90
91call l4f_category_log(category,l4f_info,"terminato")
92
93call delete (v7d_import)
94
95!chiudo il logger
96call l4f_category_delete(category)
97ier=l4f_fini()
98
99end program demo7
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.
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.
This module defines an abstract interface to different drivers for access to files containing gridded...
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.