Changeset 3949 for palm/trunk/UTIL/chemistry/gasphase_preproc/mechanisms/def_salsa+phstat/chem_gasphase_mod.f90
 Timestamp:
 May 3, 2019 3:31:22 PM (3 years ago)
 File:

 1 edited
Legend:
 Unmodified
 Added
 Removed

palm/trunk/UTIL/chemistry/gasphase_preproc/mechanisms/def_salsa+phstat/chem_gasphase_mod.f90
r3944 r3949 117 117 ! 118 118 ! File : chem_gasphase_mod_Parameters.f90 119 ! Time : Thu Mar 28 15:59:272019120 ! Working directory : /home/forkelr/palmstuff/work/trunk20190 327/UTIL/chemistry/gasphase_preproc/tmp_kpp4palm119 ! Time : Fri May 3 17:24:49 2019 120 ! Working directory : /home/forkelr/palmstuff/work/trunk20190503/UTIL/chemistry/gasphase_preproc/tmp_kpp4palm 121 121 ! Equation file : chem_gasphase_mod.kpp 122 122 ! Output root filename : chem_gasphase_mod … … 130 130 131 131 ! NSPEC  Number of chemical species 132 INTEGER, PARAMETER :: nspec = 3132 INTEGER, PARAMETER :: nspec = 8 133 133 ! NVAR  Number of Variable species 134 INTEGER, PARAMETER :: nvar = 3134 INTEGER, PARAMETER :: nvar = 8 135 135 ! NVARACT  Number of Active species 136 INTEGER, PARAMETER :: nvaract = 3136 INTEGER, PARAMETER :: nvaract = 8 137 137 ! NFIX  Number of Fixed species 138 138 INTEGER, PARAMETER :: nfix = 1 139 139 ! NREACT  Number of reactions 140 INTEGER, PARAMETER :: nreact = 2140 INTEGER, PARAMETER :: nreact = 7 141 141 ! NVARST  Starting of variables in conc. vect. 142 142 INTEGER, PARAMETER :: nvarst = 1 143 143 ! NFIXST  Starting of fixed in conc. vect. 144 INTEGER, PARAMETER :: nfixst = 4144 INTEGER, PARAMETER :: nfixst = 9 145 145 ! NONZERO  Number of nonzero entries in Jacobian 146 INTEGER, PARAMETER :: nonzero = 9146 INTEGER, PARAMETER :: nonzero = 14 147 147 ! LU_NONZERO  Number of nonzero entries in LU factoriz. of Jacobian 148 INTEGER, PARAMETER :: lu_nonzero = 9148 INTEGER, PARAMETER :: lu_nonzero = 14 149 149 ! CNVAR  (NVAR+1) Number of elements in compressed row format 150 INTEGER, PARAMETER :: cnvar = 4150 INTEGER, PARAMETER :: cnvar = 9 151 151 ! CNEQN  (NREACT+1) Number stoicm elements in compressed col format 152 INTEGER, PARAMETER :: cneqn = 3152 INTEGER, PARAMETER :: cneqn = 8 153 153 ! NHESS  Length of Sparse Hessian 154 154 INTEGER, PARAMETER :: nhess = 3 … … 159 159 ! VAR(ind_spc) = C(ind_spc) 160 160 161 INTEGER, PARAMETER, PUBLIC :: ind_o3 = 1 162 INTEGER, PARAMETER, PUBLIC :: ind_no = 2 163 INTEGER, PARAMETER, PUBLIC :: ind_no2 = 3 161 INTEGER, PARAMETER, PUBLIC :: ind_hno3 = 1 162 INTEGER, PARAMETER, PUBLIC :: ind_h2so4 = 2 163 INTEGER, PARAMETER, PUBLIC :: ind_nh3 = 3 164 INTEGER, PARAMETER, PUBLIC :: ind_ocnv = 4 165 INTEGER, PARAMETER, PUBLIC :: ind_ocsv = 5 166 INTEGER, PARAMETER, PUBLIC :: ind_no2 = 6 167 INTEGER, PARAMETER, PUBLIC :: ind_o3 = 7 168 INTEGER, PARAMETER, PUBLIC :: ind_no = 8 164 169 165 170 ! Index declaration for fixed species in C … … 172 177 173 178 ! NJVRP  Length of sparse Jacobian JVRP 174 INTEGER, PARAMETER :: njvrp = 3179 INTEGER, PARAMETER :: njvrp = 8 175 180 176 181 ! NSTOICM  Length of Sparse Stoichiometric Matrix … … 193 198 ! 194 199 ! File : chem_gasphase_mod_Global.f90 195 ! Time : Thu Mar 28 15:59:272019196 ! Working directory : /home/forkelr/palmstuff/work/trunk20190 327/UTIL/chemistry/gasphase_preproc/tmp_kpp4palm200 ! Time : Fri May 3 17:24:49 2019 201 ! Working directory : /home/forkelr/palmstuff/work/trunk20190503/UTIL/chemistry/gasphase_preproc/tmp_kpp4palm 197 202 ! Equation file : chem_gasphase_mod.kpp 198 203 ! Output root filename : chem_gasphase_mod … … 232 237 233 238 ! QVAP  Water vapor 234 ! REAL(dp),dimension(:),allocatable :: qvap235 REAL(dp) :: qvap236 ! FAKT  Conversion factor237 ! REAL(dp),dimension(:),allocatable :: fakt238 REAL(dp) :: fakt239 240 ! declaration of global variable declarations for photolysis will come from241 242 ! QVAP  Water vapor243 239 REAL(kind=dp):: qvap 244 240 ! FAKT  Conversion factor … … 267 263 ! 268 264 ! File : chem_gasphase_mod_JacobianSP.f90 269 ! Time : Thu Mar 28 15:59:272019270 ! Working directory : /home/forkelr/palmstuff/work/trunk20190 327/UTIL/chemistry/gasphase_preproc/tmp_kpp4palm265 ! Time : Fri May 3 17:24:49 2019 266 ! Working directory : /home/forkelr/palmstuff/work/trunk20190503/UTIL/chemistry/gasphase_preproc/tmp_kpp4palm 271 267 ! Equation file : chem_gasphase_mod.kpp 272 268 ! Output root filename : chem_gasphase_mod … … 282 278 283 279 284 INTEGER, PARAMETER, DIMENSION(9):: lu_irow = (/ & 285 1, 1, 1, 2, 2, 2, 3, 3, 3 /) 286 287 INTEGER, PARAMETER, DIMENSION(9):: lu_icol = (/ & 288 1, 2, 3, 1, 2, 3, 1, 2, 3 /) 289 290 INTEGER, PARAMETER, DIMENSION(4):: lu_crow = (/ & 291 1, 4, 7, 10 /) 292 293 INTEGER, PARAMETER, DIMENSION(4):: lu_diag = (/ & 294 1, 5, 9, 10 /) 280 INTEGER, PARAMETER, DIMENSION(14):: lu_irow = (/ & 281 1, 2, 3, 4, 5, 6, 6, 6, 7, 7, 7, 8, & 282 8, 8 /) 283 284 INTEGER, PARAMETER, DIMENSION(14):: lu_icol = (/ & 285 1, 2, 3, 4, 5, 6, 7, 8, 6, 7, 8, 6, & 286 7, 8 /) 287 288 INTEGER, PARAMETER, DIMENSION(9):: lu_crow = (/ & 289 1, 2, 3, 4, 5, 6, 9, 12, 15 /) 290 291 INTEGER, PARAMETER, DIMENSION(9):: lu_diag = (/ & 292 1, 2, 3, 4, 5, 6, 10, 14, 15 /) 295 293 296 294 … … 311 309 ! 312 310 ! File : chem_gasphase_mod_Monitor.f90 313 ! Time : Thu Mar 28 15:59:272019314 ! Working directory : /home/forkelr/palmstuff/work/trunk20190 327/UTIL/chemistry/gasphase_preproc/tmp_kpp4palm311 ! Time : Fri May 3 17:24:49 2019 312 ! Working directory : /home/forkelr/palmstuff/work/trunk20190503/UTIL/chemistry/gasphase_preproc/tmp_kpp4palm 315 313 ! Equation file : chem_gasphase_mod.kpp 316 314 ! Output root filename : chem_gasphase_mod … … 322 320 323 321 324 CHARACTER(len=15), PARAMETER, DIMENSION(3):: spc_names = (/ & 325 'O3 ','NO ','NO2 ' /) 326 327 CHARACTER(len=100), PARAMETER, DIMENSION(2):: eqn_names = (/ & 322 CHARACTER(len=15), PARAMETER, DIMENSION(8):: spc_names = (/ & 323 'HNO3 ','H2SO4 ','NH3 ',& 324 'OCNV ','OCSV ','NO2 ',& 325 'O3 ','NO ' /) 326 327 CHARACTER(len=100), PARAMETER, DIMENSION(7):: eqn_names = (/ & 328 328 ' NO2 > O3 + NO ',& 329 'O3 + NO > NO2 ' /) 329 'O3 + NO > NO2 ',& 330 ' H2SO4 > H2SO4 ',& 331 ' HNO3 > HNO3 ',& 332 ' NH3 > NH3 ',& 333 ' OCNV > OCNV ',& 334 ' OCSV > OCSV ' /) 330 335 331 336 ! INLINED global variables … … 371 376 ! 372 377 ! File : chem_gasphase_mod_Initialize.f90 373 ! Time : Thu Mar 28 15:59:272019374 ! Working directory : /home/forkelr/palmstuff/work/trunk20190 327/UTIL/chemistry/gasphase_preproc/tmp_kpp4palm378 ! Time : Fri May 3 17:24:49 2019 379 ! Working directory : /home/forkelr/palmstuff/work/trunk20190503/UTIL/chemistry/gasphase_preproc/tmp_kpp4palm 375 380 ! Equation file : chem_gasphase_mod.kpp 376 381 ! Output root filename : chem_gasphase_mod … … 397 402 ! 398 403 ! File : chem_gasphase_mod_Integrator.f90 399 ! Time : Thu Mar 28 15:59:272019400 ! Working directory : /home/forkelr/palmstuff/work/trunk20190 327/UTIL/chemistry/gasphase_preproc/tmp_kpp4palm404 ! Time : Fri May 3 17:24:49 2019 405 ! Working directory : /home/forkelr/palmstuff/work/trunk20190503/UTIL/chemistry/gasphase_preproc/tmp_kpp4palm 401 406 ! Equation file : chem_gasphase_mod.kpp 402 407 ! Output root filename : chem_gasphase_mod … … 455 460 ! 456 461 ! File : chem_gasphase_mod_LinearAlgebra.f90 457 ! Time : Thu Mar 28 15:59:272019458 ! Working directory : /home/forkelr/palmstuff/work/trunk20190 327/UTIL/chemistry/gasphase_preproc/tmp_kpp4palm462 ! Time : Fri May 3 17:24:49 2019 463 ! Working directory : /home/forkelr/palmstuff/work/trunk20190503/UTIL/chemistry/gasphase_preproc/tmp_kpp4palm 459 464 ! Equation file : chem_gasphase_mod.kpp 460 465 ! Output root filename : chem_gasphase_mod … … 482 487 ! 483 488 ! File : chem_gasphase_mod_Jacobian.f90 484 ! Time : Thu Mar 28 15:59:272019485 ! Working directory : /home/forkelr/palmstuff/work/trunk20190 327/UTIL/chemistry/gasphase_preproc/tmp_kpp4palm489 ! Time : Fri May 3 17:24:49 2019 490 ! Working directory : /home/forkelr/palmstuff/work/trunk20190503/UTIL/chemistry/gasphase_preproc/tmp_kpp4palm 486 491 ! Equation file : chem_gasphase_mod.kpp 487 492 ! Output root filename : chem_gasphase_mod … … 509 514 ! 510 515 ! File : chem_gasphase_mod_Function.f90 511 ! Time : Thu Mar 28 15:59:272019512 ! Working directory : /home/forkelr/palmstuff/work/trunk20190 327/UTIL/chemistry/gasphase_preproc/tmp_kpp4palm516 ! Time : Fri May 3 17:24:49 2019 517 ! Working directory : /home/forkelr/palmstuff/work/trunk20190503/UTIL/chemistry/gasphase_preproc/tmp_kpp4palm 513 518 ! Equation file : chem_gasphase_mod.kpp 514 519 ! Output root filename : chem_gasphase_mod … … 538 543 ! 539 544 ! File : chem_gasphase_mod_Rates.f90 540 ! Time : Thu Mar 28 15:59:272019541 ! Working directory : /home/forkelr/palmstuff/work/trunk20190 327/UTIL/chemistry/gasphase_preproc/tmp_kpp4palm545 ! Time : Fri May 3 17:24:49 2019 546 ! Working directory : /home/forkelr/palmstuff/work/trunk20190503/UTIL/chemistry/gasphase_preproc/tmp_kpp4palm 542 547 ! Equation file : chem_gasphase_mod.kpp 543 548 ! Output root filename : chem_gasphase_mod … … 564 569 ! 565 570 ! File : chem_gasphase_mod_Util.f90 566 ! Time : Thu Mar 28 15:59:272019567 ! Working directory : /home/forkelr/palmstuff/work/trunk20190 327/UTIL/chemistry/gasphase_preproc/tmp_kpp4palm571 ! Time : Fri May 3 17:24:49 2019 572 ! Working directory : /home/forkelr/palmstuff/work/trunk20190503/UTIL/chemistry/gasphase_preproc/tmp_kpp4palm 568 573 ! Equation file : chem_gasphase_mod.kpp 569 574 ! Output root filename : chem_gasphase_mod … … 792 797 ! 793 798 ! Computation of equation rates 794 a(1) = rct(1) * v( 3)795 a(2) = rct(2) * v( 1) * v(2)799 a(1) = rct(1) * v(6) 800 a(2) = rct(2) * v(7) * v(8) 796 801 797 802 ! Aggregate function 798 vdot(1) = a(1)  a(2) 799 vdot(2) = a(1)  a(2) 800 vdot(3) =  a(1) + a(2) 803 vdot(1) = 0 804 vdot(2) = 0 805 vdot(3) = 0 806 vdot(4) = 0 807 vdot(5) = 0 808 vdot(6) =  a(1) + a(2) 809 vdot(7) = a(1)  a(2) 810 vdot(8) = a(1)  a(2) 801 811 802 812 END SUBROUTINE fun … … 809 819 REAL(kind=dp):: x(nvar) 810 820 811 x(2) = x(2)  jvs(4) * x(1) 812 x(3) = x(3)  jvs(7) * x(1)  jvs(8) * x(2) 813 x(3) = x(3) / jvs(9) 814 x(2) = (x(2)  jvs(6) * x(3)) /(jvs(5)) 815 x(1) = (x(1)  jvs(2) * x(2)  jvs(3) * x(3)) /(jvs(1)) 821 x(7) = x(7)  jvs(9) * x(6) 822 x(8) = x(8)  jvs(12) * x(6)  jvs(13) * x(7) 823 x(8) = x(8) / jvs(14) 824 x(7) = (x(7)  jvs(11) * x(8)) /(jvs(10)) 825 x(6) = (x(6)  jvs(7) * x(7)  jvs(8) * x(8)) /(jvs(6)) 826 x(5) = x(5) / jvs(5) 827 x(4) = x(4) / jvs(4) 828 x(3) = x(3) / jvs(3) 829 x(2) = x(2) / jvs(2) 830 x(1) = x(1) / jvs(1) 816 831 817 832 END SUBROUTINE kppsolve … … 831 846 ! Local variables 832 847 ! B  Temporary array 833 REAL(kind=dp):: b( 3)848 REAL(kind=dp):: b(8) 834 849 ! 835 850 ! Following line is just to avoid compiler message about unused variables 836 851 IF ( f(nfix) > 0.0_dp ) CONTINUE 837 852 838 ! B(1) = dA(1)/dV( 3)853 ! B(1) = dA(1)/dV(6) 839 854 b(1) = rct(1) 840 ! B(2) = dA(2)/dV(1) 841 b(2) = rct(2) * v(2) 842 ! B(3) = dA(2)/dV(2) 843 b(3) = rct(2) * v(1) 855 ! B(2) = dA(2)/dV(7) 856 b(2) = rct(2) * v(8) 857 ! B(3) = dA(2)/dV(8) 858 b(3) = rct(2) * v(7) 859 ! B(4) = dA(3)/dV(2) 860 b(4) = rct(3) 861 ! B(5) = dA(4)/dV(1) 862 b(5) = rct(4) 863 ! B(6) = dA(5)/dV(3) 864 b(6) = rct(5) 865 ! B(7) = dA(6)/dV(4) 866 b(7) = rct(6) 867 ! B(8) = dA(7)/dV(5) 868 b(8) = rct(7) 844 869 845 870 ! Construct the Jacobian terms from B's 846 871 ! JVS(1) = Jac_FULL(1,1) 847 jvs(1) =  b(2)848 ! JVS(2) = Jac_FULL( 1,2)849 jvs(2) =  b(3)850 ! JVS(3) = Jac_FULL( 1,3)851 jvs(3) = b(1)852 ! JVS(4) = Jac_FULL( 2,1)853 jvs(4) =  b(2)854 ! JVS(5) = Jac_FULL( 2,2)855 jvs(5) =  b(3)856 ! JVS(6) = Jac_FULL( 2,3)857 jvs(6) = b(1)858 ! JVS(7) = Jac_FULL( 3,1)872 jvs(1) = 0 873 ! JVS(2) = Jac_FULL(2,2) 874 jvs(2) = 0 875 ! JVS(3) = Jac_FULL(3,3) 876 jvs(3) = 0 877 ! JVS(4) = Jac_FULL(4,4) 878 jvs(4) = 0 879 ! JVS(5) = Jac_FULL(5,5) 880 jvs(5) = 0 881 ! JVS(6) = Jac_FULL(6,6) 882 jvs(6) =  b(1) 883 ! JVS(7) = Jac_FULL(6,7) 859 884 jvs(7) = b(2) 860 ! JVS(8) = Jac_FULL( 3,2)885 ! JVS(8) = Jac_FULL(6,8) 861 886 jvs(8) = b(3) 862 ! JVS(9) = Jac_FULL(3,3) 863 jvs(9) =  b(1) 887 ! JVS(9) = Jac_FULL(7,6) 888 jvs(9) = b(1) 889 ! JVS(10) = Jac_FULL(7,7) 890 jvs(10) =  b(2) 891 ! JVS(11) = Jac_FULL(7,8) 892 jvs(11) =  b(3) 893 ! JVS(12) = Jac_FULL(8,6) 894 jvs(12) = b(1) 895 ! JVS(13) = Jac_FULL(8,7) 896 jvs(13) =  b(2) 897 ! JVS(14) = Jac_FULL(8,8) 898 jvs(14) =  b(3) 864 899 865 900 END SUBROUTINE jac_sp … … 890 925 rconst(1) = (phot(j_no2)) 891 926 rconst(2) = (arr2(1.8e12_dp , 1370.0_dp , temp)) 927 rconst(3) = (1.0_dp) 928 rconst(4) = (1.0_dp) 929 rconst(5) = (1.0_dp) 930 rconst(6) = (1.0_dp) 931 rconst(7) = (1.0_dp) 892 932 893 933 END SUBROUTINE update_rconst … … 2282 2322 ! i = 1 2283 2323 ! i = 2 2284 jvs(4) = (jvs(4)) / jvs(1)2285 jvs(5) = jvs(5)  jvs(2) * jvs(4)2286 jvs(6) = jvs(6)  jvs(3) * jvs(4)2287 2324 ! i = 3 2288 jvs(7) = (jvs(7)) / jvs(1) 2289 a = 0.0; a = a  jvs(2) * jvs(7) 2290 jvs(8) = (jvs(8) + a) / jvs(5) 2291 jvs(9) = jvs(9)  jvs(3) * jvs(7)  jvs(6) * jvs(8) 2325 ! i = 4 2326 ! i = 5 2327 ! i = 6 2328 ! i = 7 2329 jvs(9) = (jvs(9)) / jvs(6) 2330 jvs(10) = jvs(10)  jvs(7) * jvs(9) 2331 jvs(11) = jvs(11)  jvs(8) * jvs(9) 2332 ! i = 8 2333 jvs(12) = (jvs(12)) / jvs(6) 2334 a = 0.0; a = a  jvs(7) * jvs(12) 2335 jvs(13) = (jvs(13) + a) / jvs(10) 2336 jvs(14) = jvs(14)  jvs(8) * jvs(12)  jvs(11) * jvs(13) 2292 2337 RETURN 2293 2338
Note: See TracChangeset
for help on using the changeset viewer.