Index: palm/trunk/SOURCE/chem_emissions_mod.f90
===================================================================
--- palm/trunk/SOURCE/chem_emissions_mod.f90	(revision 3312)
+++ palm/trunk/SOURCE/chem_emissions_mod.f90	(revision 3337)
@@ -27,4 +27,8 @@
 ! -----------------
 ! $Id$
+! (from branch resler)
+! Formatting
+! 
+! 3312 2018-10-06 14:15:46Z knoop
 ! Initial revision
 !
@@ -719,7 +723,8 @@
                 DO  ispec = 1 , len_index
 
-                   IF ( emiss_factor_main(match_spec_input(ispec)) .LT. 0 .AND. emiss_factor_side(match_spec_input(ispec)) .LT. 0 ) THEN
-
-                      message_string = 'PARAMETERIZED emissions mode selected:'            //          &
+                   IF ( emiss_factor_main(match_spec_input(ispec)) .LT. 0 .AND.                         &
+                        emiss_factor_side(match_spec_input(ispec)) .LT. 0 ) THEN
+
+                      message_string = 'PARAMETERIZED emissions mode selected:'            //           &
                                        ' EMISSIONS POSSIBLE ONLY ON STREET SURFACES'        //          &
                                        ' but values of scaling factors for street types'    //          &
@@ -1246,13 +1251,17 @@
                 IF (TRIM(spc_names(match_spec_model(ispec)))=="NO") THEN
                 !>             Kg/m2                       kg/m2*s                                                    
-                   delta_emis(nys:nyn,nxl:nxr) = emis(nys:nyn,nxl:nxr)*time_factor(icat)*emt_att%nox_comp(icat,1)*con_factor
+                   delta_emis(nys:nyn,nxl:nxr) =                                                             &
+                         emis(nys:nyn,nxl:nxr)*time_factor(icat)*emt_att%nox_comp(icat,1)*con_factor
                    
-                   emis_distribution(1,nys:nyn,nxl:nxr,ispec)=emis_distribution(1,nys:nyn,nxl:nxr,ispec)+delta_emis(nys:nyn,nxl:nxr)
+                   emis_distribution(1,nys:nyn,nxl:nxr,ispec) =                                              &
+                         emis_distribution(1,nys:nyn,nxl:nxr,ispec)+delta_emis(nys:nyn,nxl:nxr)
 
                 ELSE IF (TRIM(spc_names(match_spec_model(ispec)))=="NO2") THEN
    
-                   delta_emis(nys:nyn,nxl:nxr) = emis(nys:nyn,nxl:nxr)*time_factor(icat)*emt_att%nox_comp(icat,2)*con_factor
-
-                   emis_distribution(1,nys:nyn,nxl:nxr,ispec)=emis_distribution(1,nys:nyn,nxl:nxr,ispec)+delta_emis(nys:nyn,nxl:nxr)
+                   delta_emis(nys:nyn,nxl:nxr) =                                                             &
+                         emis(nys:nyn,nxl:nxr)*time_factor(icat)*emt_att%nox_comp(icat,2)*con_factor
+
+                   emis_distribution(1,nys:nyn,nxl:nxr,ispec) =                                              &
+                         emis_distribution(1,nys:nyn,nxl:nxr,ispec)+delta_emis(nys:nyn,nxl:nxr)
  
              !> SOX Compositions
@@ -1260,13 +1269,17 @@
                 ELSE IF (TRIM(spc_names(match_spec_model(ispec)))=="SO2") THEN
                       
-                   delta_emis(nys:nyn,nxl:nxr) = emis(nys:nyn,nxl:nxr)*time_factor(icat)*emt_att%sox_comp(icat,1)*con_factor
-
-                   emis_distribution(1,nys:nyn,nxl:nxr,ispec)=emis_distribution(1,nys:nyn,nxl:nxr,ispec)+delta_emis(nys:nyn,nxl:nxr)
+                   delta_emis(nys:nyn,nxl:nxr) =                                                             &
+                         emis(nys:nyn,nxl:nxr)*time_factor(icat)*emt_att%sox_comp(icat,1)*con_factor
+
+                   emis_distribution(1,nys:nyn,nxl:nxr,ispec) =                                              &
+                         emis_distribution(1,nys:nyn,nxl:nxr,ispec)+delta_emis(nys:nyn,nxl:nxr)
 
                 ELSE IF (TRIM(spc_names(match_spec_model(ispec)))=="SO4") THEN
    
