11type(dbasession) :: session, sessionto
12type(dbaconnection) :: connection
13TYPE(l4f_handle) :: category
15CHARACTER(len=512) :: a_name
18call l4f_launcher(a_name,a_name_force=
"dballe_test")
22category=l4f_category_get_handle(trim(a_name)//
".main")
26session=
dbasession(connection,wipe=.true.,write=.true.)
30sessionto=
dbasession(filename=
"dballe_test3.bufr",wipe=.true.,write=.true.,memdb=.false.,template=
"generic")
31call export2bufrwithfilter()
33# ifndef F2003_FULL_FEATURES
35call sessionto%delete()
37call connection%delete()
42CALL l4f_category_delete(category)
49type(dbametaanddata),
allocatable :: metaanddata(:)
53print *,
"----------------------------------------------"
54print *,
"--------------- write ------------------------"
56allocate(metaanddata(1))
59 level=
dbalevel(level1=105, l1=2000) &
61 ,ana=
dbaana(lon=10.d0,lat=45.d0) &
67allocate (metaanddata(1)%dataattrv%dataattr(2))
70allocate (metaanddata(1)%dataattrv%dataattr(1)%dat,source=
dbadatai(
"B13003",85))
72allocate (metaanddata(1)%dataattrv%dataattr(2)%dat,source=
dbadatai(
"B12101",27315))
75allocate (attrv%dcv(3))
76allocate (attrv%dcv(1)%dat,source=
dbadatar(
"*B33192",30.))
77allocate (attrv%dcv(2)%dat,source=
dbadatai(
"*B33193",50))
78allocate (attrv%dcv(3)%dat,source=
dbadatar(
"*B33194",70.))
80metaanddata(1)%dataattrv%dataattr(1)%attrv=attrv
81metaanddata(1)%dataattrv%dataattr(2)%attrv=attrv
87do i=1,
size(metaanddata)
88 call metaanddata(i)%display()
90 call metaanddata(i)%extrude(session)
97subroutine export2bufrwithfilter
98type(dbametaanddata),
allocatable:: metaanddatav(:)
99type(dbadcv) :: vars,starvars
100type(dbafilter) filter
104print *,
"----------------------------------------------"
105print *,
"--------------- export2bufr ------------------------"
107allocate (vars%dcv(1))
108allocate (vars%dcv(1)%dat,source=
dbadatai(
"B12101"))
110allocate (starvars%dcv(2))
111allocate (starvars%dcv(1)%dat,source=
dbadatab(
"*B33193"))
112allocate (starvars%dcv(2)%dat,source=
dbadatab(
"*B33194"))
116call session%ingest(metaanddatav,filter=filter)
117do i=1,
size(metaanddatav)
118 call metaanddatav(i)%display()
119 call metaanddatav(i)%extrude(sessionto)
125call session%ingest(metaanddatav,filter=filter)
126do i=1,
size(metaanddatav)
127 call metaanddatav(i)%display()
128 call metaanddatav(i)%extrude(sessionto)
132filter=
dbafilter(vars=vars,starvars=starvars)
134call session%ingest(metaanddatav,filter=filter)
135do i=1,
size(metaanddatav)
136 call metaanddatav(i)%display()
137 call metaanddatav(i)%extrude(sessionto)
143call session%ingest(metaanddatav,filter=filter)
144do i=1,
size(metaanddatav)
145 call metaanddatav(i)%display()
146 call metaanddatav(i)%extrude(sessionto)
149end subroutine export2bufrwithfilter
151end program dballe_test3
Global log4fortran destructor.
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