11type(dbasession) :: session, sessionto
12type(dbaconnection) :: connection
13integer :: ier, category
14CHARACTER(len=512) :: a_name
17call l4f_launcher(a_name,a_name_force=
"dballe_test")
21category=l4f_category_get(a_name//
".main")
25session=
dbasession(connection,wipe=.true.,write=.true.)
29sessionto=
dbasession(filename=
"dballe_test3.bufr",wipe=.true.,write=.true.,memdb=.false.,template=
"generic")
30call export2bufrwithfilter()
32# ifndef F2003_FULL_FEATURES
34call sessionto%delete()
36call connection%delete()
41CALL l4f_category_delete(category)
48type(dbametaanddata),
allocatable :: metaanddata(:)
52print *,
"----------------------------------------------"
53print *,
"--------------- write ------------------------"
55allocate(metaanddata(1))
58 level=
dbalevel(level1=105, l1=2000) &
60 ,ana=
dbaana(lon=10.d0,lat=45.d0) &
66allocate (metaanddata(1)%dataattrv%dataattr(2))
69allocate (metaanddata(1)%dataattrv%dataattr(1)%dat,source=
dbadatai(
"B13003",85))
71allocate (metaanddata(1)%dataattrv%dataattr(2)%dat,source=
dbadatai(
"B12101",27315))
74allocate (attrv%dcv(3))
75allocate (attrv%dcv(1)%dat,source=
dbadatar(
"*B33192",30.))
76allocate (attrv%dcv(2)%dat,source=
dbadatai(
"*B33193",50))
77allocate (attrv%dcv(3)%dat,source=
dbadatar(
"*B33194",70.))
79metaanddata(1)%dataattrv%dataattr(1)%attrv=attrv
80metaanddata(1)%dataattrv%dataattr(2)%attrv=attrv
86do i=1,
size(metaanddata)
87 call metaanddata(i)%display()
89 call metaanddata(i)%extrude(session)
96subroutine export2bufrwithfilter
97type(dbametaanddata),
allocatable:: metaanddatav(:)
98type(dbadcv) :: vars,starvars
103print *,
"----------------------------------------------"
104print *,
"--------------- export2bufr ------------------------"
106allocate (vars%dcv(1))
107allocate (vars%dcv(1)%dat,source=
dbadatai(
"B12101"))
109allocate (starvars%dcv(2))
110allocate (starvars%dcv(1)%dat,source=
dbadatab(
"*B33193"))
111allocate (starvars%dcv(2)%dat,source=
dbadatab(
"*B33194"))
115call session%ingest(metaanddatav,filter=filter)
116do i=1,
size(metaanddatav)
117 call metaanddatav(i)%display()
118 call metaanddatav(i)%extrude(sessionto)
124call session%ingest(metaanddatav,filter=filter)
125do i=1,
size(metaanddatav)
126 call metaanddatav(i)%display()
127 call metaanddatav(i)%extrude(sessionto)
131filter=
dbafilter(vars=vars,starvars=starvars)
133call session%ingest(metaanddatav,filter=filter)
134do i=1,
size(metaanddatav)
135 call metaanddatav(i)%display()
136 call metaanddatav(i)%extrude(sessionto)
142call session%ingest(metaanddatav,filter=filter)
143do i=1,
size(metaanddatav)
144 call metaanddatav(i)%display()
145 call metaanddatav(i)%extrude(sessionto)
148end subroutine export2bufrwithfilter
150end program dballe_test3
Global log4fortran constructor.
Classi per la gestione delle coordinate temporali.
class for import and export data from e to DB-All.e.
classe per la gestione del logging
Definitions of constants and functions for working with missing values.
Class for expressing an absolute time value.
manage connection handle to a DSN
integer version for dbadata
filter to apply before ingest data