-                   delta_emis(nys:nyn,nxl:nxr) = emis(nys:nyn,nxl:nxr)*time_factor(icat)*emt_att%sox_comp(icat,2)*con_factor
-
-                   emis_distribution(1,nys:nyn,nxl:nxr,ispec)=emis_distribution(1,nys:nyn,nxl:nxr,ispec)+delta_emis(nys:nyn,nxl:nxr)
+                   delta_emis(nys:nyn,nxl:nxr) =                                                             &
+                         emis(nys:nyn,nxl:nxr)*time_factor(icat)*emt_att%sox_comp(icat,2)*con_factor
+
+                   emis_distribution(1,nys:nyn,nxl:nxr,ispec) =                                              &
+                         emis_distribution(1,nys:nyn,nxl:nxr,ispec)+delta_emis(nys:nyn,nxl:nxr)
  
 
@@ -1278,8 +1291,10 @@
                    DO i_pm_comp= 1,SIZE(emt_att%pm_comp(1,:,1))
 
-                      delta_emis(nys:nyn,nxl:nxr) = emis(nys:nyn,nxl:nxr)*time_factor(icat)*emt_att%pm_comp(icat,i_pm_comp,1)*con_factor 
+                      delta_emis(nys:nyn,nxl:nxr) =                                                          &
+                            emis(nys:nyn,nxl:nxr)*time_factor(icat)*emt_att%pm_comp(icat,i_pm_comp,1)*con_factor
                                                                                          
 
-                      emis_distribution(1,nys:nyn,nxl:nxr,ispec)=emis_distribution(1,nys:nyn,nxl:nxr,ispec)+delta_emis(nys:nyn,nxl:nxr)
+                      emis_distribution(1,nys:nyn,nxl:nxr,ispec) =                                           &
+                            emis_distribution(1,nys:nyn,nxl:nxr,ispec)+delta_emis(nys:nyn,nxl:nxr)
  
                    ENDDO
@@ -1291,8 +1306,10 @@
                    DO i_pm_comp= 1,SIZE(emt_att%pm_comp(1,:,2))
 
-                      delta_emis(nys:nyn,nxl:nxr) = emis(nys:nyn,nxl:nxr)*time_factor(icat)*emt_att%pm_comp(icat,i_pm_comp,2)*con_factor 
+                      delta_emis(nys:nyn,nxl:nxr) =                                                          &
+                            emis(nys:nyn,nxl:nxr)*time_factor(icat)*emt_att%pm_comp(icat,i_pm_comp,2)*con_factor
                                                                                          
 
-                      emis_distribution(1,nys:nyn,nxl:nxr,ispec)=emis_distribution(1,nys:nyn,nxl:nxr,ispec)+delta_emis(nys:nyn,nxl:nxr)
+                      emis_distribution(1,nys:nyn,nxl:nxr,ispec) =                                           &
+                            emis_distribution(1,nys:nyn,nxl:nxr,ispec)+delta_emis(nys:nyn,nxl:nxr)
  
                    ENDDO
@@ -1304,8 +1321,10 @@
                    DO i_pm_comp= 1,SIZE(emt_att%pm_comp(1,:,3))  
                        
-                      delta_emis(nys:nyn,nxl:nxr) = emis(nys:nyn,nxl:nxr)*time_factor(icat)*emt_att%pm_comp(icat,i_pm_comp,3)*con_factor 
+                      delta_emis(nys:nyn,nxl:nxr) =                                                          &
+                            emis(nys:nyn,nxl:nxr)*time_factor(icat)*emt_att%pm_comp(icat,i_pm_comp,3)*con_factor
                                                                                                  
 
-                      emis_distribution(1,nys:nyn,nxl:nxr,ispec)=emis_distribution(1,nys:nyn,nxl:nxr,ispec)+delta_emis(nys:nyn,nxl:nxr) 
+                      emis_distribution(1,nys:nyn,nxl:nxr,ispec) =                                           &
+                            emis_distribution(1,nys:nyn,nxl:nxr,ispec)+delta_emis(nys:nyn,nxl:nxr)
 
                    ENDDO
