Index: palm/trunk/SOURCE/chem_modules.f90
===================================================================
--- palm/trunk/SOURCE/chem_modules.f90	(revision 3826)
+++ palm/trunk/SOURCE/chem_modules.f90	(revision 3827)
@@ -27,4 +27,7 @@
 ! -----------------
 ! $Id$
+! some formatting  and reordering (ecc) 
+! 
+! 3820 2019-03-27 11:53:41Z forkel
 ! renamed do_emis to emissions_anthropogenic, removed USE statistics, variables sorted by type 
 !
@@ -90,32 +93,32 @@
     CHARACTER (LEN=20)                ::  bc_cs_t             = 'initial_gradient'  !< namelist parameter
     CHARACTER (LEN=30)                ::  chem_mechanism      = 'phstatp'           !< KPP chmical mechanism
-    CHARACTER (LEN=11), DIMENSION(99) ::  cs_name             = 'novalue'           !< Namelist parameter: chem spcs names 
-    CHARACTER (LEN=11), DIMENSION(99) ::  cs_profile_name     = 'novalue'           !< Namelist parameter: Names of the chem for profiles
-    CHARACTER (LEN=11), DIMENSION(99) ::  data_output_pr_cs   = 'novalue'           !< Namelist parameter: Names of the chem species for profile output
                                                                                     !< by cs_name for each height lvls defined by cs_heights
     CHARACTER (LEN=80)                ::  daytype_mdh         ='workday'            !< Type of day in the MDH case: workday, weekend, holiday
     CHARACTER (LEN=80)                ::  mode_emis           ='PARAMETERIZED'      !< Mode of chemistry emissions: DEFAULT .OR. EXPERT .OR. 
                                                                                     !< PARAMETERIZED
+    CHARACTER (LEN=80)                ::  time_fac_type       ='MDH'                !< Type of time treatment in the emis DEFAULT mode: HOUR .OR. MDH 
+    CHARACTER (LEN=11), DIMENSION(99) ::  cs_name             = 'novalue'           !< Namelist parameter: chem spcs names 
+    CHARACTER (LEN=11), DIMENSION(99) ::  cs_profile_name     = 'novalue'           !< Namelist parameter: Names of the chem for profiles
+    CHARACTER (LEN=11), DIMENSION(99) ::  data_output_pr_cs   = 'novalue'           !< Namelist parameter: Names of the chem species for profile output
     CHARACTER (LEN=11), DIMENSION(99) ::  surface_csflux_name = 'novalue'           !< Namelist parameter: chem species names with surface fluxes specified
                                                                                     !< active chem spcs, default is 'novalue')  ????
-    CHARACTER (LEN=80)                ::  time_fac_type       ='MDH'                !< Type of time treatment in the emis DEFAULT mode: HOUR .OR. MDH 
 
