Ignore:
Timestamp:
Mar 5, 2019 11:19:45 AM (6 years ago)
Author:
forkel
Message:

removed read from unit 10 in chemistry_model_mod.f90, added get_mechanismname

File:
1 edited

Legend:

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

    r3458 r3780  
    1717//-----------------
    1818//$Id: create_kpp_module.C 3453 2018-10-30 13:21:51Z forkel $
     19// Added create_set_cs and cs_mech and get_mechanismname in module_header (05.03.2019, forkel)
     20//
    1921// exclude kco_compress from handling by global_variables2vector (30.10.2018, forkel)
    2022//
     
    191193
    192194   generate_module_header();
     195
     196// create_set_cs
     197   create_set_cs();
    193198
    194199// Create kpp_integrate subroutine (chem_gasphase_integrate) for skalar and vector mode
     
    458463}
    459464
     465void create_kpp_module::create_set_cs() {
     466   fortran_file          kppi;         
     467   vector<Vvar>::iterator               iv;
     468   string                               xline;
     469     
     470   string                          buf;
     471   ifstream                        in;
     472   program_line                    line;
     473
     474   kppi.set_name("get_mechanismname");
     475   kppi.add_line("SUBROUTINE get_mechanismname                                        ");
     476   kppi.add_line("                                                                    ");
     477   kppi.add_line("  IMPLICIT NONE                                                     ");
     478// Read mechanism from set_cm
     479// Tis got an own own subroutine to aviod being called at each timestep
     480
     481   in.open("set_cm");
     482   if( !in ) {
     483      cout << "cannot open " << endl; my_abort("set_cm");
     484   }
     485
     486   while ( 1 ) {
     487     getline (in, buf);
     488     if( in.eof() ) break;
     489     if( in.bad() ) my_abort("ERROR_READ_4");
     490     line.set_line(buf);
     491     kppi.add_line(line);
     492   }
     493   in.close();
     494
     495   kppi.add_line("                                                                    ");
     496   kppi.add_line("  return                                                            ");
     497   kppi.add_line("END SUBROUTINE get_mechanismname                                    ");
     498   kppi.add_line("                                                                    ");
     499   kpp_subroutines.push_back(kppi);
     500
     501   return;
     502}
     503
     504
    460505void create_kpp_module::create_kpp_integrate() {
    461506   fortran_file          kppi;
    462507   vector<Vvar>::iterator               iv;
    463    string                               line;
     508   string                               xline;
     509
    464510
    465511   kppi.set_name("chem_gasphase_integrate");
     
    598644   kppi.add_line("                                                                    ");
    599645   kppi.add_line("  return                                                            ");
    600    kppi.add_line("END SUBROUTINE chem_gasphase_integrate                                        ");
     646   kppi.add_line("END SUBROUTINE chem_gasphase_integrate                              ");
    601647
    602648//   e5_subroutines.push_back(kppi);
Note: See TracChangeset for help on using the changeset viewer.