Index: /palm/trunk/SOURCE/chemistry_model_mod.f90
===================================================================
--- /palm/trunk/SOURCE/chemistry_model_mod.f90	(revision 4846)
+++ /palm/trunk/SOURCE/chemistry_model_mod.f90	(revision 4847)
@@ -26,9 +26,12 @@
 ! -----------------
 ! $Id$
+! error message IDs changed from CM to the default PA 
+!
+! 4843 2021-01-15 15:22:11Z raasch
 ! local namelist parameter added to switch off the module although the respective module namelist
 ! appears in the namelist file
 !
 ! 4833 2021-01-07 08:57:54Z raasch
-! openmp bugfix for time measurements of non advective processes 
+! openmp bugfix for time measurements of non advective processes
 !
 ! 4828 2021-01-05 11:21:41Z Giersch
@@ -1119,5 +1122,5 @@
              message_string = 'data_output_pr = ' // TRIM( data_output_pr(var_count) ) //          &
                               ' is not implemented for air_chemistry = .FALSE.'
-             CALL message( 'chem_check_parameters', 'CM0433', 1, 2, 0, 6, 0 )
+             CALL message( 'chem_check_data_output_pr', 'PA0293', 1, 2, 0, 6, 0 )
 
           ENDIF
@@ -1129,5 +1132,5 @@
                               ' is currently not implemented. Please output resolved- and '//      &
                               'subgrid-scale fluxes individually to obtain the total flux.'
-                CALL message( 'chem_check_parameters', 'CM0498', 1, 2, 0, 6, 0 )
+                CALL message( 'chem_check_data_output_pr', 'PA0487', 1, 2, 0, 6, 0 )
              ENDIF
           ENDIF
@@ -1228,8 +1231,8 @@
     IF ( chem_gasphase_on )  THEN
        message_string = 'Chemical reactions: ON'
-       CALL message( 'chem_check_parameters', 'CM0421', 0, 0, 0, 6, 0 )
-    ELSEIF ( .NOT. (chem_gasphase_on) )  THEN
+       CALL message( 'chem_check_parameters', 'PA0517', 0, 0, 0, 6, 0 )
+    ELSEIF ( .NOT. ( chem_gasphase_on ) )  THEN
        message_string = 'Chemical reactions: OFF'
-       CALL message( 'chem_check_parameters', 'CM0422', 0, 0, 0, 6, 0 )
+       CALL message( 'chem_check_parameters', 'PA0518', 0, 0, 0, 6, 0 )
     ENDIF
 !
@@ -1237,14 +1240,14 @@
     IF ( call_chem_at_all_substeps )  THEN
        message_string = 'Chemistry is calculated at all meteorology time-step'
-       CALL message( 'chem_check_parameters', 'CM0423', 0, 0, 0, 6, 0 )
-    ELSEIF ( .not. (call_chem_at_all_substeps) )  THEN
+       CALL message( 'chem_check_parameters', 'PA0522', 0, 0, 0, 6, 0 )
+    ELSEIF ( .NOT. ( call_chem_at_all_substeps ) )  THEN
        message_string = 'Sub-time-steps are skipped for chemistry time-steps'
-       CALL message( 'chem_check_parameters', 'CM0424', 0, 0, 0, 6, 0 )
+       CALL message( 'chem_check_parameters', 'PA0523', 0, 0, 0, 6, 0 )
     ENDIF
 !
 !-- Check for photolysis scheme
-    IF ( (photolysis_scheme /= 'simple') .AND. (photolysis_scheme /= 'constant')  )  THEN
+    IF ( ( photolysis_scheme /= 'simple' ) .AND. ( photolysis_scheme /= 'constant' )  )  THEN
        message_string = 'Incorrect photolysis scheme selected, please check spelling'
-       CALL message( 'chem_check_parameters', 'CM0425', 1, 2, 0, 6, 0 )
+       CALL message( 'chem_check_parameters', 'PA0593', 1, 2, 0, 6, 0 )
     ENDIF
 !
@@ -1254,5 +1257,5 @@
        message_string =                                                                            &
        'Incorrect chemistry mechanism selected, check spelling in namelist and/or chem_gasphase_mod'
-       CALL message( 'chem_check_parameters', 'CM0462', 1, 2, 0, 6, 0 )
+       CALL message( 'chem_check_parameters', 'PA0675', 1, 2, 0, 6, 0 )
     ENDIF
 