-    INTEGER(iwp), DIMENSION(99)            ::  cs_pr_index                           = 0      !< index for chemical species profile (ecc)
-    INTEGER(iwp)                           ::  cs_pr_count                           = 0      !< namelist parameter : No. of species profiles (ecc)
-    INTEGER(iwp)                           ::  cs_vertical_gradient_level_ind(99,10) = -9999  !< grid index values of cs_vertical_gradient_level_ind(s)
-    INTEGER(iwp)                           ::  ibc_cs_b                                       !< integer flag for bc_cs_b
-    INTEGER(iwp)                           ::  ibc_cs_t                                       !< integer flag for bc_cs_t
-    INTEGER(iwp),ALLOCATABLE,DIMENSION(:)  ::  match_spec_input                               !< Index of Input chem species for matching routine 
-    INTEGER(iwp),ALLOCATABLE,DIMENSION(:)  ::  match_spec_model                               !< Index of Model chem species for matching routine
-    INTEGER(iwp),DIMENSION(:)              ::  match_spec_nox(1:2)                            !< results of matching the input and model's NOx
-    INTEGER(iwp),DIMENSION(:)              ::  match_spec_pm(1:3)                             !< results of matching the input and model's PMs
-    INTEGER(iwp),DIMENSION(:)              ::  match_spec_sox(1:2)                            !< results of matching the input and model's SOx! 
-    INTEGER(iwp),ALLOCATABLE,DIMENSION(:)  ::  match_spec_voc_input                           !< index of VOC input components matching the model's VOCs
-    INTEGER(iwp),ALLOCATABLE,DIMENSION(:)  ::  match_spec_voc_model                           !< index of VOC model species matching the input VOCs comp.
-    INTEGER(iwp)                           ::  main_street_id                        = 0      !< namelist parameter for chem_emissions : ID for main streets  
-    INTEGER(iwp)                           ::  max_pr_cs                             = 0      !< namelist parameter : Max no. of species profiles (ecc)
-    INTEGER(iwp)                           ::  max_street_id                         = 0      !< namelist parameter for chem_emissions : maximum street IDs      
-    INTEGER(iwp)                           ::  nspec_out                                      !< Output of routine chem_emis_matching with 
-    INTEGER(iwp)                           ::  side_street_id                        = 0      !< namelist paramtger for chem_emissions : ID for side streets
+    INTEGER(iwp)                          ::  cs_pr_count                           = 0      !< namelist parameter : No. of species profiles (ecc)
+    INTEGER(iwp)                          ::  cs_vertical_gradient_level_ind(99,10) = -9999  !< grid index values of cs_vertical_gradient_level_ind(s)
+    INTEGER(iwp)                          ::  ibc_cs_b                                       !< integer flag for bc_cs_b
+    INTEGER(iwp)                          ::  ibc_cs_t                                       !< integer flag for bc_cs_t
+    INTEGER(iwp)                          ::  main_street_id                        = 0      !< namelist parameter for chem_emissions : ID for main streets  
+    INTEGER(iwp)                          ::  max_pr_cs                             = 0      !< namelist parameter : Max no. of species profiles (ecc)
+    INTEGER(iwp)                          ::  max_street_id                         = 0      !< namelist parameter for chem_emissions : maximum street IDs      
+    INTEGER(iwp)                          ::  nspec_out                                      !< Output of routine chem_emis_matching with 
+    INTEGER(iwp)                          ::  side_street_id                        = 0      !< namelist paramtger for chem_emissions : ID for side streets
+    INTEGER(iwp),DIMENSION(99)            ::  cs_pr_index                           = 0      !< index for chemical species profile (ecc)
+    INTEGER(iwp),DIMENSION(:)             ::  match_spec_nox(1:2)                            !< results of matching the input and model's NOx
+    INTEGER(iwp),DIMENSION(:)             ::  match_spec_pm(1:3)                             !< results of matching the input and model's PMs
+    INTEGER(iwp),DIMENSION(:)             ::  match_spec_sox(1:2)                            !< results of matching the input and model's SOx! 
+    INTEGER(iwp),DIMENSION(:),ALLOCATABLE ::  match_spec_input                               !< Index of Input chem species for matching routine 
+    INTEGER(iwp),DIMENSION(:),ALLOCATABLE ::  match_spec_model                               !< Index of Model chem species for matching routine
+    INTEGER(iwp),DIMENSION(:),ALLOCATABLE ::  match_spec_voc_input                           !< index of VOC input components matching the model's VOCs
+    INTEGER(iwp),DIMENSION(:),ALLOCATABLE ::  match_spec_voc_model                           !< index of VOC model species matching the input VOCs comp.
 
     LOGICAL      ::  constant_top_csflux(99)               = .TRUE.   !< chem spcs at the top  orig .TRUE.
@@ -126,58 +129,58 @@
     LOGICAL      ::  chem_debug2                           = .FALSE.  !< namelist parameter flag for further print output
     LOGICAL      ::  chem_gasphase_on                      = .TRUE.   !< namelist parameter 
-    LOGICAL      ::  emission_output_required              = .TRUE.   !< Logical Variable for requiring Emission Outputs
     LOGICAL      ::  cs_pr_namelist_found                  = .FALSE.  !< Namelist parameter: Names of t
     LOGICAL      ::  deposition_dry                        = .FALSE.  !< namelist parameter for activation of deposition calculation
     LOGICAL      ::  emissions_anthropogenic               = .FALSE.  !< Flag for turning on anthropogenic emissions
+    LOGICAL      ::  emission_output_required              = .TRUE.   !< Logical Variable for requiring Emission Outputs
 !
 !-- Namelist parameters for creating initial chemistry profiles