@@ -1319,8 +1338,9 @@
                       IF (TRIM(spc_names(match_spec_model(ispec)))==TRIM(emt_att%voc_name(ivoc))) THEN    
 
-                         delta_emis(nys:nyn,nxl:nxr) = emis(nys:nyn,nxl:nxr)*time_factor(icat)*                               &
+                         delta_emis(nys:nyn,nxl:nxr) = emis(nys:nyn,nxl:nxr)*time_factor(icat)*               &
                                                        emt_att%voc_comp(icat,match_spec_voc_input(ivoc))*con_factor
 
-                         emis_distribution(1,nys:nyn,nxl:nxr,ispec)=emis_distribution(1,nys:nyn,nxl:nxr,ispec)+delta_emis(nys:nyn,nxl:nxr) 
+                         emis_distribution(1,nys:nyn,nxl:nxr,ispec) =                                         &
+                               emis_distribution(1,nys:nyn,nxl:nxr,ispec)+delta_emis(nys:nyn,nxl:nxr)
 
                       ENDIF                       
@@ -1333,5 +1353,6 @@
                    delta_emis(nys:nyn,nxl:nxr) = emis(nys:nyn,nxl:nxr)*time_factor(icat)*con_factor
  
-                   emis_distribution(1,nys:nyn,nxl:nxr,ispec)=emis_distribution(1,nys:nyn,nxl:nxr,ispec)+delta_emis(nys:nyn,nxl:nxr) 
+                   emis_distribution(1,nys:nyn,nxl:nxr,ispec) =                                               &
+                         emis_distribution(1,nys:nyn,nxl:nxr,ispec)+delta_emis(nys:nyn,nxl:nxr)
 
                 ENDIF  ! IF (spc_names==)
@@ -1375,5 +1396,6 @@
 
                          !> PMs are already in mass units:micrograms:they have to be converted to kilograms 