@@ -1265,5 +1268,5 @@
     ELSE
        message_string = 'unknown boundary condition: bc_cs_b ="' // TRIM( bc_cs_b ) // '"'
-       CALL message( 'chem_boundary_conds', 'CM0429', 1, 2, 0, 6, 0 )
+       CALL message( 'chem_check_parameters', 'PA0730', 1, 2, 0, 6, 0 )
     ENDIF
 !
@@ -1279,5 +1282,5 @@
     ELSE
        message_string = 'unknown boundary condition: bc_c_t ="' // TRIM( bc_cs_t ) // '"'
-       CALL message( 'check_parameters', 'CM0430', 1, 2, 0, 6, 0 )
+       CALL message( 'chem_check_parameters', 'PA0731', 1, 2, 0, 6, 0 )
     ENDIF
 
@@ -1407,5 +1410,5 @@
           message_string = 'Unused/incorrect input for initial surface value: ' //     &
                             TRIM( cs_name(lsp_usr) )
-          CALL message( 'chem_check_parameters', 'CM0427', 1, 2, 0, 6, 0 )
+          CALL message( 'chem_check_parameters', 'PA0732', 1, 2, 0, 6, 0 )
        ENDIF
        lsp_usr = lsp_usr + 1
@@ -1426,5 +1429,5 @@
           message_string = 'Unused/incorrect input of chemical species for surface emission fluxes: '  &
                             // TRIM( surface_csflux_name(lsp_usr) )
-          CALL message( 'chem_check_parameters', 'CM0428', 1, 2, 0, 6, 0 )
+          CALL message( 'chem_check_parameters', 'PA0733', 1, 2, 0, 6, 0 )
        ENDIF
        lsp_usr = lsp_usr + 1
@@ -2342,5 +2345,5 @@
                 IF ( cs_heights(1,1) /= 0.0_wp )  THEN
                    message_string = 'The surface value of cs_heights must be 0.0'
-                   CALL message( 'chem_check_parameters', 'CM0434', 1, 2, 0, 6, 0 )
+                   CALL message( 'chem_check_parameters', 'PA0734', 1, 2, 0, 6, 0 )
                 ENDIF
 
@@ -2355,5 +2358,5 @@
                          IF ( npr_lev == 100 )  THEN
                             message_string = 'number of chem spcs exceeding the limit'
-                            CALL message( 'chem_check_parameters', 'CM0435', 1, 2, 0, 6, 0 )
+                            CALL message( 'chem_check_parameters', 'PA0735', 1, 2, 0, 6, 0 )
                             EXIT
                          ENDIF
@@ -2625,5 +2628,5 @@
                ( mode_emis /= 'PRE-PROCESSED'  ) )  THEN
              message_string = 'Incorrect mode_emiss  option select. Please check spelling'
-             CALL message( 'chem_check_parameters', 'CM0436', 1, 2, 0, 6, 0 )
+             CALL message( 'chem_parin', 'PA0736', 1, 2, 0, 6, 0 )
           ENDIF
        ELSE
@@ -2632,5 +2635,5 @@
                ( emiss_lod /= 2 ) )  THEN
              message_string = 'Invalid value for emiss_lod (0, 1, or 2)'
-             CALL message( 'chem_check_parameters', 'CM0436', 1, 2, 0, 6, 0 )
+             CALL message( 'chem_parin', 'PA0737', 1, 2, 0, 6, 0 )
           ENDIF
        ENDIF
@@ -2640,5 +2643,5 @@
 !    IF ( (mode_emis /= 'PARAMETERIZED')  .AND. ( mode_emis /= 'DEFAULT' ) .AND. ( mode_emis /= 'PRE-PROCESSED'  ) )  THEN
 !       message_string = 'Incorrect mode_emiss  option select. Please check spelling'
-!       CALL message( 'chem_check_parameters', 'CM0436', 1, 2, 0, 6, 0 )
+!       CALL message( 'chem_parin', 'PA0738', 1, 2, 0, 6, 0 )
 !    ENDIF
 
@@ -2661,11 +2664,9 @@
           END SELECT
 
-          message_string = 'Synchronizing mode_emis to defined emiss_lod'               //         &
-                           CHAR( 10 )  //  '                    '                       //         &
-                           'NOTE - mode_emis will be depreciated in future releases'    //         &
-                           CHAR( 10 )  //  '                    '                       //         &
+          message_string = 'Synchronizing mode_emis to defined emiss_lod&'              //         &
+                           'NOTE - mode_emis will be depreciated in future releases&'   //         &
                            'please use emiss_lod to define emission mode'
 
