Index: palm/trunk/TUTORIALS/cases/chem_smog/INPUT/chem_smog_p3d
===================================================================
--- palm/trunk/TUTORIALS/cases/chem_smog/INPUT/chem_smog_p3d	(revision 4409)
+++ palm/trunk/TUTORIALS/cases/chem_smog/INPUT/chem_smog_p3d	(revision 4765)
@@ -20,10 +20,10 @@
 !-- pressure solver
 !--------------------------------------
-    fft_method =  'fftw',
-
-!     psolver = 'multigrid',
-!     cycle_mg  = 'w',
-!     mg_cycles = 2,
-!     mg_switch_to_pe0_level = -1,
+!   fft_method =  'fftw',
+
+      psolver = 'multigrid',
+      cycle_mg  = 'w',
+      mg_cycles = 2,
+      mg_switch_to_pe0_level = -1,
 
 !
@@ -32,5 +32,5 @@
     initializing_actions = 'set_constant_profiles',  ! options: 'set_constant_profiles', or 'inifor', 
                                                      ! or both, e.g. 'inifor set_constant_profiles'
-    constant_flux_layer = .TRUE.,
+    constant_flux_layer = .T.,
 !
 !-- wind speed
@@ -48,5 +48,5 @@
 !-- humidity
 !--------------------------------------
-    humidity   = .TRUE.,
+    humidity   = .T.,
     q_surface  = 0.001,
     bc_q_b     = 'dirichlet',
@@ -62,5 +62,5 @@
      spinup_pt_amplitude = 20.0,
      dt_spinup           = 120.0,           ! time step during spinup
-     data_output_during_spinup = .FALSE.,       ! set .TRUE. if you want output
+     data_output_during_spinup = .F.,       ! set .T. if you want output
 !
 !-- building topology
@@ -87,6 +87,6 @@
 !-- 2d/3d output
 !--------------------------------------
-    do3d_at_begin         = .TRUE.,
-    do2d_at_begin         = .TRUE.,
+    do3d_at_begin         = .T.,
+    do2d_at_begin         = .T.,
     dt_data_output        = 300.0, 
     dt_data_output_av     = 600.0,
@@ -96,5 +96,13 @@
 
      
-    data_output = 'theta', 'q', 'u', 'v', 'w','e', 't_soil', 'm_soil', 'tsurf*_xy', 'shf*_xy', 'qsws*_xy', 'ghf*_xy', 'rad_net*_xy', 'us*_xy', 't*_xy', 'r_a*_xy', 'm_liq*_xy', 'kc_NO2','kc_O3','kc_NO', 'theta_av', 'q_av', 'u_av', 'v_av', 'w_av','e_av', 'tsurf*_xy_av', 'shf*_xy_av', 'qsws*_xy_av', 'ghf*_xy_av', 'kc_NO2_av','kc_O3_av','kc_NO_av', 'kc_RH','kc_RCHO','kc_CO', 'kc_O', 'kc_RO2', 'kc_OH','kc_HO2','kc_HNO3',
+    data_output = 'theta', 'q', 'u', 'v', 'w','e',
+                   't_soil', 'm_soil',
+                   'tsurf*_xy', 'shf*_xy', 'qsws*_xy', 'ghf*_xy',
+                   'rad_net*_xy', 'us*_xy', 't*_xy', 'r_a*_xy', 'm_liq*_xy',
+                   'kc_NO2','kc_O3','kc_NO', 'kc_RH', 'kc_RCHO','kc_CO', 
+                   'kc_OH','kc_HO2','kc_HNO3',
+                   'theta_av', 'q_av', 'u_av', 'v_av', 'w_av','e_av',
+                   'tsurf*_xy_av', 'shf*_xy_av', 'qsws*_xy_av', 'ghf*_xy_av',
+                   'kc_NO2_av','kc_O3_av','kc_NO_av',
 !
 ! Masked output - here for first layer above ground 
