Changeset 3780 for palm/trunk/UTIL/chemistry/gasphase_preproc/kpp4palm
- Timestamp:
- Mar 5, 2019 11:19:45 AM (6 years ago)
- Location:
- palm/trunk/UTIL/chemistry/gasphase_preproc/kpp4palm
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
palm/trunk/UTIL/chemistry/gasphase_preproc/kpp4palm/bin/kpp4palm.ksh
r3458 r3780 40 40 # ----------------- 41 41 # $Id$ 42 # forkel 05. March 2019: cs_mech and set_cm 42 43 # forkel 30. Oktober 2018: Integrating contents of kp4_compress into chem_gasphase_mod.f90 43 44 # forkel 25. September 2018: Added cat for $MECH to pass mechanism name to kpp4palm … … 276 277 REAL(kind=dp) :: FAKT 277 278 279 ! CS_MECH for check of mechanism name with namelist 280 CHARACTER(LEN=30) :: CS_MECH 278 281 #ENDINLINE 279 282 EOF … … 285 288 EOF 286 289 290 # Store mechanism name for cs_mech 291 cat >> set_cm << EOF 292 293 ! Set cs_mech for check with mechanism name from namelist 294 cs_mech = '$MECH' 295 EOF 296 287 297 # Run kpp 288 298 -
palm/trunk/UTIL/chemistry/gasphase_preproc/kpp4palm/src/create_kpp_module.C
r3458 r3780 17 17 //----------------- 18 18 //$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 // 19 21 // exclude kco_compress from handling by global_variables2vector (30.10.2018, forkel) 20 22 // … … 191 193 192 194 generate_module_header(); 195 196 // create_set_cs 197 create_set_cs(); 193 198 194 199 // Create kpp_integrate subroutine (chem_gasphase_integrate) for skalar and vector mode … … 458 463 } 459 464 465 void 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 460 505 void create_kpp_module::create_kpp_integrate() { 461 506 fortran_file kppi; 462 507 vector<Vvar>::iterator iv; 463 string line; 508 string xline; 509 464 510 465 511 kppi.set_name("chem_gasphase_integrate"); … … 598 644 kppi.add_line(" "); 599 645 kppi.add_line(" return "); 600 kppi.add_line("END SUBROUTINE chem_gasphase_integrate 646 kppi.add_line("END SUBROUTINE chem_gasphase_integrate "); 601 647 602 648 // e5_subroutines.push_back(kppi); -
palm/trunk/UTIL/chemistry/gasphase_preproc/kpp4palm/src/create_kpp_module.h
r3458 r3780 19 19 // ----------------------- 20 20 // $Id$ 21 // forkel 22.02.2019: Added create_set_cs 21 22 // ketelsen 18.09.2018: Removed create_fill_routine 22 23 // … … 60 61 61 62 void create_kpp_integrate(); 63 void create_set_cs(); 62 64 63 65 public: -
palm/trunk/UTIL/chemistry/gasphase_preproc/kpp4palm/templates/module_header
r3681 r3780 61 61 ! , REQ_MCFCT, IP_MAX, jname 62 62 63 PUBLIC :: cs_mech 63 64 PUBLIC :: eqn_names, phot_names, spc_names 64 65 PUBLIC :: nmaxfixsteps … … 77 78 PUBLIC :: chem_gasphase_integrate 78 79 PUBLIC :: initialize_kpp_ctrl 80 PUBLIC :: get_mechanismname 79 81 80 82 ! END OF MODULE HEADER TEMPLATE
Note: See TracChangeset
for help on using the changeset viewer.