libsim  Versione8.0.0
example_alchimiav7d.f03

Sample program to demostrate the alchimia module with vol7d.

1 program alchimiav7d
2 
3 USE alchimia
4 USE termo
5 USE vol7d_class
7 USE vol7d_alchimia_class
9 use log4fortran
10 
11 IMPLICIT NONE
12 type(fndsv) :: vfn,vfnoracle
13 character(len=10), allocatable:: mybout(:)
14 type(vol7d_dballe) :: myin,myout
15 character(len=255) :: filenamein,filenameout
16 
17 TYPE(l4f_handle) :: category
18 INTEGER :: ier
19 CHARACTER(len=512):: a_name
20 
21 !questa chiamata prende dal launcher il nome univoco
22 call l4f_launcher(a_name)
23 
24 !init di log4fortran
25 ier=l4f_init()
26 
27 !imposta a_name
28 category=l4f_category_get_handle(a_name)
29 
30 call l4f_category_log(category,l4f_info,"Start")
31 
32 mybout = [character(len=10) :: "B12192"]
33 filenamein="../data/example_temp.bufr"
34 filenameout="../data/tp.bufr"
35 
36 call register_termo(vfn)
37 
38 call init(myin,filename=filenamein, file=.true., categoryappend="input")
39 call init(myout,filename=filenameout, file=.true., write=.true., wipe=.true., categoryappend="output",template="generic")
40 
41 !CALL import(myin,var=(/"B12101","B10004"/),varkind=(/"r","r"/))
42 CALL import(myin)
43 
44 call display(myin%vol7d)
45 
46 if (alchemy(myin%vol7d,vfn,mybout,myout%vol7d,copy=.true.,vfnoracle=vfnoracle) /= 0 ) then
47  print*, "I cannot make ",mybout
48 
49  if (.not. shoppinglist(mybout,vfn,vfnoracle)) then
50  print*, " error shoppinglist"
51  stop 2
52  else
53  call display(compile_sl(vfnoracle))
54  stop 3
55  end if
56 end if
57 
58 call display(vfnoracle)
59 
60 call display(myout%vol7d)
61 call export(myout)
62 
63 call delete(myout)
64 call delete(myin)
65 
66 !chiudo il logger
67 call l4f_category_delete(category)
68 ier=l4f_fini()
69 
70 end program alchimiav7d

Generated with Doxygen.