libsim Versione 8.0.0
example_alchimia.f03

Sample program to demostrate the alchimia module.

Sample program to demostrate the alchimia module. This module use cuisine problems to demostrate the capacity of the module.

1program cucina
2
3USE alchimia
4USE forno
5USE pentolone
8
9IMPLICIT NONE
10integer, parameter :: ndat=100
11type(fndsv) :: vfn,myvfn
12character(len=10), allocatable:: mybin(:),mybout(:)
13real,allocatable :: myin(:,:),myout(:,:)
14TYPE(l4f_handle) :: category
15INTEGER :: ier
16CHARACTER(len=512):: a_name
17
18!questa chiamata prende dal launcher il nome univoco
19call l4f_launcher(a_name,a_name_force="volgrid6dtransform")
20
21!init di log4fortran
22ier=l4f_init()
23
24!imposta a_name
25category=l4f_category_get_handle(a_name//".main")
26
27
28call register_pentolone(vfn)
29call register_forno(vfn)
30
31mybin = [character(len=10)::"acqua","olio","patate","sale","pollo","mais","gommosa"]
32mybout = [character (len=10) :: "pole.pata.","lesso"]
33
34!mybin = [character(len=10)::"acqua","olio","patate","sale","pollo","mais","gommosa"]
35!mybout = [character (len=10) :: "pole.pata.","pane"]
36
37print *,"I have: ",mybin
38print *,"I have to prepare: ",mybout
39
40if (.not. oracle(mybin,mybout,vfn,myvfn)) then
41 print*, "I cannot make ",mybout
42
43 if (.not. shoppinglist(mybout,vfn,myvfn)) then
44 print*, " error shoppinglist"
45 stop 2
46 else
47 call display(myvfn)
48 call display(compile_sl(myvfn))
49 stop 3
50 end if
51end if
52
53call display(myvfn)
54print *,"I need ",myvfn%nout," more variables"
55
56allocate(myin(ndat,size(mybin)))
57myin=1.5
58allocate(myout(ndat,myvfn%nout))
59myout=rmiss
60call make(myvfn,mybin,mybout,myin,myout)
61
62 !chiudo il logger
63call l4f_category_delete(category)
64ier=l4f_fini()
65
66end program cucina
show on the screen the fnds and fndsv structure
Definition alchimia.F03:278
Do the real work to transform the input data to the output.
Definition alchimia.F03:288
Global log4fortran destructor.
Global log4fortran constructor.
This module defines objects and methods for generating derivative variables.
Definition alchimia.F03:214
classe per la gestione del logging
Definitions of constants and functions for working with missing values.

Generated with Doxygen.