-          CALL message ( 'parin_chem', 'CM0463', 0, 0, 0, 6, 0 )
+          CALL message( 'chem_parin', 'PA0739', 0, 0, 0, 6, 0 )
 
        ELSE ! if emiss_lod is not set
@@ -2680,11 +2681,9 @@
           END SELECT
 
-          message_string = 'emiss_lod undefined.  Using existing mod_emiss setting'     //         &
-                           CHAR( 10 )  //  '                    '                       //         &
-                           'NOTE - mode_emis will be depreciated in future releases'    //         &
-                           CHAR( 10 )  //  '                    '                       //         &
+          message_string = 'emiss_lod undefined.  Using existing mod_emiss setting&'    //         &
+                           'NOTE - mode_emis will be depreciated in future releases&'   //         &
                            'please use emiss_lod to define emission mode'
 
-          CALL message ( 'parin_chem', 'CM0464', 0, 0, 0, 6, 0 )
+          CALL message( 'chem_parin', 'PA0740', 0, 0, 0, 6, 0 )
        ENDIF
 
@@ -2702,9 +2701,8 @@
        IF ( emiss_read_legacy_mode )  THEN       !< notify legacy read mode
 
-          message_string = 'Legacy emission read mode activated'            //                     &
-                           CHAR( 10 )  //  '                    '           //                     &
+          message_string = 'Legacy emission read mode activated&'           //                     &
                            'All emissions data will be loaded '             //                     &
                            'prior to start of simulation'
-          CALL message ( 'parin_chem', 'CM0465', 0, 0, 0, 6, 0 )
+          CALL message( 'chem_parin', 'PA0741', 0, 0, 0, 6, 0 )
 
        ELSE                                     !< if new read mode selected
@@ -2713,8 +2711,7 @@
 
              message_string = 'New emission read mode '                    //                      &
-                              'currently unavailable for LODs 0 and 1.'    //                      &
-                              CHAR( 10 )  //  '                    '       //                      &
+                              'currently unavailable for LODs 0 and 1.&'   //                      &
                               'Reverting to legacy emission read mode'
-             CALL message ( 'parin_chem', 'CM0466', 0, 0, 0, 6, 0 )
+             CALL message( 'chem_parin', 'PA0742', 0, 0, 0, 6, 0 )
 
              emiss_read_legacy_mode = .TRUE.
@@ -2722,9 +2719,8 @@
           ELSE                                  !< notify new read mode
 
-             message_string = 'New emission read mode activated'           //                      &
-                              CHAR( 10 )  //  '                    '       //                      &
+             message_string = 'New emission read mode activated&'          //                      &
                               'LOD 2 emissions will be updated on-demand ' //                      &
                               'according to indicated timestamps'
-             CALL message ( 'parin_chem', 'CM0467', 0, 0, 0, 6, 0 )
+             CALL message( 'chem_parin', 'PA0743', 0, 0, 0, 6, 0 )
 
           ENDIF
@@ -3877,6 +3873,7 @@
           luv_palm = surf_lsm_h(0)%vegetation_type(m)
           IF ( luv_palm == ind_luv_user )  THEN
-             message_string = 'No vegetation type defined. Please define vegetation type to enable deposition calculation'
-             CALL message( 'chem_depo', 'CM0451', 1, 2, 0, 6, 0 )
+             message_string = 'No vegetation type defined. Please define vegetation type to' //    &
+                              ' enable deposition calculation'
+             CALL message( 'chem_depo', 'PA0744', 1, 2, 0, 6, 0 )
           ELSEIF ( luv_palm == ind_luv_b_soil )  THEN
              luv_dep = 9
@@ -3921,6 +3918,7 @@
           lup_palm = surf_lsm_h(0)%pavement_type(m)
           IF ( lup_palm == ind_lup_user )  THEN
-             message_string = 'No pavement type defined. Please define pavement type to enable deposition calculation'
-             CALL message( 'chem_depo', 'CM0452', 1, 2, 0, 6, 0 )
+             message_string = 'No pavement type defined. Please define pavement type to enable' // &
+                              ' deposition calculation'
+             CALL message( 'chem_depo', 'PA0745', 1, 2, 0, 6, 0 )
           ELSEIF ( lup_palm == ind_lup_asph_conc )  THEN
              lup_dep = 9