@@ -115,5 +123,10 @@
     dt_averaging_input_pr =  600.0,
 
-    data_output_pr = 'e', 'e*', '#u', 'w"u"', 'w*u*', 'wu', 'u*2',  '#v', 'w"v"', 'w*v*', 'wv', 'v*2', 'w',  'w*2', '#theta', 'w"theta"', 'w*theta*','wtheta', 'theta*2', 'kc_NO2','kc_O3','kc_NO',
+    data_output_pr = 'e', 'e*',
+                     '#u', 'w"u"', 'w*u*', 'wu', 'u*2', 
+                     '#v', 'w"v"', 'w*v*', 'wv', 'v*2',
+                     'w',  'w*2',
+                     '#theta', 'w"theta"', 'w*theta*','wtheta', 'theta*2',
+                     'kc_NO2','kc_O3','kc_NO',
  /
 
@@ -127,11 +140,8 @@
 
     albedo_type      = 5,
-    constant_albedo  = .FALSE.,
-
-    surface_reflections = .TRUE.,
+    constant_albedo  = .F.,
+
+    surface_reflections = .T.,
     nrefsteps = 5,
-
-    rad_angular_discretization = .FALSE.,
-    raytrace_mpi_rma = .FALSE.,
 
  / ! end of radiation_parameters namelist
@@ -143,5 +153,4 @@
  &urban_surface_parameters
 
-    usm_material_model = .TRUE.,
  / ! end of urban_surface_parameters namelist
 
@@ -160,7 +169,7 @@
     deep_soil_temperature = 285.,
 
-    aero_resist_kray       = .TRUE.,
-    constant_roughness     = .TRUE.,
-    conserve_water_content = .TRUE.,
+    aero_resist_kray       = .T.,
+    constant_roughness     = .T.,
+    conserve_water_content = .T.,
  / ! end of land_surface_parameters namelist
 
@@ -182,44 +191,47 @@
 
     chem_gasphase_on           = .TRUE.,
-    emissions_anthropogenic    = .TRUE.,
-    emiss_lod                  = 0,          ! 0 "PARAMETERIZED", 1 "DEFAULT", 2 "PRE-PROCESSED",
-    chem_mechanism             = 'smog', 
+    chem_mechanism             = "smog", 
     deposition_dry             = .TRUE.,
     photolysis_scheme          = 'simple',
 
-    surface_csflux_name        = 'NO', 'NO2', 'RH', 'RCHO', 'CO',     !"cs" stands for chemical species, NOT to be used when running
-                                                                           ! with mode_emis = "PRE-PROCESSED" or mode_emis = "DEFAULT"
-    surface_csflux             = 4745.0, 1326.0, 649.0, 30.0, 30000.0,   ! surface emission of NO, NO2 in umol m-2 d-1 (PMs in kg m-2 d-1),
-                                                                           ! NOT to be used when running with mode_emis = "PRE-PROCESSED" or mode_emis = "DEFAULT"
+! initial profiles
+    cs_name                    = 'O3',  'NO',  'NO2',  'RH','RCHO',  'CO',
+    cs_surface                 = 0.025, 0.000, 0.010, 0.010, 0.005, 0.100,  !units- chem spcs in ppm, and PM10 in ug/m**2
+
+    cs_profile(1,:)            = 0.025, 0.040, 0.050, 
+    cs_profile(2,:)            = 0.000, 0.000,
+    cs_profile(3,:)            = 0.010, 0.002,
+    cs_profile(4,:)            = 0.010, 0.005,
+    cs_profile(5,:)            = 0.005, 0.0025,
+    cs_profile(6,:)            = 0.100,
+
+    cs_heights(1,:)            = 0.0,  305.0,  495.0,
+    cs_heights(2,:)            = 0.0,   295.0,
+    cs_heights(3,:)            = 0.0,   295.0,
+    cs_heights(4,:)            = 0.0,   295.0,
+    cs_heights(5,:)            = 0.0,   295.0,
+    cs_heights(6,:)            = 0.0,  
+
+! Emissions
+    emissions_anthropogenic    = .TRUE.,
+    emiss_lod                  = 0,                 ! 0 "PARAMETERIZED", 1 "DEFAULT", 2 "PRE-PROCESSED",
+! Parameters for parameterized traffic emissions
+    surface_csflux_name        = 'NO',   'NO2',   'RH', 'RCHO', 'CO',   !"cs" stands for chemical species, 
+                                                            ! only for parameterized traffic emissions
+                                                            ! NOT to be used when running with emiss_lod>0
+    surface_csflux             = 4745.0, 1326.0, 649., 30., 30000., ! surface emission of NO, NO2 in umol m-2 d-1 (PMs in kg m-2 d-1),only for parameterized traffic emissions
     emiss_factor_main          = 1.667, 1.667, 1.667, 1.667, 1.667,      ! emiss_factor_main*surface_csflux for emission on main streets, one factor per surface_csflux component needed! 
     emiss_factor_side          = 0.334, 0.334, 0.334, 0.334, 0.334,      ! emiss_factor_side*surface_csflux for emission on side streets, one factor per surface_csflux component needed!
