Programma esempio semplice per la lettura di file grib.
Programma esempio semplice per la lettura di file grib. Programma che legge i grib contenuti in un file e li organizza in un vettore di oggetti gridinfo
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18program demo2
19
24
25implicit none
26
27integer :: ier
28type(l4f_handle) :: category
29character(len=512):: a_name
30type(arrayof_gridinfo) :: gridinfo
31
32TYPE(grid_file_id) :: ifile
33TYPE(grid_id) :: gaid
34INTEGER :: ngrib
35
36
37call l4f_launcher(a_name,a_name_force="demo2")
38
39
40category=l4f_category_get_handle(a_name//".main")
41
42
44
45
46ngrib=0
47
48ifile = grid_file_id_new('../data/in.grb','r')
49
50DO WHILE (.true.)
51 gaid = grid_id_new(ifile)
52 IF (.NOT.
c_e(gaid))
EXIT
53
54 ngrib = ngrib + 1
56ENDDO
57
59
61 "Numero totale di grib: "//
to_char(ngrib))
62
63
64CALL insert(gridinfo, nelem=ngrib)
65
66ngrib=0
67
68ifile = grid_file_id_new('../data/in.grb','r')
69
70DO WHILE (.true.)
71 gaid = grid_id_new(ifile)
72 IF (.NOT.
c_e(gaid))
EXIT
73
75 ngrib = ngrib + 1
76 CALL init (gridinfo%array(ngrib), gaid=gaid)
77 CALL import(gridinfo%array(ngrib))
78ENDDO
79
82
84
86
87
88call l4f_category_delete(category)
90
91end program demo2
Destructor for the line_split class.
Set of functions that return a CHARACTER representation of the input variable.
Check whether the corresponding object has been correctly associated.
Display on standard output a description of the grid_id object provided.
Constructors for the corresponding classes in SUBROUTINE form.
Import information from a file or grid_id object into the gridinfo descriptors.
Method for inserting elements of the array at a desired position.
Emit log message for a category with specific priority.
Global log4fortran destructor.
Global log4fortran constructor.
Utilities for CHARACTER variables.
This module defines an abstract interface to different drivers for access to files containing gridded...
Class for managing information about a single gridded georeferenced field, typically imported from an...
classe per la gestione del logging