-                         IF (TRIM(spc_names(match_spec_model(ispec)))=="PM1" .OR. TRIM(spc_names(match_spec_model(ispec)))=="PM25"  &
+                         IF (TRIM(spc_names(match_spec_model(ispec)))=="PM1"         &
+                             .OR.  TRIM(spc_names(match_spec_model(ispec)))=="PM25"  &
                              .OR. TRIM(spc_names(match_spec_model(ispec)))=="PM10") THEN
 
@@ -1389,9 +1411,9 @@
                          !> Other Species: inputs are micromoles: they have to be converted in moles
                          !                 ppm/s *m *kg/m^3                
-                            surf_lsm_h%cssws(match_spec_model(ispec),m) = emiss_factor_main(match_spec_input(ispec))*   &
+                            surf_lsm_h%cssws(match_spec_model(ispec),m) = emiss_factor_main(match_spec_input(ispec))*  &
                          !                                                    micromoles/(m^2*s)
-                                                                          emis_distribution(1,j,i,ispec) *              &
+                                                                          emis_distribution(1,j,i,ispec) *             &
                          !                                                    m**3/Nmole
-                                                                          conv_to_ratio(k,j,i)*                         &       
+                                                                          conv_to_ratio(k,j,i)*                        &
                          !                                                    kg/m^3
                                                                           rho_air(k)   
@@ -1403,5 +1425,6 @@
 
 
-                   ELSEIF ( street_type_f%var(j,i) >= side_street_id  .AND. street_type_f%var(j,i) < main_street_id )  THEN
+                   ELSEIF ( street_type_f%var(j,i) >= side_street_id  .AND.                                            &
+                            street_type_f%var(j,i) < main_street_id )  THEN
 
                    !> Cycle over already matched species
@@ -1409,9 +1432,10 @@
 
                          !> PMs are already in mass units: micrograms
-                         IF (TRIM(spc_names(match_spec_model(ispec)))=="PM1" .OR. TRIM(spc_names(match_spec_model(ispec)))=="PM25"  &
+                         IF (     TRIM(spc_names(match_spec_model(ispec)))=="PM1"   &
+                             .OR. TRIM(spc_names(match_spec_model(ispec)))=="PM25"  &
                              .OR. TRIM(spc_names(match_spec_model(ispec)))=="PM10") THEN
 
                             !              kg/(m^2*s) *kg/m^3                               
-                            surf_lsm_h%cssws(match_spec_model(ispec),m)= emiss_factor_side(match_spec_input(ispec)) *   &
+                            surf_lsm_h%cssws(match_spec_model(ispec),m)= emiss_factor_side(match_spec_input(ispec)) *  &
                             !                                                       kg/(m^2*s)
                                                                                 emis_distribution(1,j,i,ispec)*        &
@@ -1423,9 +1447,9 @@
                          !>Other Species: inputs are micromoles
                          !                 ppm/s *m *kg/m^3                
-                            surf_lsm_h%cssws(match_spec_model(ispec),m) = emiss_factor_side(match_spec_input(ispec)) *   &
+                            surf_lsm_h%cssws(match_spec_model(ispec),m) = emiss_factor_side(match_spec_input(ispec)) * &
                          !                                                    micromoles/(m^2*s)
-                                                                          emis_distribution(1,j,i,ispec) *              &
+                                                                          emis_distribution(1,j,i,ispec) *             &
                          !                                                    m**3/Nmole
-                                                                          conv_to_ratio(k,j,i)*                         &       
+                                                                          conv_to_ratio(k,j,i)*                        &
                          !                                                    kg/m^3
                                                                           rho_air(k)   
@@ -1466,6 +1490,7 @@
 
                    !> PMs
-                   IF (TRIM(spc_names(match_spec_model(ispec)))=="PM1" .OR. TRIM(spc_names(match_spec_model(ispec)))=="PM25"  &
-                          .OR. TRIM(spc_names(match_spec_model(ispec)))=="PM10") THEN
+                   IF (TRIM(spc_names(match_spec_model(ispec)))=="PM1"                                   &
+                         .OR. TRIM(spc_names(match_spec_model(ispec)))=="PM25"                           &
+                         .OR. TRIM(spc_names(match_spec_model(ispec)))=="PM10") THEN
                    
                       !            kg/(m^2*s) *kg/m^3                         kg/(m^2*s)                 
@@ -1522,6 +1547,7 @@
 
                    !> PMs
-                   IF (TRIM(spc_names(match_spec_model(ispec)))=="PM1" .OR. TRIM(spc_names(match_spec_model(ispec)))=="PM25"  &
-                          .OR. TRIM(spc_names(match_spec_model(ispec)))=="PM10") THEN
+                   IF (TRIM(spc_names(match_spec_model(ispec)))=="PM1"                                            &
+                         .OR. TRIM(spc_names(match_spec_model(ispec)))=="PM25"                                    &
+                         .OR. TRIM(spc_names(match_spec_model(ispec)))=="PM10") THEN
 
                       !         kg/(m^2*s) * kg/m^3                           kg/(m^2*s)            
@@ -1573,6 +1599,7 @@
 
                    !> PMs
-                   IF (TRIM(spc_names(match_spec_model(ispec)))=="PM1" .OR. TRIM(spc_names(match_spec_model(ispec)))=="PM25"  &
-                          .OR. TRIM(spc_names(match_spec_model(ispec)))=="PM10") THEN
+                   IF (TRIM(spc_names(match_spec_model(ispec)))=="PM1"                                     &
+                         .OR. TRIM(spc_names(match_spec_model(ispec)))=="PM25"                             &
+                         .OR. TRIM(spc_names(match_spec_model(ispec)))=="PM10") THEN
                    
                       !          kg/(m^2*s) *kg/m^3                             kg/(m^2*s)                     
