1 | |
---|
2 | // ############################################################################ |
---|
3 | // |
---|
4 | // create_mz_kpp_module |
---|
5 | // |
---|
6 | // create scalar code from .f90 sources created by KPP to be used in PALM4U |
---|
7 | // |
---|
8 | // COPYRIGHT Klaus Ketelsen and MPI-CH April 2007, |
---|
9 | // Klaus Ketelsen, 2016 |
---|
10 | // |
---|
11 | // ############################################################################ |
---|
12 | // |
---|
13 | // Former revisions: |
---|
14 | // ----------------------- |
---|
15 | // Deleded $Id since document_changes does not work for C and C++ (15.03.2019, forkel) |
---|
16 | // |
---|
17 | // initial version (Nov. 2016, ketelsen) |
---|
18 | // |
---|
19 | |
---|
20 | // mz_rs_20090111+ |
---|
21 | // stdlib is necessary to define atoi: |
---|
22 | #include <stdlib.h> |
---|
23 | // mz_rs_20090111- |
---|
24 | |
---|
25 | #include "create_kpp_module.h" |
---|
26 | control_switches kpp_switches; |
---|
27 | |
---|
28 | main (int argc, char *argv [] ) { |
---|
29 | create_kpp_module cm; |
---|
30 | string inp_name; |
---|
31 | char *lo_arg; |
---|
32 | |
---|
33 | cout << "####################################################" <<endl ; |
---|
34 | cout << "### KPP4PALM = KPP POST PROCESSOR ###" <<endl ; |
---|
35 | cout << "### KP4 Version 1.0 ###" <<endl ; |
---|
36 | cout << "### (C) by Klaus Ketelsen and MPI-CH, April 2007 ###" <<endl ; |
---|
37 | cout << "### KPP4PALM ###" <<endl ; |
---|
38 | cout << "### (C) by Klaus Ketelsen, November 2016 ###" <<endl ; |
---|
39 | cout << "####################################################" <<endl ; |
---|
40 | |
---|
41 | lo_arg = argv[1]; |
---|
42 | |
---|
43 | if(argc > 1) { |
---|
44 | inp_name = lo_arg ; |
---|
45 | } else { |
---|
46 | inp_name = "kk_" ; |
---|
47 | } |
---|
48 | |
---|
49 | if(argc > 2) { |
---|
50 | lo_arg = argv[2]; |
---|
51 | string vm = lo_arg; |
---|
52 | if(vm == "vector") { |
---|
53 | kpp_switches.set_vector_mode (); |
---|
54 | } |
---|
55 | } |
---|
56 | |
---|
57 | if(argc > 3) { |
---|
58 | lo_arg = argv[3]; |
---|
59 | string vl = lo_arg; |
---|
60 | kpp_switches.set_vector_length (vl); |
---|
61 | } |
---|
62 | |
---|
63 | if(argc > 4) { |
---|
64 | lo_arg = argv[4]; |
---|
65 | int de = atoi(lo_arg); |
---|
66 | kpp_switches.set_de_index_mode (de); |
---|
67 | } |
---|
68 | |
---|
69 | cm.do_work(inp_name); |
---|
70 | |
---|
71 | cout << "####################################################" <<endl ; |
---|
72 | cout << "### END OF KPP4PALM ###" <<endl ; |
---|
73 | cout << "####################################################" <<endl ; |
---|
74 | |
---|
75 | return 0; |
---|
76 | } |
---|