-    REAL(wp)                                          ::  cs_surface_initial_change(99)     = 0.0_wp        !< namelist parameter : initial surface flux difference
-    REAL(wp)                                          ::  cs_vertical_gradient(99,10)       = 0.0_wp        !< namelist parameter : vertical gradient
-    REAL(wp)                                          ::  cs_vertical_gradient_level(99,10) = -999999.9_wp  !< namelist parameter : vertical gradient level
-    REAL(wp)                                          ::  surface_csflux(99)                = 0.0_wp        !< namelist parameter : fluxes where 'surface_csflux_name' is
-                                                                                                            !< in the namelist
-    REAL(wp)                                          ::  top_csflux(99)                    = 0.0_wp        !< namelist parameter : chemical species flux at ceiling
-    REAL(wp)                                          ::  wall_csflux(99,0:5)               = 0.0_wp        !< namelist parameter : chemical species flux lateral
-    REAL(wp), DIMENSION(:), ALLOCATABLE               ::  bc_cs_t_val                                       !< chemical specices time value at BC
-    REAL(wp), DIMENSION(:,:,:), POINTER               ::  cs                                                !< pointer: sgs chem spcs)
-    REAL(wp), DIMENSION(:,:,:,:), ALLOCATABLE, TARGET ::  cs_1                                              !< pointer for swapping of timelevels for respective quantity
-    REAL(wp), DIMENSION(:,:,:,:), ALLOCATABLE, TARGET ::  cs_2                                              !< pointer for swapping of timelevels for respective quantity
-    REAL(wp), DIMENSION(:,:,:,:), ALLOCATABLE, TARGET ::  cs_3                                              !< pointer for swapping of timelevels for respective quantity
-    REAL(wp), DIMENSION(:,:,:), POINTER               ::  cs_p                                              !< pointer: prognostic value of sgs chem spcs 
-    REAL(wp), DIMENSION(:), ALLOCATABLE               ::  css                                               !< scaling parameter for chem spcs
-    REAL(wp), DIMENSION(99,100)                       ::  cs_profile                        = 9999999.9_wp  !< Namelist parameter: Chem conc for each spcs defined
-    REAL(wp), DIMENSION(99,100)                       ::  cs_heights                        = 9999999.9_wp  !< Namelist parameter: Height lvls(m) for cs_profiles
-    REAL(wp), DIMENSION(99)                           ::  cs_surface                        = 0.0_wp        !< Namelist parameter: Surface conc of chem spcs'
-    REAL(wp),ALLOCATABLE, DIMENSION(:,:,:,:)          ::  emis_distribution                                 !< Emissions Final Values (main module output)
-    REAL(wp)                                          ::  emiss_factor_main(99)             = -9999.0_wp    !< emission factor for main streets
-    REAL(wp)                                          ::  emiss_factor_side(99)             = -9999.0_wp    !< emission factor for side streets
-    REAL(wp), DIMENSION(:,:,:), POINTER               ::  tcs_m                                             !< pointer: to tcs array (temp)
+    REAL(wp)                                        ::  cs_surface_initial_change(99)     = 0.0_wp        !< namelist parameter : initial surface flux difference
+    REAL(wp)                                        ::  cs_vertical_gradient(99,10)       = 0.0_wp        !< namelist parameter : vertical gradient
+    REAL(wp)                                        ::  cs_vertical_gradient_level(99,10) = -999999.9_wp  !< namelist parameter : vertical gradient level
+    REAL(wp)                                        ::  emiss_factor_main(99)             = -9999.0_wp    !< emission factor for main streets
+    REAL(wp)                                        ::  emiss_factor_side(99)             = -9999.0_wp    !< emission factor for side streets
+                                                                                                          !< in the namelist
+    REAL(wp)                                        ::  surface_csflux(99)                = 0.0_wp        !< namelist parameter : fluxes where 'surface_csflux_name' is
+    REAL(wp)                                        ::  top_csflux(99)                    = 0.0_wp        !< namelist parameter : chemical species flux at ceiling
+    REAL(wp)                                        ::  wall_csflux(99,0:5)               = 0.0_wp        !< namelist parameter : chemical species flux lateral
+    REAL(wp),DIMENSION(99)                          ::  cs_surface                        = 0.0_wp        !< Namelist parameter: Surface conc of chem spcs'
+    REAL(wp),DIMENSION(99,100)                      ::  cs_heights                        = 9999999.9_wp  !< Namelist parameter: Height lvls(m) for cs_profiles
+    REAL(wp),DIMENSION(99,100)                      ::  cs_profile                        = 9999999.9_wp  !< Namelist parameter: Chem conc for each spcs defined
+    REAL(wp),DIMENSION(:),ALLOCATABLE               ::  bc_cs_t_val                                       !< chemical specices time value at BC
+    REAL(wp),DIMENSION(:),ALLOCATABLE               ::  css                                               !< scaling parameter for chem spcs
+    REAL(wp),DIMENSION(:,:,:,:),ALLOCATABLE         ::  emis_distribution                                 !< Emissions Final Values (main module output)
+    REAL(wp),DIMENSION(:,:,:,:),ALLOCATABLE, TARGET ::  cs_1                                              !< pointer for swapping of timelevels for respective quantity
+    REAL(wp),DIMENSION(:,:,:,:),ALLOCATABLE, TARGET ::  cs_2                                              !< pointer for swapping of timelevels for respective quantity
+    REAL(wp),DIMENSION(:,:,:,:),ALLOCATABLE, TARGET ::  cs_3                                              !< pointer for swapping of timelevels for respective quantity
+    REAL(wp),DIMENSION(:,:,:),POINTER               ::  cs                                                !< pointer: sgs chem spcs)
+    REAL(wp),DIMENSION(:,:,:),POINTER               ::  cs_p                                              !< pointer: prognostic value of sgs chem spcs 
+    REAL(wp),DIMENSION(:,:,:),POINTER               ::  tcs_m                                             !< pointer: to tcs array (temp)
 !
 !-- molecular weights
