Index: palm/trunk/SOURCE/data_output_profiles.f90
===================================================================
--- palm/trunk/SOURCE/data_output_profiles.f90	(revision 198)
+++ palm/trunk/SOURCE/data_output_profiles.f90	(revision 254)
@@ -2,7 +2,8 @@
 
 !------------------------------------------------------------------------------!
-! Actual revisions:
+! Current revisions:
 ! -----------------
-! 
+! Output of messages replaced by message handling routine.
+!
 !
 ! Former revisions:
@@ -290,13 +291,12 @@
                       IF ( cross_normx_factor(k,j) == 0.0  .OR. &
                            cross_normy_factor(k,j) == 0.0 )  THEN
-                         PRINT*,'+++ WARNING data_output_profiles: normalizi', &
-                                'ng cross ',j, ' is not possible since one o', &
-                                'f the'
-                         PRINT*,'                     normalizing factors is ',&
-                                'zero!'
-                         PRINT*,'    cross_normx_factor(',k,',',j,') = ', &
-                                cross_normx_factor(k,j)
-                         PRINT*,'    cross_normy_factor(',k,',',j,') = ', &
-                                cross_normy_factor(k,j)
+                         WRITE( message_string, * ) 'data_output_profiles: normalizi', &
+                                                    'ng cross ',j, ' is not possible since one o', &
+                                                    'f the & normalizing factors is zero! & ', &
+                                                    'cross_normx_factor(',k,',',j,') = ', &
+                                                     cross_normx_factor(k,j), &
+                                                    ' & cross_normy_factor(',k,',',j,') = ', &
+                                                     cross_normy_factor(k,j)
+                         CALL message( 'data_output_profiles', 'PA0185', 0, 1, 0, 6, 0 )
                          cross_normx_factor(k,j) = 1.0
                          cross_normy_factor(k,j) = 1.0
@@ -532,19 +532,20 @@
 
 !
-!--             Check the normalizing factors for zeros and deactivate the 
-!--             normalization, if required.
+!--             Check the normalizing factors for zeros and deactivate
+!--             the normalization, if required.
                 IF ( cross_normx_factor(k,j) == 0.0  .OR. &
                      cross_normy_factor(k,j) == 0.0 )  THEN
-                   PRINT*,'+++ WARNING data_output_profiles: normalizing ',j, &
-                          ' cross is not possible since one of the'
-                   PRINT*,'                     normalizing factors is zero!'
-                   PRINT*,'    cross_normx_factor(',k,',',j,') = ', &
-                           cross_normx_factor(k,j)
-                   PRINT*,'    cross_normy_factor(',k,',',j,') = ', &
-                           cross_normy_factor(k,j)
-                   cross_normx_factor(k,j) = 1.0
-                   cross_normy_factor(k,j) = 1.0
-                   cross_normalized_x(j) = ' '
-                   cross_normalized_y(j) = ' '
+                   WRITE( message_string, * ) 'data_output_profiles: normalizi', &
+                                              'ng cross ',j, ' is not possible since one o', &
+                                              'f the & normalizing factors is zero! & ', &
+                                              'cross_normx_factor(',k,',',j,') = ', &
+                                               cross_normx_factor(k,j), &
+                                              ' & cross_normy_factor(',k,',',j,') = ', &
+                                               cross_normy_factor(k,j)
+                    CALL message( 'data_output_profiles', 'PA0185', 0, 1, 0, 6, 0 )
+                    cross_normx_factor(k,j) = 1.0
+                    cross_normy_factor(k,j) = 1.0
+                    cross_normalized_x(j) = ' '
+                    cross_normalized_y(j) = ' '
                 ENDIF
 
