Ignore:
Timestamp:
Mar 8, 2019 6:04:30 PM (5 years ago)
Author:
forkel
Message:

Removed unused variables from chem_gasphase_mod.f90

Location:
palm/trunk/UTIL/chemistry/gasphase_preproc/kpp4palm
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • palm/trunk/UTIL/chemistry/gasphase_preproc/kpp4palm/src/create_kpp_module.C

    r3780 r3789  
    1717//-----------------
    1818//$Id: create_kpp_module.C 3453 2018-10-30 13:21:51Z forkel $
     19// Added vector switch Kacc,Krej,IERRV, Commented add_line for istatf,    (05.03.2019, forkel)
     20//      added ,pe after ierr_u,         
     21//
    1922// Added create_set_cs and cs_mech and get_mechanismname in module_header (05.03.2019, forkel)
    2023//
     
    436439   mz_kpp.add_line("                                                                 ");
    437440   mz_kpp.add_line("                                                                 ");
    438    mz_kpp.add_line("  integer, dimension(VL_dim)   :: Kacc,Krej                       ");
    439    mz_kpp.add_line("  integer, dimension(VL_dim)   :: IERRV                           ");
     441   if(kpp_switches.is_vector()) {
     442      mz_kpp.add_line("  integer, dimension(VL_dim)   :: Kacc,Krej                       ");
     443      mz_kpp.add_line("  integer, dimension(VL_dim)   :: IERRV                           ");
     444   }
    440445   mz_kpp.add_line("  logical                     :: data_loaded = .false.             ");
    441 
    442446   in.close();
    443447
     
    535539   kppi.add_line("  integer, dimension(20)                 :: istatus_u               ");
    536540   kppi.add_line("  integer                                :: ierr_u                  ");
    537   kppi.add_line("  integer                                :: istatf                  ");
     541// kppi.add_line("  integer                                :: istatf                  ");
    538542   kppi.add_line("  integer                                :: vl_dim_lo               ");
    539543   kppi.add_line("                                                                    ");
     
    599603   } else {
    600604     kppi.add_line("   IF (PRESENT(l_debug) .AND. PRESENT(PE)) THEN                       ");
    601      kppi.add_line("      IF (l_debug) CALL error_output(Conc(is,:),ierr_u, PE)           ");
     605     kppi.add_line("      IF (l_debug) CALL error_output(Conc(is,:),ierr_u,pe)            ");
    602606     kppi.add_line("   ENDIF                                                              ");
    603607     kppi.add_line("                                                                      ");
  • palm/trunk/UTIL/chemistry/gasphase_preproc/kpp4palm/src/expand_decomp.C

    r3458 r3789  
    1717// $Id: expand_decomp.C 3327 2018-10-09 19:55:00Z forkel $
    1818//
    19 // initial version                                  (Nov. 2016, ketelsen)
     19// Added switch for de-indexing == 2 (W is not needed then)       (08.03.2019, forkel)
     20// commented add_line for 'INTEGER  :: k, kk, j, jj' which
     21// only needed for de-indexing == 0
     22//
     23// initial version                                                (Nov. 2016, ketelsen)
    2024
    2125
     
    197201  de.add_line ("    INTEGER  :: IER                                                   ");
    198202//  de.add_line ("    REAL ( kind=dp ) :: JVS (:), W ( NVAR ), a                        ");
    199   de.add_line ("    REAL ( kind=dp ) :: JVS ( LU_NONZERO ), W ( NVAR ), a             ");
    200   de.add_line ("    INTEGER  :: k, kk, j, jj                                          ");
     203  if( kpp_switches.de_indexing () == 2 ) {
     204     de.add_line ("    REAL ( kind=dp ) :: JVS ( LU_NONZERO ), a                         ");
     205  } else {
     206     de.add_line ("    REAL ( kind=dp ) :: JVS ( LU_NONZERO ), W ( NVAR ), a             ");
     207  }
     208//  Commented, k, kk, j, jj are only required if de_indexing == 0, which is not handled here
     209//     de.add_line ("    INTEGER  :: k, kk, j, jj                                          ");
    201210  de.add_line ("                                                                      ");
    202211  de.add_line ("    a = 0.                                                            ");
  • palm/trunk/UTIL/chemistry/gasphase_preproc/kpp4palm/src/fortran_file.C

    r3458 r3789  
    1919//$Id:
    2020//
     21// removal of unnecessary variables (Ntotal, TSTART)                        (08.03.2019 forkel)
     22//
    2123// Added vector switch and creation of dimension statement (rev. 3260, 18.09.2018, ketelsen)
    2224//
     
    167169    }
    168170
     171//  Remove Ntotal since it is unused
     172
     173    if(ip->get_token(3) == "Ntotal") {
     174      lo_line.insert(0,"!DELETE ");
     175    cout << lo_line << endl;
     176    }
     177
     178
    169179
    170180    ip->set_line(lo_line);
     
    390400
    391401    if(ip->get_token_number_from_string("RTOLS") > 0) {
     402    cout << lo_line << endl;
     403      lo_line.insert(0,"!DELETE ");
     404    cout << lo_line << endl;
     405    }
     406
     407//  Remove    TSTART
     408
     409    if(ip->get_token_number_from_string("TSTART") > 0) {
    392410    cout << lo_line << endl;
    393411      lo_line.insert(0,"!DELETE ");
  • palm/trunk/UTIL/chemistry/gasphase_preproc/kpp4palm/src/fortran_file_vec.C

    r3458 r3789  
    1717//-----------------------
    1818//$Id: fortran_file_vec.C 3327 2018-10-09 19:55:00Z forkel $
     19// Added vector switch for INTEGER         :: j,k                       (08.03.2019, forkel)
     20//
    1921// Line 112: do k=is,ie bydo k=1,vl; line 156 ff: replaced index k by j (18.09.2018, ketelsen)
    2022//
     
    169171  lo_line = ip->get_line() ;
    170172  lo_line.erase();
    171   lo_line = "  INTEGER         :: j,k";
     173  if(kpp_switches.is_vector() ) {
     174    lo_line = " INTEGER         :: j,k";
     175  } else {
     176    lo_line = " INTEGER         :: k";
     177  }
    172178  ip->set_line(lo_line);
    173179
  • palm/trunk/UTIL/chemistry/gasphase_preproc/kpp4palm/templates/initialize_kpp_ctrl_template.f90

    r3298 r3789  
    9191  REAL(dp), DIMENSION(:),INTENT(IN) :: C
    9292
    93   write(6,*) 'ERROR in chem_gasphase_mod ',ierr,C(1)
     93  write(6,*) 'ERROR in chem_gasphase_mod ',ierr,C(1),PE
    9494
    9595
Note: See TracChangeset for help on using the changeset viewer.