Changeset 3835
- Timestamp:
- Mar 28, 2019 4:24:29 PM (6 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
palm/trunk/SOURCE/chem_modules.f90
r3833 r3835 15 15 ! PALM. If not, see <http://www.gnu.org/licenses/>. 16 16 ! 17 ! Copyright 2018-201 8Leibniz Universitaet Hannover18 ! Copyright 2018-201 8Karlsruhe Institute of Technology19 ! Copyright 2018-201 8Freie Universitaet Berlin17 ! Copyright 2018-2019 Leibniz Universitaet Hannover 18 ! Copyright 2018-2019 Karlsruhe Institute of Technology 19 ! Copyright 2018-2019 Freie Universitaet Berlin 20 20 !------------------------------------------------------------------------------! 21 21 ! … … 27 27 ! ----------------- 28 28 ! $Id$ 29 ! Formatting, clean-up, clarified/corrected comments 30 ! 31 ! 3833 2019-03-28 15:04:04Z forkel 29 32 ! removed USE chem_gasphase_mod 30 33 ! … … 85 88 IMPLICIT NONE 86 89 87 CHARACTER (LEN=20) :: bc_cs_b = 'dirichlet' !< namelist parameter 88 CHARACTER (LEN=20) :: bc_cs_t = 'initial_gradient' !< namelist parameter 89 CHARACTER (LEN=30) :: chem_mechanism = 'phstatp' !< KPP chmical mechanism 90 !< by cs_name for each height lvls defined by cs_heights 91 CHARACTER (LEN=80) :: daytype_mdh ='workday' !< Type of day in the MDH case: workday, weekend, holiday 92 CHARACTER (LEN=80) :: mode_emis ='PARAMETERIZED' !< Mode of chemistry emissions: DEFAULT .OR. EXPERT .OR. 93 !< PARAMETERIZED 94 CHARACTER (LEN=80) :: time_fac_type ='MDH' !< Type of time treatment in the emis DEFAULT mode: HOUR .OR. MDH 95 CHARACTER (LEN=11), DIMENSION(99) :: cs_name = 'novalue' !< Namelist parameter: chem spcs names 96 CHARACTER (LEN=11), DIMENSION(99) :: cs_profile_name = 'novalue' !< Namelist parameter: Names of the chem for profiles 97 CHARACTER (LEN=11), DIMENSION(99) :: data_output_pr_cs = 'novalue' !< Namelist parameter: Names of the chem species for profile output 98 CHARACTER (LEN=11), DIMENSION(99) :: surface_csflux_name = 'novalue' !< Namelist parameter: chem species names with surface fluxes specified 99 !< active chem spcs, default is 'novalue') ???? 90 CHARACTER (LEN=20) :: bc_cs_b = 'dirichlet' !< namelist parameter: surface boundary condition for concentration 91 CHARACTER (LEN=20) :: bc_cs_t = 'initial_gradient' !< namelist parameter: top boudary condition for concentration 92 CHARACTER (LEN=30) :: chem_mechanism = 'phstatp' !< namelist parameter: chemistry mechanism 93 CHARACTER (LEN=80) :: daytype_mdh = 'workday' !< namelist parameter: type of day - workday, weekend, holiday 94 CHARACTER (LEN=80) :: mode_emis = 'PARAMETERIZED' !< namelist parameter: mode of chemistry emissions - DEFAULT, EXPERT, PARAMETERIZED 95 CHARACTER (LEN=80) :: time_fac_type = 'MDH' !< namelist parameter: type of time treatment in the mode_emis DEFAULT - HOUR, MDH 96 97 CHARACTER (LEN=11), DIMENSION(99) :: cs_name = 'novalue' !< namelist parameter: names of species with given fluxes (see csflux) 98 CHARACTER (LEN=11), DIMENSION(99) :: cs_profile_name = 'novalue' !< namelist parameter: tbc...??? 99 CHARACTER (LEN=11), DIMENSION(99) :: data_output_pr_cs = 'novalue' !< namelist parameter: tbc...??? 100 CHARACTER (LEN=11), DIMENSION(99) :: surface_csflux_name = 'novalue' !< namelist parameter: tbc...??? 100 101 101 INTEGER(iwp) :: cs_pr_count = 0 !< namelist parameter : No. of species profiles (ecc) 102 INTEGER(iwp) :: cs_vertical_gradient_level_ind(99,10) = -9999 !< grid index values of cs_vertical_gradient_level_ind(s) 103 INTEGER(iwp) :: ibc_cs_b !< integer flag for bc_cs_b 104 INTEGER(iwp) :: ibc_cs_t !< integer flag for bc_cs_t 105 INTEGER(iwp) :: main_street_id = 0 !< namelist parameter for chem_emissions : ID for main streets 106 INTEGER(iwp) :: max_pr_cs = 0 !< namelist parameter : Max no. of species profiles (ecc) 107 INTEGER(iwp) :: max_street_id = 0 !< namelist parameter for chem_emissions : maximum street IDs 108 INTEGER(iwp) :: nspec_out !< Output of routine chem_emis_matching with 109 INTEGER(iwp) :: side_street_id = 0 !< namelist paramtger for chem_emissions : ID for side streets 110 INTEGER(iwp),DIMENSION(99) :: cs_pr_index = 0 !< index for chemical species profile (ecc) 111 INTEGER(iwp),DIMENSION(:) :: match_spec_nox(1:2) !< results of matching the input and model's NOx 112 INTEGER(iwp),DIMENSION(:) :: match_spec_pm(1:3) !< results of matching the input and model's PMs 113 INTEGER(iwp),DIMENSION(:) :: match_spec_sox(1:2) !< results of matching the input and model's SOx! 114 INTEGER(iwp),DIMENSION(:),ALLOCATABLE :: match_spec_input !< Index of Input chem species for matching routine 115 INTEGER(iwp),DIMENSION(:),ALLOCATABLE :: match_spec_model !< Index of Model chem species for matching routine 116 INTEGER(iwp),DIMENSION(:),ALLOCATABLE :: match_spec_voc_input !< index of VOC input components matching the model's VOCs 117 INTEGER(iwp),DIMENSION(:),ALLOCATABLE :: match_spec_voc_model !< index of VOC model species matching the input VOCs comp. 102 INTEGER(iwp) :: cs_pr_count = 0 !< counter for chemical species profiles 103 INTEGER(iwp) :: cs_vertical_gradient_level_ind(99,10) = -9999 !< grid index values of cs_vertical_gradient_level 104 INTEGER(iwp) :: ibc_cs_b !< integer flag for bc_cs_b 105 INTEGER(iwp) :: ibc_cs_t !< integer flag for bc_cs_t 106 INTEGER(iwp) :: main_street_id = 0 !< namelist parameter: lower bound of main street IDs (OpenStreetMaps) for PARAMETERIZED mode 107 INTEGER(iwp) :: max_pr_cs = 0 !< 108 INTEGER(iwp) :: max_street_id = 0 !< namelist parameter: upper bound of main street IDs (OpenStreetMaps) for PARAMETERIZED mode 109 INTEGER(iwp) :: nspec_out !< output of routine chem_emis_matching with.....??? 110 INTEGER(iwp) :: side_street_id = 0 !< namelist parameter: lower bound of side street IDs (OpenStreetMaps) for PARAMETERIZED mode 118 111 119 LOGICAL :: constant_top_csflux(99) = .TRUE. !< chem spcs at the top orig .TRUE. 120 LOGICAL :: constant_csflux(99) = .TRUE. !< chem spcs at namelist parameter orig TRUE 121 LOGICAL :: call_chem_at_all_substeps = .FALSE. !< namelist parameter 122 LOGICAL :: chem_debug0 = .FALSE. !< namelist parameter flag for minimum print output 123 LOGICAL :: chem_debug1 = .FALSE. !< namelist parameter flag for print output 124 LOGICAL :: chem_debug2 = .FALSE. !< namelist parameter flag for further print output 125 LOGICAL :: chem_gasphase_on = .TRUE. !< namelist parameter 126 LOGICAL :: cs_pr_namelist_found = .FALSE. !< Namelist parameter: Names of t 127 LOGICAL :: deposition_dry = .FALSE. !< namelist parameter for activation of deposition calculation 128 LOGICAL :: emissions_anthropogenic = .FALSE. !< Flag for turning on anthropogenic emissions 129 LOGICAL :: emission_output_required = .TRUE. !< Logical Variable for requiring Emission Outputs 130 ! 131 !-- Namelist parameters for creating initial chemistry profiles 132 REAL(wp) :: cs_surface_initial_change(99) = 0.0_wp !< namelist parameter : initial surface flux difference 133 REAL(wp) :: cs_vertical_gradient(99,10) = 0.0_wp !< namelist parameter : vertical gradient 134 REAL(wp) :: cs_vertical_gradient_level(99,10) = -999999.9_wp !< namelist parameter : vertical gradient level 135 REAL(wp) :: emiss_factor_main(99) = -9999.0_wp !< emission factor for main streets 136 REAL(wp) :: emiss_factor_side(99) = -9999.0_wp !< emission factor for side streets 137 !< in the namelist 138 REAL(wp) :: surface_csflux(99) = 0.0_wp !< namelist parameter : fluxes where 'surface_csflux_name' is 139 REAL(wp) :: top_csflux(99) = 0.0_wp !< namelist parameter : chemical species flux at ceiling 140 REAL(wp) :: wall_csflux(99,0:5) = 0.0_wp !< namelist parameter : chemical species flux lateral 141 REAL(wp),DIMENSION(99) :: cs_surface = 0.0_wp !< Namelist parameter: Surface conc of chem spcs' 142 REAL(wp),DIMENSION(99,100) :: cs_heights = 9999999.9_wp !< Namelist parameter: Height lvls(m) for cs_profiles 143 REAL(wp),DIMENSION(99,100) :: cs_profile = 9999999.9_wp !< Namelist parameter: Chem conc for each spcs defined 144 REAL(wp),DIMENSION(:),ALLOCATABLE :: bc_cs_t_val !< chemical specices time value at BC 145 REAL(wp),DIMENSION(:),ALLOCATABLE :: css !< scaling parameter for chem spcs 146 REAL(wp),DIMENSION(:,:,:,:),ALLOCATABLE :: emis_distribution !< Emissions Final Values (main module output) 147 REAL(wp),DIMENSION(:,:,:,:),ALLOCATABLE, TARGET :: cs_1 !< pointer for swapping of timelevels for respective quantity 148 REAL(wp),DIMENSION(:,:,:,:),ALLOCATABLE, TARGET :: cs_2 !< pointer for swapping of timelevels for respective quantity 149 REAL(wp),DIMENSION(:,:,:,:),ALLOCATABLE, TARGET :: cs_3 !< pointer for swapping of timelevels for respective quantity 150 REAL(wp),DIMENSION(:,:,:),POINTER :: cs !< pointer: sgs chem spcs) 151 REAL(wp),DIMENSION(:,:,:),POINTER :: cs_p !< pointer: prognostic value of sgs chem spcs 152 REAL(wp),DIMENSION(:,:,:),POINTER :: tcs_m !< pointer: to tcs array (temp) 153 ! 154 !-- molecular weights 112 INTEGER(iwp), DIMENSION(99) :: cs_pr_index = 0 !< index for chemical species profiles 113 INTEGER(iwp), DIMENSION(:) :: match_spec_nox(1:2) !< results of matching the input and model's NOx 114 INTEGER(iwp), DIMENSION(:) :: match_spec_pm(1:3) !< results of matching the input and model's PMs 115 INTEGER(iwp), DIMENSION(:) :: match_spec_sox(1:2) !< results of matching the input and model's SOx! 116 117 INTEGER(iwp), DIMENSION(:), ALLOCATABLE :: match_spec_input !< index of input chem species for matching routine 118 INTEGER(iwp), DIMENSION(:), ALLOCATABLE :: match_spec_model !< index of model chem species for matching routine 119 INTEGER(iwp), DIMENSION(:), ALLOCATABLE :: match_spec_voc_input !< index of VOC input components matching the model's VOCs 120 INTEGER(iwp), DIMENSION(:), ALLOCATABLE :: match_spec_voc_model !< index of VOC model species matching the input VOCs comp. 121 122 LOGICAL :: constant_top_csflux(99) = .TRUE. !< internal flag, set to .FALSE. if no top_csflux is prescribed 123 LOGICAL :: constant_csflux(99) = .TRUE. !< internal flag, set to .FALSE. if no surface_csflux is prescribed 124 LOGICAL :: call_chem_at_all_substeps = .FALSE. !< namelist parameter: ....??? 125 LOGICAL :: chem_debug0 = .FALSE. !< namelist parameter: flag for minimum print output 126 LOGICAL :: chem_debug1 = .FALSE. !< namelist parameter: flag for print output 127 LOGICAL :: chem_debug2 = .FALSE. !< namelist parameter: flag for further print output 128 LOGICAL :: chem_gasphase_on = .TRUE. !< namelist parameter: flag to switch off chemical reactions 129 LOGICAL :: cs_pr_namelist_found = .FALSE. !< ...??? 130 LOGICAL :: deposition_dry = .FALSE. !< namelist parameter: flag for activation of deposition calculation 131 LOGICAL :: emissions_anthropogenic = .FALSE. !< namelist parameter: flag for turning on anthropogenic emissions 132 LOGICAL :: emission_output_required = .TRUE. !< internal flag for requiring emission outputs 133 134 REAL(wp) :: cs_surface_initial_change(99) = 0.0_wp !< namelist parameter: ...??? 135 REAL(wp) :: cs_vertical_gradient(99,10) = 0.0_wp !< namelist parameter: ...??? 136 REAL(wp) :: cs_vertical_gradient_level(99,10) = -999999.9_wp !< namelist parameter: ...??? 137 REAL(wp) :: emiss_factor_main(99) = -9999.0_wp !< namelist parameter: ...??? 138 REAL(wp) :: emiss_factor_side(99) = -9999.0_wp !< namelist parameter: ...??? 139 REAL(wp) :: surface_csflux(99) = 0.0_wp !< namelist parameter: ...??? 140 REAL(wp) :: top_csflux(99) = 0.0_wp !< namelist parameter: ...??? 141 REAL(wp) :: wall_csflux(99,0:5) = 0.0_wp !< namelist parameter: ...??? 142 143 REAL(wp), DIMENSION(99) :: cs_surface = 0.0_wp !< namelist parameter: chem species concentration at surface 144 REAL(wp), DIMENSION(99,100) :: cs_heights = 9999999.9_wp !< namelist parameter: height levels for initial chem species concentrations 145 REAL(wp), DIMENSION(99,100) :: cs_profile = 9999999.9_wp !< namelist parameter: chem species concentration values at cs_heights levels 146 147 REAL(wp), DIMENSION(:), ALLOCATABLE :: bc_cs_t_val !< vertical gradient of chemical species near domain top 148 REAL(wp), DIMENSION(:), ALLOCATABLE :: css !< scaling parameter for chem species 149 150 REAL(wp), DIMENSION(:,:,:,:), ALLOCATABLE :: emis_distribution !< emissions final values (main module output) ??? 151 152 REAL(wp), DIMENSION(:,:,:,:), ALLOCATABLE, TARGET :: cs_1 !< pointer for swapping of timelevels for respective quantity 153 REAL(wp), DIMENSION(:,:,:,:), ALLOCATABLE, TARGET :: cs_2 !< pointer for swapping of timelevels for respective quantity 154 REAL(wp), DIMENSION(:,:,:,:), ALLOCATABLE, TARGET :: cs_3 !< pointer for swapping of timelevels for respective quantity 155 156 REAL(wp), DIMENSION(:,:,:), POINTER :: cs !< pointer: sgs chem spcs ??? 157 REAL(wp), DIMENSION(:,:,:), POINTER :: cs_p !< pointer: prognostic value of sgs chem spcs ??? 158 REAL(wp), DIMENSION(:,:,:), POINTER :: tcs_m !< pointer: to tcs array (temp) 159 155 160 REAL, PARAMETER :: xm_air = 28.964e-3 !< air molecular weight (kg/mol) 156 161 REAL, PARAMETER :: xm_C = 12.01115e-3 !< C molecular weight (kg/mol)
Note: See TracChangeset
for help on using the changeset viewer.