-    main_street_id             = 11,                                       ! id is for identifying main/side streets (see chem_emissions in chemistry_model_mod.f90)
+    main_street_id             = 11,                        ! id is for identifying main/side streets (see chem_emissions in chemistry_model_mod.f90)
     side_street_id             =  8,
     max_street_id              = 19,
 
-    cs_name                    = 'O3',  'NO',  'NO2',  'RH', 'RCHO', 'CO',
-    cs_surface                 = 0.020, 0.000, 0.010,   0.010, 0.005, 0.1,       !units- chem spcs in ppm, and PM10 in ug/m**2
-
-    cs_profile(1,:)            =  0.015, 0.018, 0.020, 0.021, 0.022, 0.023, 0.024, 0.025, 0.027, 0.030, 0.050,    !units for gasphas ppm
-    cs_profile(2,:)            =  0.000, 0.000, 0.000, 0.000, 0.000, 0.000, 0.000, 0.000, 0.000, 0.000, 0.000,    !units for gasphas ppm
-    cs_profile(3,:)            =  0.010, 0.008, 0.006, 0.005, 0.004, 0.003, 0.002, 0.002, 0.002, 0.002, 0.002,
-    cs_profile(4,:)            =  0.010, 0.005,
-    cs_profile(5,:)            =  0.005, 0.0025,
-    cs_profile(6,:)            =  0.1,
-
-
-    cs_heights(1,:)            =  0.0,   15.0,   25.0,   45.0,  65.0,  85.0, 105.0, 125.0, 155.0,  185.0, 295.0,
-    cs_heights(2,:)            =  0.0,   15.0,   25.0,   45.0,  65.0,  85.0, 105.0, 125.0, 155.0,  185.0, 295.0,
-    cs_heights(3,:)            =  0.0,   15.0,   25.0,   45.0,  65.0,  85.0, 105.0, 125.0, 155.0,  185.0, 295.0,
-    cs_heights(4,:)            =  0.0,   295.0,
-    cs_heights(5,:)            =  0.0,   295.0,
-    cs_heights(6,:)            =  0.0, 
-
-    bc_cs_b                    = 'neumann',                      !'dirichlet'
+! Bottom and top boundary conditions (lateral BCs are cyclic, which is the default)
+    bc_cs_b                    = 'neumann',
     bc_cs_t                    = 'neumann',
 
-
-    icntrl(3)                  = 1,    !solver ros2
-    icntrl(4)                  = 500,  !max number of chem-substeps
+! Parameters chemistry solver (see KPP description)
+    icntrl(3)                  = 1,    ! solver ros2
+    icntrl(4)                  = 500,  ! max number of chem-substeps
     rcntrl(3)                  = 0.1,  ! Hstart, starting value for the integration step size
 
