libsim Versione 7.2.6
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(:,:)
14integer :: category,ier
15CHARACTER(len=512):: a_name
16
17!questa chiamata prende dal launcher il nome univoco
18call l4f_launcher(a_name,a_name_force="volgrid6dtransform")
19
20!init di log4fortran
21ier=l4f_init()
22
23!imposta a_name
24category=l4f_category_get(a_name//".main")
25
26
27call register_pentolone(vfn)
28call register_forno(vfn)
29
30mybin = [character(len=10)::"acqua","olio","patate","sale","pollo","mais","gommosa"]
31mybout = [character (len=10) :: "pole.pata.","lesso"]
32
33!mybin = [character(len=10)::"acqua","olio","patate","sale","pollo","mais","gommosa"]
34!mybout = [character (len=10) :: "pole.pata.","pane"]
35
36print *,"I have: ",mybin
37print *,"I have to prepare: ",mybout
38
39if (.not. oracle(mybin,mybout,vfn,myvfn)) then
40 print*, "I cannot make ",mybout
41
42 if (.not. shoppinglist(mybout,vfn,myvfn)) then
43 print*, " error shoppinglist"
44 stop 2
45 else
46 call display(myvfn)
47 call display(compile_sl(myvfn))
48 stop 3
49 end if
50end if
51
52call display(myvfn)
53print *,"I need ",myvfn%nout," more variables"
54
55allocate(myin(ndat,size(mybin)))
56myin=1.5
57allocate(myout(ndat,myvfn%nout))
58myout=rmiss
59call make(myvfn,mybin,mybout,myin,myout)
60
61 !chiudo il logger
62call l4f_category_delete(category)
63ier=l4f_fini()
64
65end 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
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.