@@ -3959,6 +3957,7 @@
           luw_palm = surf_lsm_h(0)%water_type(m)
           IF ( luw_palm == ind_luw_user )  THEN
-             message_string = 'No water type defined. Please define water type to enable deposition calculation'
-             CALL message( 'chem_depo', 'CM0453', 1, 2, 0, 6, 0 )
+             message_string = 'No water type defined. Please define water type to enable' //       &
+                              ' deposition calculation'
+             CALL message( 'chem_depo', 'PA0746', 1, 2, 0, 6, 0 )
           ELSEIF ( luw_palm ==  ind_luw_lake )  THEN
              luw_dep = 13
@@ -4457,6 +4456,7 @@
           lug_palm = ind_luv_s_grass
           IF ( lug_palm == ind_luv_user )  THEN
-             message_string = 'No vegetation type defined. Please define vegetation type to enable deposition calculation'
-             CALL message( 'chem_depo', 'CM0454', 1, 2, 0, 6, 0 )
+             message_string = 'No vegetation type defined. Please define vegetation type to' //    &
+                              ' enable deposition calculation'
+             CALL message( 'chem_depo', 'PA0747', 1, 2, 0, 6, 0 )
           ELSEIF ( lug_palm == ind_luv_b_soil )  THEN
              lug_dep = 9
@@ -4504,6 +4504,7 @@
           luu_palm = ind_lup_conc
           IF ( luu_palm == ind_lup_user )  THEN
-             message_string = 'No pavement type defined. Please define pavement type to enable deposition calculation'
-             CALL message( 'chem_depo', 'CM0455', 1, 2, 0, 6, 0 )
+             message_string = 'No pavement type defined. Please define pavement type to enable' // &
+                              ' deposition calculation'
+             CALL message( 'chem_depo', 'PA0748', 1, 2, 0, 6, 0 )
           ELSEIF ( luu_palm == ind_lup_asph_conc )  THEN
              luu_dep = 9
@@ -4545,6 +4546,7 @@
           lud_palm = ind_lup_metal
           IF ( lud_palm == ind_lup_user )  THEN
-             message_string = 'No pavement type defined. Please define pavement type to enable deposition calculation'
-             CALL message( 'chem_depo', 'CM0456', 1, 2, 0, 6, 0 )
+             message_string = 'No pavement type defined. Please define pavement type to enable' // &
+                              ' deposition calculation'
+             CALL message( 'chem_depo', 'PA0749', 1, 2, 0, 6, 0 )
           ELSEIF ( lud_palm == ind_lup_asph_conc )  THEN
              lud_dep = 9
@@ -5303,5 +5305,5 @@
     CASE default
        message_string = 'Component '// TRIM( compnam ) // ' not supported'
-       CALL message( 'rc_special', 'CM0457', 1, 2, 0, 6, 0 )
+       CALL message( 'rc_special', 'PA0750', 1, 2, 0, 6, 0 )
     END SELECT
 
@@ -5356,5 +5358,5 @@
     CASE default
        message_string = 'Component '// TRIM( compnam ) // ' not supported'
-       CALL message( 'rc_gw', 'CM0458', 1, 2, 0, 6, 0 )
+       CALL message( 'rc_gw', 'PA0751', 1, 2, 0, 6, 0 )
     END SELECT
 
@@ -5569,5 +5571,5 @@
     CASE default
        message_string = 'Component '// TRIM( compnam ) // ' not supported'
-       CALL message( 'rc_gstom', 'CM0459', 1, 2, 0, 6, 0 )
+       CALL message( 'rc_gstom', 'PA0752', 1, 2, 0, 6, 0 )
     END SELECT
 
@@ -5925,5 +5927,5 @@
           ELSE
              message_string = 'nwet can only be 0 or 1'
-             CALL message( 'rc_gsoil_eff', 'CM0460', 1, 2, 0, 6, 0 )
+             CALL message( 'rc_gsoil_eff', 'PA0753', 1, 2, 0, 6, 0 )
           ENDIF
        ENDIF
@@ -6101,5 +6103,5 @@
 !       rc_eff = -999.0_wp
 !       message_string = 'This should not be possible, check ccomp_tot'
-!       CALL message( 'rc_comp_point_rc_eff', 'CM0461', 1, 2, 0, 6, 0 )
+!       CALL message( 'rc_comp_point_rc_eff', 'PA0754', 1, 2, 0, 6, 0 )
 !    ENDIF
 !