-    REAL, PARAMETER        ::  xm_air   =   28.964e-3             !< air      molecular weight (kg/mol)
-    REAL, PARAMETER        ::  xm_C     =   12.01115e-3           !< C        molecular weight (kg/mol)
-    REAL, PARAMETER        ::  xm_Ca    =   40.07800e-3           !< Ca       molecular weight (kg/mol)
-    REAL, PARAMETER        ::  xm_Cd    =  112.41000e-3           !< Cd       molecular weight (kg/mol)
-    REAL, PARAMETER        ::  xm_Cl    =   35.45300e-3           !< Cl       molecular weight (kg/mol)
-    REAL, PARAMETER        ::  xm_dummy = 1000.0e-3               !< dummy    molecular weight (kg/mol)
-    REAL, PARAMETER        ::  xm_F     =   18.99840e-3           !< F        molecular weight (kg/mol)
-    REAL, PARAMETER        ::  xm_H     =    1.00790e-3           !< H        molecular weight (kg/mol)
-    REAL, PARAMETER        ::  xm_K     =   39.09800e-3           !< K        molecular weight (kg/mol)
-    REAL, PARAMETER        ::  xm_Mg    =   24.30500e-3           !< Mg       molecular weight (kg/mol)
-    REAL, PARAMETER        ::  xm_N     =   14.00670e-3           !< N        molecular weight (kg/mol)
-    REAL, PARAMETER        ::  xm_Na    =   22.98977e-3           !< Na       molecular weight (kg/mol)
-    REAL, PARAMETER        ::  xm_O     =   15.99940e-3           !< O        molecular weight (kg/mol)
-    REAL, PARAMETER        ::  xm_Pb    =  207.20000e-3           !< Pb       molecular weight (kg/mol)
-    REAL, PARAMETER        ::  xm_Pb210 =  210.00000e-3           !< Pb (210) molecular weight (kg/mol)
-    REAL, PARAMETER        ::  xm_Rn222 =  222.00000e-3           !< Rn (222) molecular weight (kg/mol)
-    REAL, PARAMETER        ::  xm_S     =   32.06400e-3           !< S        molecular weight (kg/mol)
-    REAL, PARAMETER        ::  xm_CO2   = xm_C + xm_O * 2         !< CO2      molecular weight (kg/mol)
-    REAL, PARAMETER        ::  xm_h2o   = xm_H * 2 + xm_O         !< H2O      molecular weight (kg/mol)
-    REAL, PARAMETER        ::  xm_HNO3  = xm_H + xm_N + xm_O * 3  !< HNO3     molecular weight (kg/mol)
-    REAL, PARAMETER        ::  xm_o3    = xm_O * 3                !< O3       molecular weight (kg/mol)
-    REAL, PARAMETER        ::  xm_N2O5  = xm_N * 2 + xm_O * 5     !< N2O5     molecular weight (kg/mol)
-    REAL, PARAMETER        ::  xm_NH4   = xm_N + xm_H * 4         !< NH4      molecular weight (kg/mol)
-    REAL, PARAMETER        ::  xm_NO3   = xm_N + xm_O * 3         !< NO3      molecular weight (kg/mol)
-    REAL, PARAMETER        ::  xm_SO4   = xm_S + xm_O * 4         !< SO4      molecular weight (kg/mol)
+    REAL, PARAMETER ::  xm_air   =   28.964e-3             !< air      molecular weight (kg/mol)
+    REAL, PARAMETER ::  xm_C     =   12.01115e-3           !< C        molecular weight (kg/mol)
+    REAL, PARAMETER ::  xm_Ca    =   40.07800e-3           !< Ca       molecular weight (kg/mol)
+    REAL, PARAMETER ::  xm_Cd    =  112.41000e-3           !< Cd       molecular weight (kg/mol)
+    REAL, PARAMETER ::  xm_Cl    =   35.45300e-3           !< Cl       molecular weight (kg/mol)
+    REAL, PARAMETER ::  xm_dummy = 1000.0e-3               !< dummy    molecular weight (kg/mol)
+    REAL, PARAMETER ::  xm_F     =   18.99840e-3           !< F        molecular weight (kg/mol)
+    REAL, PARAMETER ::  xm_H     =    1.00790e-3           !< H        molecular weight (kg/mol)
+    REAL, PARAMETER ::  xm_K     =   39.09800e-3           !< K        molecular weight (kg/mol)
+    REAL, PARAMETER ::  xm_Mg    =   24.30500e-3           !< Mg       molecular weight (kg/mol)
+    REAL, PARAMETER ::  xm_N     =   14.00670e-3           !< N        molecular weight (kg/mol)
+    REAL, PARAMETER ::  xm_Na    =   22.98977e-3           !< Na       molecular weight (kg/mol)
+    REAL, PARAMETER ::  xm_O     =   15.99940e-3           !< O        molecular weight (kg/mol)
+    REAL, PARAMETER ::  xm_Pb    =  207.20000e-3           !< Pb       molecular weight (kg/mol)
+    REAL, PARAMETER ::  xm_Pb210 =  210.00000e-3           !< Pb (210) molecular weight (kg/mol)
+    REAL, PARAMETER ::  xm_Rn222 =  222.00000e-3           !< Rn (222) molecular weight (kg/mol)
+    REAL, PARAMETER ::  xm_S     =   32.06400e-3           !< S        molecular weight (kg/mol)
+    REAL, PARAMETER ::  xm_CO2   = xm_C + xm_O * 2         !< CO2      molecular weight (kg/mol)
+    REAL, PARAMETER ::  xm_h2o   = xm_H * 2 + xm_O         !< H2O      molecular weight (kg/mol)
+    REAL, PARAMETER ::  xm_HNO3  = xm_H + xm_N + xm_O * 3  !< HNO3     molecular weight (kg/mol)
+    REAL, PARAMETER ::  xm_o3    = xm_O * 3                !< O3       molecular weight (kg/mol)
+    REAL, PARAMETER ::  xm_N2O5  = xm_N * 2 + xm_O * 5     !< N2O5     molecular weight (kg/mol)
+    REAL, PARAMETER ::  xm_NH4   = xm_N + xm_H * 4         !< NH4      molecular weight (kg/mol)
+    REAL, PARAMETER ::  xm_NO3   = xm_N + xm_O * 3         !< NO3      molecular weight (kg/mol)
+    REAL, PARAMETER ::  xm_SO4   = xm_S + xm_O * 4         !< SO4      molecular weight (kg/mol)
 
     SAVE
