Changeset 3833 for palm/trunk/SOURCE
- Timestamp:
- Mar 28, 2019 3:04:04 PM (6 years ago)
- Location:
- palm/trunk/SOURCE
- Files:
-
- 12 edited
Legend:
- Unmodified
- Added
- Removed
-
palm/trunk/SOURCE/Makefile
r3745 r3833 874 874 modules.o 875 875 chem_modules.o: \ 876 chem_gasphase_mod.o \877 876 mod_kinds.o \ 878 877 modules.o … … 1440 1439 bulk_cloud_model_mod.o \ 1441 1440 chemistry_model_mod.o \ 1442 chem_ modules.o \1441 chem_gasphase_mod.o \ 1443 1442 mod_kinds.o \ 1444 1443 mod_particle_attributes.o \ … … 1511 1510 buoyancy.o \ 1512 1511 chemistry_model_mod.o \ 1512 chem_gasphase_mod.o \ 1513 1513 chem_modules.o \ 1514 1514 chem_photolysis_mod.o \ … … 1626 1626 basic_constants_and_equations_mod.o \ 1627 1627 bulk_cloud_model_mod.o \ 1628 chem_gasphase_mod.o \ 1628 1629 chem_modules.o \ 1629 1630 exchange_horiz_2d.o \ … … 1634 1635 urban_surface_mod.o 1635 1636 surface_mod.o: \ 1637 chem_gasphase_mod.o \ 1636 1638 chem_modules.o \ 1637 1639 model_1d_mod.o \ … … 1670 1672 chem_emissions_mod.o \ 1671 1673 chemistry_model_mod.o \ 1674 chem_gasphase_mod.o \ 1672 1675 chem_modules.o \ 1673 1676 cpulog_mod.o \ … … 1847 1850 cpulog_mod.o \ 1848 1851 chemistry_model_mod.o \ 1849 chem_ modules.o \1852 chem_gasphase_mod.o \ 1850 1853 mod_kinds.o \ 1851 1854 modules.o \ -
palm/trunk/SOURCE/chem_gasphase_mod.f90
r3820 r3833 60 60 !SAVE ! note: occurs again in automatically generated code ... 61 61 62 ! PUBLIC :: IERR_NAMES 63 64 ! PUBLIC :: SPC_NAMES,EQN_NAMES,EQN_TAGS,REQ_HET,REQ_AEROSOL,REQ_PHOTRAT & 65 ! ,REQ_MCFCT,IP_MAX,jname 66 62 ! Public variables 63 PUBLIC :: atol 67 64 PUBLIC :: cs_mech 68 PUBLIC :: eqn_names, phot_names, spc_names 65 PUBLIC :: eqn_names 66 PUBLIC :: fakt 69 67 PUBLIC :: nmaxfixsteps 70 PUBLIC :: atol, rtol 71 PUBLIC :: nspec, nreact 68 PUBLIC :: nphot 69 PUBLIC :: nreact 70 PUBLIC :: nspec 71 PUBLIC :: nvar 72 PUBLIC :: qvap 73 PUBLIC :: phot 74 PUBLIC :: phot_names 75 PUBLIC :: rconst 76 PUBLIC :: rtol 77 PUBLIC :: spc_names 72 78 PUBLIC :: temp 73 PUBLIC :: qvap 74 PUBLIC :: fakt 75 PUBLIC :: phot 76 PUBLIC :: rconst 77 PUBLIC :: nvar 78 PUBLIC :: nphot 79 PUBLIC :: vl_dim ! PUBLIC to ebable other MODULEs to distiguish between scalar and vec 80 81 PUBLIC :: initialize, integrate, update_rconst 79 PUBLIC :: vl_dim !< PUBLIC to enable other MODULEs to distiguish between scalar and vec 80 81 ! Public routines 82 82 PUBLIC :: chem_gasphase_integrate 83 PUBLIC :: get_mechanism_name 84 PUBLIC :: initialize 83 85 PUBLIC :: initialize_kpp_ctrl 84 PUBLIC :: get_mechanism_name 86 PUBLIC :: integrate 87 PUBLIC :: update_rconst 85 88 86 89 ! END OF MODULE HEADER TEMPLATE … … 114 117 ! 115 118 ! File : chem_gasphase_mod_Parameters.f90 116 ! Time : Wed Mar 27 09:51:40 2019119 ! Time : Thu Mar 28 15:59:30 2019 117 120 ! Working directory : /home/forkel-r/palmstuff/work/trunk20190327/UTIL/chemistry/gasphase_preproc/tmp_kpp4palm 118 121 ! Equation file : chem_gasphase_mod.kpp … … 191 194 ! 192 195 ! File : chem_gasphase_mod_Global.f90 193 ! Time : Wed Mar 27 09:51:40 2019196 ! Time : Thu Mar 28 15:59:30 2019 194 197 ! Working directory : /home/forkel-r/palmstuff/work/trunk20190327/UTIL/chemistry/gasphase_preproc/tmp_kpp4palm 195 198 ! Equation file : chem_gasphase_mod.kpp … … 256 259 ! 257 260 ! File : chem_gasphase_mod_JacobianSP.f90 258 ! Time : Wed Mar 27 09:51:40 2019261 ! Time : Thu Mar 28 15:59:30 2019 259 262 ! Working directory : /home/forkel-r/palmstuff/work/trunk20190327/UTIL/chemistry/gasphase_preproc/tmp_kpp4palm 260 263 ! Equation file : chem_gasphase_mod.kpp … … 300 303 ! 301 304 ! File : chem_gasphase_mod_Monitor.f90 302 ! Time : Wed Mar 27 09:51:40 2019305 ! Time : Thu Mar 28 15:59:30 2019 303 306 ! Working directory : /home/forkel-r/palmstuff/work/trunk20190327/UTIL/chemistry/gasphase_preproc/tmp_kpp4palm 304 307 ! Equation file : chem_gasphase_mod.kpp … … 362 365 ! 363 366 ! File : chem_gasphase_mod_Initialize.f90 364 ! Time : Wed Mar 27 09:51:40 2019367 ! Time : Thu Mar 28 15:59:30 2019 365 368 ! Working directory : /home/forkel-r/palmstuff/work/trunk20190327/UTIL/chemistry/gasphase_preproc/tmp_kpp4palm 366 369 ! Equation file : chem_gasphase_mod.kpp … … 388 391 ! 389 392 ! File : chem_gasphase_mod_Integrator.f90 390 ! Time : Wed Mar 27 09:51:40 2019393 ! Time : Thu Mar 28 15:59:30 2019 391 394 ! Working directory : /home/forkel-r/palmstuff/work/trunk20190327/UTIL/chemistry/gasphase_preproc/tmp_kpp4palm 392 395 ! Equation file : chem_gasphase_mod.kpp … … 446 449 ! 447 450 ! File : chem_gasphase_mod_LinearAlgebra.f90 448 ! Time : Wed Mar 27 09:51:40 2019451 ! Time : Thu Mar 28 15:59:30 2019 449 452 ! Working directory : /home/forkel-r/palmstuff/work/trunk20190327/UTIL/chemistry/gasphase_preproc/tmp_kpp4palm 450 453 ! Equation file : chem_gasphase_mod.kpp … … 473 476 ! 474 477 ! File : chem_gasphase_mod_Jacobian.f90 475 ! Time : Wed Mar 27 09:51:40 2019478 ! Time : Thu Mar 28 15:59:30 2019 476 479 ! Working directory : /home/forkel-r/palmstuff/work/trunk20190327/UTIL/chemistry/gasphase_preproc/tmp_kpp4palm 477 480 ! Equation file : chem_gasphase_mod.kpp … … 500 503 ! 501 504 ! File : chem_gasphase_mod_Function.f90 502 ! Time : Wed Mar 27 09:51:40 2019505 ! Time : Thu Mar 28 15:59:30 2019 503 506 ! Working directory : /home/forkel-r/palmstuff/work/trunk20190327/UTIL/chemistry/gasphase_preproc/tmp_kpp4palm 504 507 ! Equation file : chem_gasphase_mod.kpp … … 529 532 ! 530 533 ! File : chem_gasphase_mod_Rates.f90 531 ! Time : Wed Mar 27 09:51:40 2019534 ! Time : Thu Mar 28 15:59:30 2019 532 535 ! Working directory : /home/forkel-r/palmstuff/work/trunk20190327/UTIL/chemistry/gasphase_preproc/tmp_kpp4palm 533 536 ! Equation file : chem_gasphase_mod.kpp … … 555 558 ! 556 559 ! File : chem_gasphase_mod_Util.f90 557 ! Time : Wed Mar 27 09:51:40 2019560 ! Time : Thu Mar 28 15:59:30 2019 558 561 ! Working directory : /home/forkel-r/palmstuff/work/trunk20190327/UTIL/chemistry/gasphase_preproc/tmp_kpp4palm 559 562 ! Equation file : chem_gasphase_mod.kpp … … 589 592 INTEGER, PARAMETER, PUBLIC :: nkppctrl = 20 590 593 ! 591 INTEGER, DIMENSION(nkppctrl), PUBLIC :: icntrl = 0 594 ! steering PARAMETERs for chemistry solver (see kpp domumentation) 595 INTEGER, DIMENSION(nkppctrl), PUBLIC :: icntrl = 0 592 596 REAL(dp), DIMENSION(nkppctrl), PUBLIC :: rcntrl = 0.0_dp 597 ! t_steps: fixed time steps in vector mode 593 598 REAL(dp), DIMENSION(nmaxfixsteps), PUBLIC :: t_steps = 0.0_dp 594 599 -
palm/trunk/SOURCE/chem_modules.f90
r3827 r3833 27 27 ! ----------------- 28 28 ! $Id$ 29 ! removed USE chem_gasphase_mod 30 ! 31 ! 3827 2019-03-27 17:20:32Z forkel 29 32 ! some formatting and reordering (ecc) 30 33 ! … … 75 78 MODULE chem_modules 76 79 77 USE chem_gasphase_mod, &78 ONLY: cs_mech, nspec, nvar, spc_names79 80 80 USE control_parameters, & 81 81 ONLY: varnamelength … … 84 84 85 85 IMPLICIT NONE 86 87 PUBLIC cs_mech88 PUBLIC nspec89 PUBLIC nvar90 PUBLIC spc_names91 86 92 87 CHARACTER (LEN=20) :: bc_cs_b = 'dirichlet' !< namelist parameter -
palm/trunk/SOURCE/chemistry_model_mod.f90
r3824 r3833 27 27 ! ----------------- 28 28 ! $Id: chemistry_model_mod.f90 3784 2019-03-05 14:16:20Z banzhafs 29 ! added cs_mech to USE chem_gasphase_mod 30 ! 31 ! 3784 2019-03-05 14:16:20Z banzhafs 29 32 ! renamed get_mechanismname to get_mechanism_name 30 33 ! renamed do_emiss to emissions_anthropogenic and do_depo to deposition_dry (ecc) … … 257 260 ! ------------ 258 261 !> Chemistry model for PALM-4U 262 !> @todo Extend chem_species type by nspec and nvar as addititional elements 259 263 !> @todo Adjust chem_rrd_local to CASE structure of others modules. It is not 260 264 !> allowed to use the chemistry model in a precursor run and additionally 261 265 !> not using it in a main run 262 266 !> @todo Update/clean-up todo list! (FK) 263 !> @todo Set proper fill values (/= 0) for chem output arrays! (FK)264 267 !> @todo Add routine chem_check_parameters, add checks for inconsistent or 265 268 !> unallowed parameter settings. 266 269 !> CALL of chem_check_parameters from check_parameters. (FK) 267 !> @todo Make routine chem_header available, CALL from header.f90268 !> (see e.g. how it is done in routine lsm_header in269 !> land_surface_model_mod.f90). chem_header should include all setup270 !> info about chemistry parameter settings. (FK)271 270 !> @todo Implement turbulent inflow of chem spcs in inflow_turbulence. 272 271 !> @todo Separate boundary conditions for each chem spcs to be implemented … … 307 306 308 307 USE chem_gasphase_mod, & 309 ONLY: atol, chem_gasphase_integrate, get_mechanism_name, nkppctrl, nmaxfixsteps,&310 n phot, nreact, nspec, nvar, phot_names, rtol, spc_names, t_steps, vl_dim308 ONLY: atol, chem_gasphase_integrate, cs_mech, get_mechanism_name, nkppctrl, & 309 nmaxfixsteps, nphot, nreact, nspec, nvar, phot_names, rtol, spc_names, t_steps, vl_dim 311 310 312 311 USE chem_modules -
palm/trunk/SOURCE/multi_agent_system_mod.f90
r3766 r3833 25 25 ! ----------------- 26 26 ! $Id$ 27 ! replaced nspec by nvar: only variable species should bconsidered, fixed species are not relevant 28 ! 29 ! 3766 2019-02-26 16:23:41Z raasch 27 30 ! save attribute added to local targets to avoid outlive pointer target warning 28 31 ! … … 3015 3018 3016 3019 ! USE chem_gasphase_mod, & 3017 ! ONLY: n spec3020 ! ONLY: nvar 3018 3021 3019 3022 ! USE chemistry_model_mod, & … … 3108 3111 ! !-- Get indices of PM10 and PM2.5 species, if active 3109 3112 ! IF ( air_chemistry ) THEN 3110 ! DO il = 1, n spec3113 ! DO il = 1, nvar 3111 3114 ! print*,chem_species(il)%name 3112 3115 ! ! IF ( spec_name(1:4) == 'PM10' ) THEN -
palm/trunk/SOURCE/pmc_interface_mod.f90
r3822 r3833 25 25 ! ----------------- 26 26 ! $Id$ 27 ! replaced USE chem_modules by USE chem_gasphase_mod 28 ! 29 ! 3822 2019-03-27 13:10:23Z hellstea 27 30 ! Temporary increase of the vertical dimension of the parent-grid arrays and 28 31 ! workarrc_t is cancelled as unnecessary. … … 397 400 roughness_length, topography, volume_flow 398 401 399 USE chem_ modules, &402 USE chem_gasphase_mod, & 400 403 ONLY: nspec 401 404 -
palm/trunk/SOURCE/prognostic_equations.f90
r3820 r3833 25 25 ! ----------------- 26 26 ! $Id$ 27 ! added USE chem_gasphase_mod for nvar, nspec and spc_names 28 ! 29 ! 3820 2019-03-27 11:53:41Z forkel 27 30 ! renamed do_depo to deposition_dry (ecc) 28 31 ! … … 378 381 deposition_dry 379 382 383 USE chem_gasphase_mod, & 384 ONLY: nspec, nvar, spc_names 385 380 386 USE chem_photolysis_mod, & 381 387 ONLY: photolysis_control … … 383 389 USE chemistry_model_mod, & 384 390 ONLY: chem_boundary_conds, chem_depo, chem_integrate, & 385 chem_prognostic_equations, chem_species, & 386 nspec, nvar, spc_names 391 chem_prognostic_equations, chem_species 387 392 388 393 USE control_parameters, & -
palm/trunk/SOURCE/salsa_mod.f90
r3787 r3833 26 26 ! ----------------- 27 27 ! $Id$ 28 ! added USE chem_gasphase_mod for nvar, nspec and spc_names 29 ! 30 ! 3787 2019-03-07 08:43:54Z raasch 28 31 ! unused variables removed 29 32 ! … … 96 99 ONLY: c_p, g, p_0, pi, r_d 97 100 101 USE chem_gasphase_mod, & 102 ONLY: nspec, nvar, spc_names 103 98 104 USE chemistry_model_mod, & 99 ONLY: chem_species , nspec, nvar, spc_names105 ONLY: chem_species 100 106 101 107 USE chem_modules, & -
palm/trunk/SOURCE/surface_layer_fluxes_mod.f90
r3787 r3833 26 26 ! ----------------- 27 27 ! $Id$ 28 ! added USE chem_gasphase_mod 29 ! 30 ! 3787 2019-03-07 08:43:54Z raasch 28 31 ! unused variables removed 29 32 ! … … 255 258 USE basic_constants_and_equations_mod, & 256 259 ONLY: g, kappa, lv_d_cp, pi, rd_d_rv 260 261 USE chem_gasphase_mod, & 262 ONLY: nvar 257 263 258 264 USE chem_modules, & -
palm/trunk/SOURCE/surface_mod.f90
r3772 r3833 26 26 ! ----------------- 27 27 ! $Id$ 28 ! added USE chem_gasphase_mod (chem_modules will not transport nvar and nspec anymore) 29 ! 30 ! 3772 2019-02-28 15:51:57Z suehring 28 31 ! small change in the todo's 29 32 ! … … 270 273 ONLY: heatflux_input_conversion, momentumflux_input_conversion, & 271 274 rho_air, rho_air_zw, zu, zw, waterflux_input_conversion 275 276 USE chem_gasphase_mod, & 277 ONLY: nvar, spc_names 272 278 273 279 USE chem_modules -
palm/trunk/SOURCE/time_integration.f90
r3820 r3833 25 25 ! ----------------- 26 26 ! $Id$ 27 ! added USE chem_gasphase_mod, replaced nspec by nvar since fixed compounds are not integrated 28 ! 29 ! 3820 2019-03-27 11:53:41Z forkel 27 30 ! renamed do_emiss to emissions_anthropogenic (ecc) 28 31 ! … … 489 492 ONLY: chem_emissions_setup 490 493 494 USE chem_gasphase_mod, & 495 ONLY: nvar 496 491 497 USE chem_modules, & 492 ONLY: bc_cs_t_val, cs_name, emissions_anthropogenic, nspec , nspec_out498 ONLY: bc_cs_t_val, cs_name, emissions_anthropogenic, nspec_out 493 499 494 500 USE chemistry_model_mod, & … … 844 850 bc_q_t_val = ( q_init(nzt+1) - q_init(nzt) ) / dzu(nzt+1) 845 851 IF ( air_chemistry ) THEN 846 DO lsp = 1, n spec852 DO lsp = 1, nvar 847 853 bc_cs_t_val = ( chem_species(lsp)%conc_pr_init(nzt+1) & 848 854 - chem_species(lsp)%conc_pr_init(nzt) ) & … … 1007 1013 IF ( passive_scalar ) CALL exchange_horiz( s_p, nbgp ) 1008 1014 IF ( air_chemistry ) THEN 1009 DO lsp = 1, n spec1015 DO lsp = 1, nvar 1010 1016 CALL exchange_horiz( chem_species(lsp)%conc_p, nbgp ) 1011 1017 ! … … 1110 1116 1111 1117 IF ( air_chemistry ) THEN 1112 DO n = 1, n spec1118 DO n = 1, nvar 1113 1119 CALL exchange_horiz( chem_species(n)%conc, nbgp ) 1114 1120 ENDDO -
palm/trunk/SOURCE/virtual_measurement_mod.f90
r3766 r3833 25 25 ! ----------------- 26 26 ! $Id$ 27 ! renamed nvar to nmeas, replaced USE chem_modules by USE chem_gasphase_mod and nspec by nvar 28 ! 29 ! 3766 2019-02-26 16:23:41Z raasch 27 30 ! unused variables removed 28 31 ! … … 76 79 ONLY: q, pt, u, v, w, zu, zw 77 80 78 USE chem_ modules,&79 ONLY: n spec81 USE chem_gasphase_mod, & 82 ONLY: nvar 80 83 81 84 USE chemistry_model_mod, & … … 132 135 INTEGER(iwp) :: ns_tot = 0 !< total number of observation coordinates, for atmospheric measurements 133 136 INTEGER(iwp) :: ntraj !< number of trajectories of a measurement 134 INTEGER(iwp) :: n var!< number of measured variables (atmosphere + soil)137 INTEGER(iwp) :: nmeas !< number of measured variables (atmosphere + soil) 135 138 136 139 INTEGER(iwp) :: ns_soil = 0 !< number of observation coordinates on subdomain, for soil measurements … … 551 554 !-- for a NULL to get the correct character length in order to compare 552 555 !-- them with the list of allowed variables. 553 vmea(l)%n var= 0556 vmea(l)%nmeas = 0 554 557 DO ll = 1, SIZE( measured_variables_file ) 555 558 IF ( measured_variables_file(ll)(1:1) /= CHAR(0) .AND. & … … 569 572 IF ( measured_variables_file(ll)(1:len_char) == & 570 573 TRIM( list_allowed_variables(lll) ) ) THEN 571 vmea(l)%n var = vmea(l)%nvar+ 1572 measured_variables(vmea(l)%n var) =&574 vmea(l)%nmeas = vmea(l)%nmeas + 1 575 measured_variables(vmea(l)%nmeas) = & 573 576 measured_variables_file(ll)(1:len_char) 574 577 ENDIF … … 578 581 ! 579 582 !-- Allocate array for the measured variables names for the respective site. 580 ALLOCATE( vmea(l)%measured_vars_name(1:vmea(l)%n var) )581 582 DO ll = 1, vmea(l)%n var583 ALLOCATE( vmea(l)%measured_vars_name(1:vmea(l)%nmeas) ) 584 585 DO ll = 1, vmea(l)%nmeas 583 586 vmea(l)%measured_vars_name(ll) = TRIM( measured_variables(ll) ) 584 587 ENDDO … … 587 590 !-- chemistry mechanism. 588 591 ! IF ( air_chemistry ) THEN 589 ! DO ll = 1, vmea(l)%n var592 ! DO ll = 1, vmea(l)%nmeas 590 593 ! chem_include = .FALSE. 591 ! DO n = 1, n spec594 ! DO n = 1, nvar 592 595 ! IF ( TRIM( vmea(l)%measured_vars_name(ll) ) == & 593 596 ! TRIM( chem_species(n)%name ) ) chem_include = .TRUE. … … 609 612 !-- as this would exceed memory requirements, particularly for trajectory 610 613 !-- measurements. 611 IF ( vmea(l)%n var> 0 ) THEN614 IF ( vmea(l)%nmeas > 0 ) THEN 612 615 ! 613 616 !-- For stationary measurements UTM coordinates are just one value and … … 855 858 ! 856 859 !-- Allocate array to save the sampled values. 857 ALLOCATE( vmea(l)%measured_vars(1:vmea(l)%ns,1:vmea(l)%n var) )860 ALLOCATE( vmea(l)%measured_vars(1:vmea(l)%ns,1:vmea(l)%nmeas) ) 858 861 859 862 IF ( vmea(l)%soil_sampling ) & 860 863 ALLOCATE( vmea(l)%measured_vars_soil(1:vmea(l)%ns_soil, & 861 1:vmea(l)%n var) )864 1:vmea(l)%nmeas) ) 862 865 ! 863 866 !-- Initialize with _FillValues 864 vmea(l)%measured_vars(1:vmea(l)%ns,1:vmea(l)%n var) = vmea(l)%fillout867 vmea(l)%measured_vars(1:vmea(l)%ns,1:vmea(l)%nmeas) = vmea(l)%fillout 865 868 IF ( vmea(l)%soil_sampling ) & 866 vmea(l)%measured_vars_soil(1:vmea(l)%ns_soil,1:vmea(l)%n var) =&869 vmea(l)%measured_vars_soil(1:vmea(l)%ns_soil,1:vmea(l)%nmeas) = & 867 870 vmea(l)%fillout 868 871 ! … … 955 958 WRITE ( 27 ) vmea(l)%ns_tot 956 959 WRITE ( 27 ) 'number of measured variables ' 957 WRITE ( 27 ) vmea(l)%n var960 WRITE ( 27 ) vmea(l)%nmeas 958 961 WRITE ( 27 ) 'variables ' 959 962 WRITE ( 27 ) vmea(l)%measured_vars_name(:) … … 1013 1016 !-- Skip binary writing if no observation points are defined on PE 1014 1017 IF ( vmea(l)%ns < 1 .AND. vmea(l)%ns_soil < 1) CYCLE 1015 DO n = 1, vmea(l)%n var1018 DO n = 1, vmea(l)%nmeas 1016 1019 WRITE( 27 ) vmea(l)%measured_vars_name(n) 1017 1020 IF ( vmea(l)%soil_sampling .AND. & … … 1106 1109 ! 1107 1110 !-- Loop over all variables measured at this site. 1108 DO n = 1, vmea(l)%n var1111 DO n = 1, vmea(l)%nmeas 1109 1112 1110 1113 SELECT CASE ( TRIM( vmea(l)%measured_vars_name(n) ) ) … … 1263 1266 !-- Run loop over all chemical species, if the measured 1264 1267 !-- variable matches the interal name, sample the variable. 1265 DO nn = 1, n spec1268 DO nn = 1, nvar 1266 1269 IF ( TRIM( chem_vars(1,ind_chem) ) == & 1267 1270 TRIM( chem_species(nn)%name ) ) THEN
Note: See TracChangeset
for help on using the changeset viewer.