source: palm/trunk/UTIL/chemistry/gasphase_preproc/kpp4palm/src/main.C @ 3799

Last change on this file since 3799 was 3799, checked in by forkel, 5 years ago

editing in kpp4palm: add statements for avoiding unused variables, remove $Id

File size: 2.1 KB
RevLine 
[2696]1
2// ############################################################################
3//
4//     create_mz_kpp_module
5//
[3799]6//     create scalar code from .f90 sources created by KPP to be used in PALM4U
[2696]7//
[3799]8//     COPYRIGHT Klaus Ketelsen and MPI-CH   April 2007,
9//               Klaus Ketelsen, 2016
[2696]10//
11// ############################################################################
[3458]12//
13// Former revisions:
14// -----------------------
[3799]15// Deleded $Id since document_changes does not work for C and C++         (15.03.2019, forkel)
[3458]16//
17// initial version       (Nov. 2016, ketelsen)
18//
[2696]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"
26control_switches kpp_switches;
27
28main (int argc, char *argv [] ) {
29   create_kpp_module         cm;
30   string                    inp_name;
31   char                      *lo_arg;
32
33   cout << "####################################################" <<endl ;
[3799]34   cout << "###        KPP4PALM = KPP POST PROCESSOR         ###" <<endl ;
35   cout << "###               KP4 Version 1.0                ###" <<endl ;
[2696]36   cout << "### (C) by Klaus Ketelsen and MPI-CH, April 2007 ###" <<endl ;
[3799]37   cout << "###               KPP4PALM                       ###" <<endl ;
38   cout << "### (C) by Klaus Ketelsen, November 2016         ###" <<endl ;
[2696]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 ;
[3799]72   cout << "###                END OF KPP4PALM               ###" <<endl ;
[2696]73   cout << "####################################################" <<endl ;
74
75   return 0;
76}
Note: See TracBrowser for help on using the repository browser.