Changeset 3632 for palm/trunk/SOURCE
- Timestamp:
- Dec 17, 2018 2:52:50 PM (6 years ago)
- Location:
- palm/trunk/SOURCE
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
palm/trunk/SOURCE/chem_gasphase_mod.f90
r3298 r3632 1 1 MODULE chem_gasphase_mod 2 2 3 ! Mechanism: p assive3 ! Mechanism: phstatp 4 4 ! 5 5 !------------------------------------------------------------------------------! … … 44 44 !--------------------------------------------------------------------------------! 45 45 ! 46 ! Current revisions: 47 ! ------------------ 48 ! 49 ! 50 ! Former revisions: 51 ! ----------------- 52 ! $Id: chem_gasphase_mod.f90 3287 2018-09-28 10:19:58Z forkel $ 53 ! forkel June 2018: qvap,fakt added 54 ! forkel June 2018: reset case in Initialize,Integrate,Update_rconst 55 ! 56 ! 57 ! 3287 2018-09-28 10:19:58Z forkel 58 ! 59 ! forkel Sept. 2017: Variables for photolyis added 60 ! 61 ! 62 ! Nov. 2016: Intial version (Klaus Ketelsen) 63 ! 64 !------------------------------------------------------------------------------! 65 ! 66 46 ! 47 ! MODULE HEADER TEMPLATE 48 ! 49 ! Initial version (Nov. 2016,ketelsen),for later modifications of module_header 50 ! see comments in kpp4palm/src/create_kpp_module.C 67 51 68 52 ! Set kpp Double Precision to PALM Default Precision … … 129 113 ! 130 114 ! File : chem_gasphase_mod_Parameters.f90 131 ! Time : Tue Sep 25 18:34:572018132 ! Working directory : /home/forkel-r/palmstuff/work/ chemistry20180925/UTIL/chemistry/gasphase_preproc/tmp_kpp4palm115 ! Time : Fri Nov 30 13:52:19 2018 116 ! Working directory : /home/forkel-r/palmstuff/work/trunk20181130/UTIL/chemistry/gasphase_preproc/tmp_kpp4palm 133 117 ! Equation file : chem_gasphase_mod.kpp 134 118 ! Output root filename : chem_gasphase_mod … … 142 126 143 127 ! NSPEC - Number of chemical species 144 INTEGER, PARAMETER :: nspec = 2128 INTEGER, PARAMETER :: nspec = 4 145 129 ! NVAR - Number of Variable species 146 INTEGER, PARAMETER :: nvar = 2130 INTEGER, PARAMETER :: nvar = 4 147 131 ! NVARACT - Number of Active species 148 INTEGER, PARAMETER :: nvaract = 2132 INTEGER, PARAMETER :: nvaract = 4 149 133 ! NFIX - Number of Fixed species 150 134 INTEGER, PARAMETER :: nfix = 1 151 135 ! NREACT - Number of reactions 152 INTEGER, PARAMETER :: nreact = 2136 INTEGER, PARAMETER :: nreact = 3 153 137 ! NVARST - Starting of variables in conc. vect. 154 138 INTEGER, PARAMETER :: nvarst = 1 155 139 ! NFIXST - Starting of fixed in conc. vect. 156 INTEGER, PARAMETER :: nfixst = 3140 INTEGER, PARAMETER :: nfixst = 5 157 141 ! NONZERO - Number of nonzero entries in Jacobian 158 INTEGER, PARAMETER :: nonzero = 2142 INTEGER, PARAMETER :: nonzero = 10 159 143 ! LU_NONZERO - Number of nonzero entries in LU factoriz. of Jacobian 160 INTEGER, PARAMETER :: lu_nonzero = 2144 INTEGER, PARAMETER :: lu_nonzero = 10 161 145 ! CNVAR - (NVAR+1) Number of elements in compressed row format 162 INTEGER, PARAMETER :: cnvar = 3146 INTEGER, PARAMETER :: cnvar = 5 163 147 ! CNEQN - (NREACT+1) Number stoicm elements in compressed col format 164 INTEGER, PARAMETER :: cneqn = 3148 INTEGER, PARAMETER :: cneqn = 4 165 149 ! NHESS - Length of Sparse Hessian 166 INTEGER, PARAMETER :: nhess = 1150 INTEGER, PARAMETER :: nhess = 3 167 151 ! NMASS - Number of atoms to check mass balance 168 152 INTEGER, PARAMETER :: nmass = 1 … … 172 156 173 157 INTEGER, PARAMETER, PUBLIC :: ind_pm10 = 1 174 INTEGER, PARAMETER, PUBLIC :: ind_pm25 = 2 158 INTEGER, PARAMETER, PUBLIC :: ind_no = 2 159 INTEGER, PARAMETER, PUBLIC :: ind_no2 = 3 160 INTEGER, PARAMETER, PUBLIC :: ind_o3 = 4 175 161 176 162 ! Index declaration for fixed species in C … … 183 169 184 170 ! NJVRP - Length of sparse Jacobian JVRP 185 INTEGER, PARAMETER :: njvrp = 2171 INTEGER, PARAMETER :: njvrp = 4 186 172 187 173 ! NSTOICM - Length of Sparse Stoichiometric Matrix 188 INTEGER, PARAMETER :: nstoicm = 1174 INTEGER, PARAMETER :: nstoicm = 6 189 175 190 176 … … 204 190 ! 205 191 ! File : chem_gasphase_mod_Global.f90 206 ! Time : Tue Sep 25 18:34:572018207 ! Working directory : /home/forkel-r/palmstuff/work/ chemistry20180925/UTIL/chemistry/gasphase_preproc/tmp_kpp4palm192 ! Time : Fri Nov 30 13:52:19 2018 193 ! Working directory : /home/forkel-r/palmstuff/work/trunk20181130/UTIL/chemistry/gasphase_preproc/tmp_kpp4palm 208 194 ! Equation file : chem_gasphase_mod.kpp 209 195 ! Output root filename : chem_gasphase_mod … … 270 256 ! 271 257 ! File : chem_gasphase_mod_JacobianSP.f90 272 ! Time : Tue Sep 25 18:34:572018273 ! Working directory : /home/forkel-r/palmstuff/work/ chemistry20180925/UTIL/chemistry/gasphase_preproc/tmp_kpp4palm258 ! Time : Fri Nov 30 13:52:19 2018 259 ! Working directory : /home/forkel-r/palmstuff/work/trunk20181130/UTIL/chemistry/gasphase_preproc/tmp_kpp4palm 274 260 ! Equation file : chem_gasphase_mod.kpp 275 261 ! Output root filename : chem_gasphase_mod … … 285 271 286 272 287 INTEGER, PARAMETER, DIMENSION( 2):: lu_irow = (/ &288 1, 2 /)289 290 INTEGER, PARAMETER, DIMENSION( 2):: lu_icol = (/ &291 1, 2 /)292 293 INTEGER, PARAMETER, DIMENSION( 3):: lu_crow = (/ &294 1, 2, 3/)295 296 INTEGER, PARAMETER, DIMENSION( 3):: lu_diag = (/ &297 1, 2, 3/)273 INTEGER, PARAMETER, DIMENSION(10):: lu_irow = (/ & 274 1, 2, 2, 2, 3, 3, 3, 4, 4, 4 /) 275 276 INTEGER, PARAMETER, DIMENSION(10):: lu_icol = (/ & 277 1, 2, 3, 4, 2, 3, 4, 2, 3, 4 /) 278 279 INTEGER, PARAMETER, DIMENSION(5):: lu_crow = (/ & 280 1, 2, 5, 8, 11 /) 281 282 INTEGER, PARAMETER, DIMENSION(5):: lu_diag = (/ & 283 1, 2, 6, 10, 11 /) 298 284 299 285 … … 314 300 ! 315 301 ! File : chem_gasphase_mod_Monitor.f90 316 ! Time : Tue Sep 25 18:34:572018317 ! Working directory : /home/forkel-r/palmstuff/work/ chemistry20180925/UTIL/chemistry/gasphase_preproc/tmp_kpp4palm302 ! Time : Fri Nov 30 13:52:19 2018 303 ! Working directory : /home/forkel-r/palmstuff/work/trunk20181130/UTIL/chemistry/gasphase_preproc/tmp_kpp4palm 318 304 ! Equation file : chem_gasphase_mod.kpp 319 305 ! Output root filename : chem_gasphase_mod … … 325 311 326 312 327 CHARACTER(len=15), PARAMETER, DIMENSION(2):: spc_names = (/ & 328 'PM10 ','PM25 ' /) 329 330 CHARACTER(len=100), PARAMETER, DIMENSION(2):: eqn_names = (/ & 331 'PM10 --> PM10 ',& 332 'PM25 --> PM25 ' /) 313 CHARACTER(len=15), PARAMETER, DIMENSION(4):: spc_names = (/ & 314 'PM10 ','NO ','NO2 ',& 315 'O3 ' /) 316 317 CHARACTER(len=100), PARAMETER, DIMENSION(3):: eqn_names = (/ & 318 ' NO2 --> NO + O3 ',& 319 'NO + O3 --> NO2 ',& 320 ' PM10 --> PM10 ' /) 333 321 334 322 ! INLINED global variables … … 337 325 ! REAL(kind=dp):: phot(nphot)must eventually be moved to global later for 338 326 INTEGER, PARAMETER :: nphot = 1 339 ! phot photolysis frequencies 327 ! phot photolysis frequencies 340 328 REAL(kind=dp):: phot(nphot) 341 329 … … 374 362 ! 375 363 ! File : chem_gasphase_mod_Initialize.f90 376 ! Time : Tue Sep 25 18:34:572018377 ! Working directory : /home/forkel-r/palmstuff/work/ chemistry20180925/UTIL/chemistry/gasphase_preproc/tmp_kpp4palm364 ! Time : Fri Nov 30 13:52:19 2018 365 ! Working directory : /home/forkel-r/palmstuff/work/trunk20181130/UTIL/chemistry/gasphase_preproc/tmp_kpp4palm 378 366 ! Equation file : chem_gasphase_mod.kpp 379 367 ! Output root filename : chem_gasphase_mod … … 400 388 ! 401 389 ! File : chem_gasphase_mod_Integrator.f90 402 ! Time : Tue Sep 25 18:34:572018403 ! Working directory : /home/forkel-r/palmstuff/work/ chemistry20180925/UTIL/chemistry/gasphase_preproc/tmp_kpp4palm390 ! Time : Fri Nov 30 13:52:19 2018 391 ! Working directory : /home/forkel-r/palmstuff/work/trunk20181130/UTIL/chemistry/gasphase_preproc/tmp_kpp4palm 404 392 ! Equation file : chem_gasphase_mod.kpp 405 393 ! Output root filename : chem_gasphase_mod … … 458 446 ! 459 447 ! File : chem_gasphase_mod_LinearAlgebra.f90 460 ! Time : Tue Sep 25 18:34:572018461 ! Working directory : /home/forkel-r/palmstuff/work/ chemistry20180925/UTIL/chemistry/gasphase_preproc/tmp_kpp4palm448 ! Time : Fri Nov 30 13:52:19 2018 449 ! Working directory : /home/forkel-r/palmstuff/work/trunk20181130/UTIL/chemistry/gasphase_preproc/tmp_kpp4palm 462 450 ! Equation file : chem_gasphase_mod.kpp 463 451 ! Output root filename : chem_gasphase_mod … … 485 473 ! 486 474 ! File : chem_gasphase_mod_Jacobian.f90 487 ! Time : Tue Sep 25 18:34:572018488 ! Working directory : /home/forkel-r/palmstuff/work/ chemistry20180925/UTIL/chemistry/gasphase_preproc/tmp_kpp4palm475 ! Time : Fri Nov 30 13:52:19 2018 476 ! Working directory : /home/forkel-r/palmstuff/work/trunk20181130/UTIL/chemistry/gasphase_preproc/tmp_kpp4palm 489 477 ! Equation file : chem_gasphase_mod.kpp 490 478 ! Output root filename : chem_gasphase_mod … … 512 500 ! 513 501 ! File : chem_gasphase_mod_Function.f90 514 ! Time : Tue Sep 25 18:34:572018515 ! Working directory : /home/forkel-r/palmstuff/work/ chemistry20180925/UTIL/chemistry/gasphase_preproc/tmp_kpp4palm502 ! Time : Fri Nov 30 13:52:19 2018 503 ! Working directory : /home/forkel-r/palmstuff/work/trunk20181130/UTIL/chemistry/gasphase_preproc/tmp_kpp4palm 516 504 ! Equation file : chem_gasphase_mod.kpp 517 505 ! Output root filename : chem_gasphase_mod … … 541 529 ! 542 530 ! File : chem_gasphase_mod_Rates.f90 543 ! Time : Tue Sep 25 18:34:572018544 ! Working directory : /home/forkel-r/palmstuff/work/ chemistry20180925/UTIL/chemistry/gasphase_preproc/tmp_kpp4palm531 ! Time : Fri Nov 30 13:52:19 2018 532 ! Working directory : /home/forkel-r/palmstuff/work/trunk20181130/UTIL/chemistry/gasphase_preproc/tmp_kpp4palm 545 533 ! Equation file : chem_gasphase_mod.kpp 546 534 ! Output root filename : chem_gasphase_mod … … 567 555 ! 568 556 ! File : chem_gasphase_mod_Util.f90 569 ! Time : Tue Sep 25 18:34:572018570 ! Working directory : /home/forkel-r/palmstuff/work/ chemistry20180925/UTIL/chemistry/gasphase_preproc/tmp_kpp4palm557 ! Time : Fri Nov 30 13:52:19 2018 558 ! Working directory : /home/forkel-r/palmstuff/work/trunk20181130/UTIL/chemistry/gasphase_preproc/tmp_kpp4palm 571 559 ! Equation file : chem_gasphase_mod.kpp 572 560 ! Output root filename : chem_gasphase_mod … … 777 765 778 766 ! Computation of equation rates 767 a(1) = rct(1) * v(3) 768 a(2) = rct(2) * v(2) * v(4) 779 769 780 770 ! Aggregate function 781 771 vdot(1) = 0 782 vdot(2) = 0 772 vdot(2) = a(1) - a(2) 773 vdot(3) = - a(1) + a(2) 774 vdot(4) = a(1) - a(2) 783 775 784 776 END SUBROUTINE fun … … 791 783 REAL(kind=dp):: x(nvar) 792 784 793 x(2) = x(2) / jvs(2) 785 x(3) = x(3) - jvs(5) * x(2) 786 x(4) = x(4) - jvs(8) * x(2) - jvs(9) * x(3) 787 x(4) = x(4) / jvs(10) 788 x(3) = (x(3) - jvs(7) * x(4)) /(jvs(6)) 789 x(2) = (x(2) - jvs(3) * x(3) - jvs(4) * x(4)) /(jvs(2)) 794 790 x(1) = x(1) / jvs(1) 795 791 … … 810 806 ! Local variables 811 807 ! B - Temporary array 812 REAL(kind=dp):: b( 2)813 814 ! B(1) = dA(1)/dV( 1)808 REAL(kind=dp):: b(4) 809 810 ! B(1) = dA(1)/dV(3) 815 811 b(1) = rct(1) 816 812 ! B(2) = dA(2)/dV(2) 817 b(2) = rct(2) 813 b(2) = rct(2) * v(4) 814 ! B(3) = dA(2)/dV(4) 815 b(3) = rct(2) * v(2) 816 ! B(4) = dA(3)/dV(1) 817 b(4) = rct(3) 818 818 819 819 ! Construct the Jacobian terms from B's … … 821 821 jvs(1) = 0 822 822 ! JVS(2) = Jac_FULL(2,2) 823 jvs(2) = 0 823 jvs(2) = - b(2) 824 ! JVS(3) = Jac_FULL(2,3) 825 jvs(3) = b(1) 826 ! JVS(4) = Jac_FULL(2,4) 827 jvs(4) = - b(3) 828 ! JVS(5) = Jac_FULL(3,2) 829 jvs(5) = b(2) 830 ! JVS(6) = Jac_FULL(3,3) 831 jvs(6) = - b(1) 832 ! JVS(7) = Jac_FULL(3,4) 833 jvs(7) = b(3) 834 ! JVS(8) = Jac_FULL(4,2) 835 jvs(8) = - b(2) 836 ! JVS(9) = Jac_FULL(4,3) 837 jvs(9) = b(1) 838 ! JVS(10) = Jac_FULL(4,4) 839 jvs(10) = - b(3) 824 840 825 841 END SUBROUTINE jac_sp … … 848 864 ! End INLINED RCONST 849 865 850 rconst(1) = (1.0_dp) 851 rconst(2) = (1.0_dp) 866 rconst(1) = (phot(j_no2)) 867 rconst(2) = (arr2(1.8e-12_dp , 1370.0_dp , temp)) 868 rconst(3) = (1.0_dp) 852 869 853 870 END SUBROUTINE update_rconst … … 2234 2251 ! i = 1 2235 2252 ! i = 2 2253 ! i = 3 2254 jvs(5) = (jvs(5)) / jvs(2) 2255 jvs(6) = jvs(6) - jvs(3) * jvs(5) 2256 jvs(7) = jvs(7) - jvs(4) * jvs(5) 2257 ! i = 4 2258 jvs(8) = (jvs(8)) / jvs(2) 2259 a = 0.0; a = a - jvs(3) * jvs(8) 2260 jvs(9) = (jvs(9) + a) / jvs(6) 2261 jvs(10) = jvs(10) - jvs(4) * jvs(8) - jvs(7) * jvs(9) 2236 2262 RETURN 2237 2263 -
palm/trunk/SOURCE/data_output_mask.f90
r3589 r3632 25 25 ! ----------------- 26 26 ! $Id$ 27 ! Fix output time levels (use time_since_reference_point) 28 ! 29 ! 3589 2018-11-30 15:09:51Z suehring 27 30 ! Move the control parameter "salsa" from salsa_mod.f90 to control_parameters 28 31 ! … … 168 171 mask_j, mask_k, mask_size, mask_size_l, mask_start_l, & 169 172 mask_surface, & 170 max_masks, message_string, mid, nz_do3d, salsa, simulated_time 173 max_masks, message_string, mid, nz_do3d, salsa, & 174 time_since_reference_point 175 171 176 USE cpulog, & 172 177 ONLY: cpu_log, log_point … … 265 270 IF ( myid == 0 .OR. netcdf_data_format > 4 ) THEN 266 271 nc_stat = NF90_PUT_VAR( id_set_mask(mid,av), id_var_time_mask(mid,av), & 267 (/ simulated_time /),&272 (/ time_since_reference_point /), & 268 273 start = (/ domask_time_count(mid,av) /), & 269 274 count = (/ 1 /) ) … … 370 375 CASE ( 'pr' ) ! mean particle radius (effective radius) 371 376 IF ( av == 0 ) THEN 372 IF ( simulated_time>= particle_advection_start ) THEN377 IF ( time_since_reference_point >= particle_advection_start ) THEN 373 378 DO i = nxl, nxr 374 379 DO j = nys, nyn … … 514 519 CASE ( 'ql_vp' ) 515 520 IF ( av == 0 ) THEN 516 IF ( simulated_time>= particle_advection_start ) THEN521 IF ( time_since_reference_point >= particle_advection_start ) THEN 517 522 DO i = nxl, nxr 518 523 DO j = nys, nyn
Note: See TracChangeset
for help on using the changeset viewer.