Index: palm/trunk/SOURCE/netcdf_interface_mod.f90
===================================================================
--- palm/trunk/SOURCE/netcdf_interface_mod.f90	(revision 3004)
+++ palm/trunk/SOURCE/netcdf_interface_mod.f90	(revision 3045)
@@ -25,4 +25,8 @@
 ! -----------------
 ! $Id$
+! Error messages revised, code adjusted to PALMs coding standards, CASE pt_ext
+! pt_new disabled, comment revised
+! 
+! 3004 2018-04-27 12:33:25Z Giersch
 ! .NOT. found in if-query added to account for variables found in tcm
 ! 
@@ -708,5 +712,5 @@
        IF ( netcdf_deflate < 0  .OR.  netcdf_deflate > 9 )  THEN
           WRITE ( message_string, '(A,I3,A)' ) 'netcdf_deflate out of ' //     &
-                                      'range & given value: ', netcdf_deflate, &
+                                      'range given value: ', netcdf_deflate,   &
                                       ', allowed range: 0-9'
           CALL message( 'netcdf_define_header', 'PA0355', 2, 2, 0, 6, 0 )
@@ -734,6 +738,7 @@
 
 !
-!-- Select the mode to be processed. Possibilities are 3d, mask, xy, xz, yz, 
-!-- pr and ts.
+!-- Select the mode to be processed. Possibilities are 3d, ma (mask), xy, xz, 
+!-- yz, pr (profiles), ps (particle timeseries), fl (flight data), ts 
+!-- (timeseries) or sp (spectra)
     SELECT CASE ( mode )
 
@@ -1185,8 +1190,8 @@
 
           IF ( TRIM( var_list ) /= TRIM( var_list_old ) )  THEN
-             WRITE ( message_string, * ) 'netCDF file for ', TRIM( var ), &
-                  ' data for mask', mid, ' from previous run found,', &
-                  '&but this file cannot be extended due to variable ', &
-                  'mismatch.&New file is created instead.'
+             WRITE ( message_string, * ) 'netCDF file for ', TRIM( var ),       &
+                  ' data for mask', mid, ' from previous run found,',           &
+                  ' but this file cannot be extended due to variable ',         &
+                  'mismatch. New file is created instead.'
              CALL message( 'define_netcdf_header', 'PA0335', 0, 1, 0, 6, 0 )
              extend = .FALSE.
@@ -1206,15 +1211,15 @@
           id_dim_zu_mask(mid,av) = id_dim_zu_mask_old(1)
 
-          nc_stat = NF90_INQUIRE_DIMENSION( id_set_mask(mid,av),    &
-                                            id_dim_zu_mask(mid,av), &
+          nc_stat = NF90_INQUIRE_DIMENSION( id_set_mask(mid,av),               &
+                                            id_dim_zu_mask(mid,av),            &
                                             len = nz_old )
           CALL netcdf_handle_error( 'netcdf_define_header', 510 )
 
           IF ( mask_size(mid,3) /= nz_old )  THEN
-             WRITE ( message_string, * ) 'netCDF file for ', TRIM( var ), &
-                  ' data for mask', mid, ' from previous run found,', &
-                  '&but this file cannot be extended due to mismatch in ', &
-                  ' number of&vertical grid points.', &
-                  '&New file is created instead.'
+             WRITE ( message_string, * ) 'netCDF file for ', TRIM( var ),      &
+                  ' data for mask', mid, ' from previous run found,',          &
+                  ' but this file cannot be extended due to mismatch in ',     &
+                  ' number of vertical grid points.',                          &
+                  ' New file is created instead.'
              CALL message( 'define_netcdf_header', 'PA0336', 0, 1, 0, 6, 0 )
              extend = .FALSE.
@@ -1227,32 +1232,32 @@
 !--       The current time must be larger than the last output time
 !--       on the file.
-          nc_stat = NF90_INQ_VARID( id_set_mask(mid,av), 'time', &
+          nc_stat = NF90_INQ_VARID( id_set_mask(mid,av), 'time',               &
                                     id_var_time_mask(mid,av) )
           CALL netcdf_handle_error( 'netcdf_define_header', 511 )
 
-          nc_stat = NF90_INQUIRE_VARIABLE( id_set_mask(mid,av), &
-                                           id_var_time_mask(mid,av), &
+          nc_stat = NF90_INQUIRE_VARIABLE( id_set_mask(mid,av),                &
+                                           id_var_time_mask(mid,av),           &
                                            dimids = id_dim_time_old )
           CALL netcdf_handle_error( 'netcdf_define_header', 512 )
           id_dim_time_mask(mid,av) = id_dim_time_old(1)
 
-          nc_stat = NF90_INQUIRE_DIMENSION( id_set_mask(mid,av), &
-                                            id_dim_time_mask(mid,av), &
+          nc_stat = NF90_INQUIRE_DIMENSION( id_set_mask(mid,av),               &
+                                            id_dim_time_mask(mid,av),          &
                                             len = domask_time_count(mid,av) )
           CALL netcdf_handle_error( 'netcdf_define_header', 513 )
 
-          nc_stat = NF90_GET_VAR( id_set_mask(mid,av), &
-                                  id_var_time_mask(mid,av), &
-                                  last_time_coordinate,              &
-                                  start = (/ domask_time_count(mid,av) /), &
+          nc_stat = NF90_GET_VAR( id_set_mask(mid,av),                         &
+                                  id_var_time_mask(mid,av),                    &
+                                  last_time_coordinate,                        &
+                                  start = (/ domask_time_count(mid,av) /),     &
                                   count = (/ 1 /) )
           CALL netcdf_handle_error( 'netcdf_define_header', 514 )
 
           IF ( last_time_coordinate(1) >= simulated_time )  THEN
-             WRITE ( message_string, * ) 'netCDF file for ', TRIM( var ), &
-                  ' data for mask', mid, ' from previous run found,', &
-                  '&but this file cannot be extended because the current ', &
-                  'output time&is less or equal than the last output time ', &
-                  'on this file.&New file is created instead.'
+             WRITE ( message_string, * ) 'netCDF file for ', TRIM( var ),      &
+                  ' data for mask', mid, ' from previous run found,',          &
+                  ' but this file cannot be extended because the current ',    &
+                  'output time is less or equal than the last output time ',   &
+                  'on this file. New file is created instead.'
              CALL message( 'define_netcdf_header', 'PA0337', 0, 1, 0, 6, 0 )
              domask_time_count(mid,av) = 0
@@ -1283,18 +1288,18 @@
              time_average_text = ' '
           ELSE
-             WRITE (time_average_text, '('', '',F7.1,'' s average'')') &
+             WRITE (time_average_text, '('', '',F7.1,'' s average'')')         &
                                                             averaging_interval
           ENDIF
           nc_stat = NF90_REDEF( id_set_mask(mid,av) )
           CALL netcdf_handle_error( 'netcdf_define_header', 516 )
-          nc_stat = NF90_PUT_ATT( id_set_mask(mid,av), NF90_GLOBAL, 'title', &
-                                  TRIM( run_description_header ) //    &
+          nc_stat = NF90_PUT_ATT( id_set_mask(mid,av), NF90_GLOBAL, 'title',   &
+                                  TRIM( run_description_header ) //            &
                                   TRIM( time_average_text ) )
           CALL netcdf_handle_error( 'netcdf_define_header', 517 )
           nc_stat = NF90_ENDDEF( id_set_mask(mid,av) )
           CALL netcdf_handle_error( 'netcdf_define_header', 518 )
-          WRITE ( message_string, * ) 'netCDF file for ', TRIM( var ), &
-               ' data for mask', mid, ' from previous run found.', &
-               '&This file will be extended.'
+          WRITE ( message_string, * ) 'netCDF file for ', TRIM( var ),         &
+               ' data for mask', mid, ' from previous run found.',             &
+               ' This file will be extended.'
           CALL message( 'define_netcdf_header', 'PA0338', 0, 0, 0, 6, 0 )
 !
@@ -1307,5 +1312,5 @@
 !
 !--       Define some global attributes of the dataset
-          nc_stat = NF90_PUT_ATT( id_set_3d(av), NF90_GLOBAL, 'Conventions', &
+          nc_stat = NF90_PUT_ATT( id_set_3d(av), NF90_GLOBAL, 'Conventions',   &
                                   'COARDS' )
           CALL netcdf_handle_error( 'netcdf_define_header', 62 )
@@ -1756,7 +1761,7 @@
              message_string = 'netCDF file for volume data ' //             &
                               TRIM( var ) // ' from previous run found,' // &
-                              '&but this file cannot be extended due to' // &
+                              ' but this file cannot be extended due to' // &
                               ' variable mismatch.' //                      &
-                              '&New file is created instead.'
+                              ' New file is created instead.'
              CALL message( 'define_netcdf_header', 'PA0245', 0, 1, 0, 6, 0 )
              extend = .FALSE.
@@ -1781,8 +1786,8 @@
               message_string = 'netCDF file for volume data ' //             &
                                TRIM( var ) // ' from previous run found,' // &
-                               '&but this file cannot be extended due to' // &
+                               ' but this file cannot be extended due to' // &
                                ' mismatch in number of' //                   &
-                               '&vertical grid points (nz_do3d).' //         &
-                               '&New file is created instead.'
+                               ' vertical grid points (nz_do3d).' //         &
+                               ' New file is created instead.'
              CALL message( 'define_netcdf_header', 'PA0246', 0, 1, 0, 6, 0 )
              extend = .FALSE.
@@ -1822,11 +1827,11 @@
 
           IF ( last_time_coordinate(1) >= simulated_time )  THEN
-             message_string = 'netCDF file for volume data ' // &
+             message_string = 'netCDF file for volume data ' //             &
                               TRIM( var ) // ' from previous run found,' // &
-                              '&but this file cannot be extended becaus' // &
+                              ' but this file cannot be extended becaus' // &
                               'e the current output time' //                &
-                              '&is less or equal than the last output t' // &
+                              ' is less or equal than the last output t' // &
                               'ime on this file.' //                        &
-                              '&New file is created instead.'
+                              ' New file is created instead.'
              CALL message( 'define_netcdf_header', 'PA0247', 0, 1, 0, 6, 0 )
              do3d_time_count(av) = 0
@@ -1842,9 +1847,9 @@
                 message_string = 'netCDF file for volume data ' // &
                                  TRIM( var ) // ' from previous run found,' // &
-                                 '&but this file cannot be extended becaus' // &
-                                 'e the number of output time levels&has b' // &
+                                 ' but this file cannot be extended becaus' // &
+                                 'e the number of output time levels has b' // &
                                  'een increased compared to the previous s' // &
                                  'imulation.' //                               &
-                                 '&New file is created instead.'
+                                 ' New file is created instead.'
                 CALL message( 'define_netcdf_header', 'PA0388', 0, 1, 0, 6, 0 )
                 do3d_time_count(av) = 0
@@ -1912,5 +1917,5 @@
           message_string = 'netCDF file for volume data ' //             &
                            TRIM( var ) // ' from previous run found.' // &
-                           '&This file will be extended.'
+                           ' This file will be extended.'
           CALL message( 'define_netcdf_header', 'PA0248', 0, 0, 0, 6, 0 )
 
@@ -2470,7 +2475,7 @@
              message_string = 'netCDF file for cross-sections ' //           &
                               TRIM( var ) // ' from previous run found,' //  &
-                              '& but this file cannot be extended due to' // &
+                              ' but this file cannot be extended due to' //  &
                               ' variable mismatch.' //                       &
-                              '&New file is created instead.'
+                              ' New file is created instead.'
              CALL message( 'define_netcdf_header', 'PA0249', 0, 1, 0, 6, 0 )
              extend = .FALSE.
@@ -2503,8 +2508,8 @@
              message_string = 'netCDF file for cross-sections ' //          &
                               TRIM( var ) // ' from previous run found,' // &
-                              '&but this file cannot be extended due to' // &
+                              ' but this file cannot be extended due to' // &
                               ' mismatch in number of' //                   &
-                              '&cross sections.' //                         &
-                              '&New file is created instead.'
+                              ' cross sections.' //                         &
+                              ' New file is created instead.'
              CALL message( 'define_netcdf_header', 'PA0250', 0, 1, 0, 6, 0 )
              extend = .FALSE.
@@ -2522,11 +2527,11 @@
              IF ( section(i,1) /= -1 )  THEN
                 IF ( zu(section(i,1)) /= netcdf_data(i) )  THEN
-                   message_string = 'netCDF file for cross-sections ' //     &
-                               TRIM( var ) // ' from previous run found,' // &
-                               '&but this file cannot be extended' //        &
-                               ' due to mismatch in cross' //                &
-                               '&section levels.' //                         &
-                               '&New file is created instead.'
-                   CALL message( 'define_netcdf_header', 'PA0251', &
+                   message_string = 'netCDF file for cross-sections ' //       &
+                               TRIM( var ) // ' from previous run found,' //   &
+                               ' but this file cannot be extended' //          &
+                               ' due to mismatch in cross' //                  &
+                               ' section levels.' //                           &
+                               ' New file is created instead.'
+                   CALL message( 'define_netcdf_header', 'PA0251',             &
                                                                  0, 1, 0, 6, 0 )
                    extend = .FALSE.
@@ -2535,11 +2540,11 @@
              ELSE
                 IF ( -1.0_wp /= netcdf_data(i) )  THEN
-                   message_string = 'netCDF file for cross-sections ' //     &
-                               TRIM( var ) // ' from previous run found,' // &
-                               '&but this file cannot be extended' //        &
-                               ' due to mismatch in cross' //                &
-                               '&section levels.' //                         &
-                               '&New file is created instead.'
-                   CALL message( 'define_netcdf_header', 'PA0251',&
+                   message_string = 'netCDF file for cross-sections ' //       &
+                               TRIM( var ) // ' from previous run found,' //   &
+                               ' but this file cannot be extended' //          &
+                               ' due to mismatch in cross' //                  &
+                               ' section levels.' //                           &
+                               ' New file is created instead.'
+                   CALL message( 'define_netcdf_header', 'PA0251',             &
                                                                  0, 1, 0, 6, 0 )
                    extend = .FALSE.
@@ -2575,18 +2580,18 @@
           IF ( netcdf_data_format < 5 ) do2d_xy_time_count(av) = ntime_count
 
-          nc_stat = NF90_GET_VAR( id_set_xy(av), id_var_time_xy(av),    &
-                                  last_time_coordinate,                 &
-                                  start = (/ do2d_xy_time_count(av) /), &
+          nc_stat = NF90_GET_VAR( id_set_xy(av), id_var_time_xy(av),           &
+                                  last_time_coordinate,                        &
+                                  start = (/ do2d_xy_time_count(av) /),        &
                                   count = (/ 1 /) )
           CALL netcdf_handle_error( 'netcdf_define_header', 137 )
 
           IF ( last_time_coordinate(1) >= simulated_time )  THEN
-             message_string = 'netCDF file for cross sections ' //          &
-                              TRIM( var ) // ' from previous run found,' // &
-                              '&but this file cannot be extended becaus' // &
-                              'e the current output time' //                &
-                              '&is less or equal than the last output t' // &
-                              'ime on this file.' //                        &
-                              '&New file is created instead.'
+             message_string = 'netCDF file for cross sections ' //             &
+                              TRIM( var ) // ' from previous run found,' //    &
+                              ' but this file cannot be extended becaus' //    &
+                              'e the current output time' //                   &
+                              ' is less or equal than the last output t' //    &
+                              'ime on this file.' //                           &
+                              ' New file is created instead.'
              CALL message( 'define_netcdf_header', 'PA0252', 0, 1, 0, 6, 0 )
              do2d_xy_time_count(av) = 0
@@ -2602,9 +2607,9 @@
                 message_string = 'netCDF file for cross sections ' //          &
                                  TRIM( var ) // ' from previous run found,' // &
-                                 '&but this file cannot be extended becaus' // &
-                                 'e the number of output time levels&has b' // &
+                                 ' but this file cannot be extended becaus' // &
+                                 'e the number of output time levels has b' // &
                                  'een increased compared to the previous s' // &
                                  'imulation.' //                               &
-                                 '&New file is created instead.'
+                                 ' New file is created instead.'
                 CALL message( 'define_netcdf_header', 'PA0389', 0, 1, 0, 6, 0 )
                 do2d_xy_time_count(av) = 0
@@ -2666,13 +2671,13 @@
           nc_stat = NF90_REDEF( id_set_xy(av) )
           CALL netcdf_handle_error( 'netcdf_define_header', 431 )
-          nc_stat = NF90_PUT_ATT( id_set_xy(av), NF90_GLOBAL, 'title', &
-                                  TRIM( run_description_header ) //    &
+          nc_stat = NF90_PUT_ATT( id_set_xy(av), NF90_GLOBAL, 'title',         &
+                                  TRIM( run_description_header ) //            &
                                   TRIM( time_average_text ) )
           CALL netcdf_handle_error( 'netcdf_define_header', 139 )
           nc_stat = NF90_ENDDEF( id_set_xy(av) )
           CALL netcdf_handle_error( 'netcdf_define_header', 432 )
-          message_string = 'netCDF file for cross-sections ' //           &
-                            TRIM( var ) // ' from previous run found.' // &
-                           '&This file will be extended.'
+          message_string = 'netCDF file for cross-sections ' //                &
+                            TRIM( var ) // ' from previous run found.' //      &
+                           ' This file will be extended.'
           CALL message( 'define_netcdf_header', 'PA0253', 0, 0, 0, 6, 0 )
           
@@ -2682,5 +2687,5 @@
 !
 !--       Define some global attributes of the dataset
-          nc_stat = NF90_PUT_ATT( id_set_xz(av), NF90_GLOBAL, 'Conventions', &
+          nc_stat = NF90_PUT_ATT( id_set_xz(av), NF90_GLOBAL, 'Conventions',   &
                                   'COARDS' )
           CALL netcdf_handle_error( 'netcdf_define_header', 140 )
@@ -2689,9 +2694,9 @@
              time_average_text = ' '
           ELSE
-             WRITE (time_average_text, '('', '',F7.1,'' s average'')') &
+             WRITE (time_average_text, '('', '',F7.1,'' s average'')')         &
                                                             averaging_interval
           ENDIF
-          nc_stat = NF90_PUT_ATT( id_set_xz(av), NF90_GLOBAL, 'title', &
-                                  TRIM( run_description_header )  //   &
+          nc_stat = NF90_PUT_ATT( id_set_xz(av), NF90_GLOBAL, 'title',         &
+                                  TRIM( run_description_header )  //           &
                                   TRIM( time_average_text ) )
           CALL netcdf_handle_error( 'netcdf_define_header', 141 )
@@ -2879,7 +2884,7 @@
 
                       IF ( .NOT. found )  THEN
-                         WRITE ( message_string, * ) 'no grid defined for', &
+                         WRITE ( message_string, * ) 'no grid defined for',    &
                                                 ' variable ', TRIM( do2d(av,i) )
-                         CALL message( 'define_netcdf_header', 'PA0244', &
+                         CALL message( 'define_netcdf_header', 'PA0244',       &
                                        0, 1, 0, 6, 0 )
                       ENDIF
@@ -3113,7 +3118,7 @@
              message_string = 'netCDF file for cross-sections ' //           &
                               TRIM( var ) // ' from previous run found,' //  &
-                              '& but this file cannot be extended due to' // &
+                              ' but this file cannot be extended due to' //  &
                               ' variable mismatch.' //                       &
-                              '&New file is created instead.'
+                              ' New file is created instead.'
              CALL message( 'define_netcdf_header', 'PA0249', 0, 1, 0, 6, 0 )
              extend = .FALSE.
@@ -3146,8 +3151,8 @@
              message_string = 'netCDF file for cross-sections ' //          &
                               TRIM( var ) // ' from previous run found,' // &
-                              '&but this file cannot be extended due to' // &
+                              ' but this file cannot be extended due to' // &
                               ' mismatch in number of' //                   & 
-                              '&cross sections.' //                         &
-                              '&New file is created instead.'
+                              ' cross sections.' //                         &
+                              ' New file is created instead.'
              CALL message( 'define_netcdf_header', 'PA0250', 0, 1, 0, 6, 0 )
              extend = .FALSE.
@@ -3165,11 +3170,11 @@
              IF ( section(i,2) /= -1 )  THEN
                 IF ( ( ( section(i,2) + 0.5 ) * dy ) /= netcdf_data(i) )  THEN
-                   message_string = 'netCDF file for cross-sections ' //     &
-                               TRIM( var ) // ' from previous run found,' // &
-                               '&but this file cannot be extended' //        &
-                               ' due to mismatch in cross' //                &
-                               '&section levels.' //                         &
-                                '&New file is created instead.'
-                   CALL message( 'define_netcdf_header', 'PA0251', &
+                   message_string = 'netCDF file for cross-sections ' //       &
+                               TRIM( var ) // ' from previous run found,' //   &
+                               ' but this file cannot be extended' //          &
+                               ' due to mismatch in cross' //                  &
+                               ' section levels.' //                           &
+                               ' New file is created instead.'
+                   CALL message( 'define_netcdf_header', 'PA0251',             &
                                                                  0, 1, 0, 6, 0 )
                    extend = .FALSE.
@@ -3178,11 +3183,11 @@
              ELSE
                 IF ( -1.0_wp /= netcdf_data(i) )  THEN
-                   message_string = 'netCDF file for cross-sections ' //     &
-                               TRIM( var ) // ' from previous run found,' // &
-                               '&but this file cannot be extended' //        &
-                               ' due to mismatch in cross' //                &
-                               '&section levels.' //                         &
-                               '&New file is created instead.'
-                   CALL message( 'define_netcdf_header', 'PA0251', &
+                   message_string = 'netCDF file for cross-sections ' //       &
+                               TRIM( var ) // ' from previous run found,' //   &
+                               ' but this file cannot be extended' //          &
+                               ' due to mismatch in cross' //                  &
+                               ' section levels.' //                           &
+                               ' New file is created instead.'
+                   CALL message( 'define_netcdf_header', 'PA0251',             &
                                                                  0, 1, 0, 6, 0 )
                    extend = .FALSE.
@@ -3218,18 +3223,18 @@
           IF ( netcdf_data_format < 5 ) do2d_xz_time_count(av) = ntime_count
 
-          nc_stat = NF90_GET_VAR( id_set_xz(av), id_var_time_xz(av),    &
-                                  last_time_coordinate,                 &
-                                  start = (/ do2d_xz_time_count(av) /), &
+          nc_stat = NF90_GET_VAR( id_set_xz(av), id_var_time_xz(av),           &
+                                  last_time_coordinate,                        &
+                                  start = (/ do2d_xz_time_count(av) /),        &
                                   count = (/ 1 /) )
           CALL netcdf_handle_error( 'netcdf_define_header', 176 )
 
           IF ( last_time_coordinate(1) >= simulated_time )  THEN
-             message_string = 'netCDF file for cross sections ' //          &
-                              TRIM( var ) // ' from previous run found,' // &
-                              '&but this file cannot be extended becaus' // &
-                              'e the current output time' //                &
-                              '&is less or equal than the last output t' // &
-                              'ime on this file.' //                        &
-                              '&New file is created instead.'
+             message_string = 'netCDF file for cross sections ' //             &
+                              TRIM( var ) // ' from previous run found,' //    &
+                              ' but this file cannot be extended becaus' //    &
+                              'e the current output time' //                   &
+                              ' is less or equal than the last output t' //    &
+                              'ime on this file.' //                           &
+                              ' New file is created instead.'
              CALL message( 'define_netcdf_header', 'PA0252', 0, 1, 0, 6, 0 )
              do2d_xz_time_count(av) = 0
@@ -3245,9 +3250,9 @@
                 message_string = 'netCDF file for cross sections ' // &
                                  TRIM( var ) // ' from previous run found,' // &
-                                 '&but this file cannot be extended becaus' // &
-                                 'e the number of output time levels&has b' // &
+                                 ' but this file cannot be extended becaus' // &
+                                 'e the number of output time levels has b' // &
                                  'een increased compared to the previous s' // &
                                  'imulation.' //                               &
-                                 '&New file is created instead.'
+                                 ' New file is created instead.'
                 CALL message( 'define_netcdf_header', 'PA0390', 0, 1, 0, 6, 0 )
                 do2d_xz_time_count(av) = 0
@@ -3325,13 +3330,13 @@
           nc_stat = NF90_REDEF( id_set_xz(av) )
           CALL netcdf_handle_error( 'netcdf_define_header', 433 )
-          nc_stat = NF90_PUT_ATT( id_set_xz(av), NF90_GLOBAL, 'title', &
-                                  TRIM( run_description_header ) //    &
+          nc_stat = NF90_PUT_ATT( id_set_xz(av), NF90_GLOBAL, 'title',         &
+                                  TRIM( run_description_header ) //            &
                                   TRIM( time_average_text ) )
           CALL netcdf_handle_error( 'netcdf_define_header', 178 )
           nc_stat = NF90_ENDDEF( id_set_xz(av) )
           CALL netcdf_handle_error( 'netcdf_define_header', 434 )
-          message_string = 'netCDF file for cross-sections ' //           &
-                            TRIM( var ) // ' from previous run found.' // &
-                           '&This file will be extended.'
+          message_string = 'netCDF file for cross-sections ' //                &
+                            TRIM( var ) // ' from previous run found.' //      &
+                           ' This file will be extended.'
           CALL message( 'define_netcdf_header', 'PA0253', 0, 0, 0, 6, 0 )
 
@@ -3341,5 +3346,5 @@
 !
 !--       Define some global attributes of the dataset
-          nc_stat = NF90_PUT_ATT( id_set_yz(av), NF90_GLOBAL, 'Conventions', &
+          nc_stat = NF90_PUT_ATT( id_set_yz(av), NF90_GLOBAL, 'Conventions',   &
                                   'COARDS' )
           CALL netcdf_handle_error( 'netcdf_define_header', 179 )
@@ -3348,14 +3353,14 @@
              time_average_text = ' '
           ELSE
-             WRITE (time_average_text, '('', '',F7.1,'' s average'')') &
+             WRITE (time_average_text, '('', '',F7.1,'' s average'')')         &
                                                             averaging_interval
           ENDIF
-          nc_stat = NF90_PUT_ATT( id_set_yz(av), NF90_GLOBAL, 'title', &
-                                  TRIM( run_description_header ) //    &
+          nc_stat = NF90_PUT_ATT( id_set_yz(av), NF90_GLOBAL, 'title',         &
+                                  TRIM( run_description_header ) //            &
                                   TRIM( time_average_text ) )
           CALL netcdf_handle_error( 'netcdf_define_header', 180 )
           IF ( av == 1 )  THEN
              WRITE ( time_average_text,'(F7.1,'' s avg'')' )  averaging_interval
-             nc_stat = NF90_PUT_ATT( id_set_yz(av), NF90_GLOBAL, 'time_avg', &
+             nc_stat = NF90_PUT_ATT( id_set_yz(av), NF90_GLOBAL, 'time_avg',   &
                                      TRIM( time_average_text ) )
              CALL netcdf_handle_error( 'netcdf_define_header', 180 )
@@ -3759,7 +3764,7 @@
              message_string = 'netCDF file for cross-sections ' //           &
                               TRIM( var ) // ' from previous run found,' //  &
-                              '& but this file cannot be extended due to' // &
+                              ' but this file cannot be extended due to' //  &
                               ' variable mismatch.' //                       & 
-                              '&New file is created instead.'
+                              ' New file is created instead.'
              CALL message( 'define_netcdf_header', 'PA0249', 0, 1, 0, 6, 0 )
              extend = .FALSE.
@@ -3792,8 +3797,8 @@
              message_string = 'netCDF file for cross-sections ' //          &
                               TRIM( var ) // ' from previous run found,' // &
-                              '&but this file cannot be extended due to' // &
+                              ' but this file cannot be extended due to' // &
                               ' mismatch in number of' //                   &
-                              '&cross sections.' //                         &
-                              '&New file is created instead.'
+                              ' cross sections.' //                         &
+                              ' New file is created instead.'
              CALL message( 'define_netcdf_header', 'PA0250', 0, 1, 0, 6, 0 )
              extend = .FALSE.
@@ -3811,11 +3816,11 @@
              IF ( section(i,3) /= -1 )  THEN
                 IF ( ( ( section(i,3) + 0.5 ) * dx ) /= netcdf_data(i) )  THEN
-                   message_string = 'netCDF file for cross-sections ' //    &
-                              TRIM( var ) // ' from previous run found,' // &
-                              '&but this file cannot be extended' //        &
-                              ' due to mismatch in cross' //                &
-                              '&section levels.' //                         &
-                             '&New file is created instead.'
-                   CALL message( 'define_netcdf_header', 'PA0251', &
+                   message_string = 'netCDF file for cross-sections ' //       &
+                              TRIM( var ) // ' from previous run found,' //    &
+                              ' but this file cannot be extended' //           &
+                              ' due to mismatch in cross' //                   &
+                              ' section levels.' //                            &
+                              ' New file is created instead.'
+                   CALL message( 'define_netcdf_header', 'PA0251',             &
                                                                  0, 1, 0, 6, 0 )
                    extend = .FALSE.
@@ -3824,11 +3829,11 @@
              ELSE
                 IF ( -1.0_wp /= netcdf_data(i) )  THEN
-                   message_string = 'netCDF file for cross-sections ' //    &
-                              TRIM( var ) // ' from previous run found,' // &
-                              '&but this file cannot be extended' //        &
-                              ' due to mismatch in cross' //                &
-                              '&section levels.' //                         &
-                              '&New file is created instead.'
-                   CALL message( 'define_netcdf_header', 'PA0251', &
+                   message_string = 'netCDF file for cross-sections ' //       &
+                              TRIM( var ) // ' from previous run found,' //    &
+                              ' but this file cannot be extended' //           &
+                              ' due to mismatch in cross' //                   &
+                              ' section levels.' //                            &
+                              ' New file is created instead.'
+                   CALL message( 'define_netcdf_header', 'PA0251',             &
                                                                  0, 1, 0, 6, 0 )
                    extend = .FALSE.
@@ -3864,18 +3869,18 @@
           IF ( netcdf_data_format < 5 ) do2d_yz_time_count(av) = ntime_count
 
-          nc_stat = NF90_GET_VAR( id_set_yz(av), id_var_time_yz(av),    &
-                                  last_time_coordinate,                 &
-                                  start = (/ do2d_yz_time_count(av) /), &
+          nc_stat = NF90_GET_VAR( id_set_yz(av), id_var_time_yz(av),           &
+                                  last_time_coordinate,                        &
+                                  start = (/ do2d_yz_time_count(av) /),        &
                                   count = (/ 1 /) )
           CALL netcdf_handle_error( 'netcdf_define_header', 215 )
 
           IF ( last_time_coordinate(1) >= simulated_time )  THEN
-             message_string = 'netCDF file for cross sections ' //          &
-                              TRIM( var ) // ' from previous run found,' // &
-                              '&but this file cannot be extended becaus' // &
-                              'e the current output time' //                &
-                              '&is less or equal than the last output t' // &
-                              'ime on this file.' //                        &
-                              '&New file is created instead.'
+             message_string = 'netCDF file for cross sections ' //             &
+                              TRIM( var ) // ' from previous run found,' //    &
+                              ' but this file cannot be extended becaus' //    &
+                              'e the current output time' //                   &
+                              ' is less or equal than the last output t' //    &
+                              'ime on this file.' //                           &
+                              ' New file is created instead.'
              CALL message( 'define_netcdf_header', 'PA0252', 0, 1, 0, 6, 0 )
              do2d_yz_time_count(av) = 0
@@ -3891,9 +3896,9 @@
                 message_string = 'netCDF file for cross sections ' //          &
                                  TRIM( var ) // ' from previous run found,' // &
-                                 '&but this file cannot be extended becaus' // &
-                                 'e the number of output time levels&has b' // &
+                                 ' but this file cannot be extended becaus' // &
+                                 'e the number of output time levels has b' // &
                                  'een increased compared to the previous s' // &
                                  'imulation.' //                               &
-                                 '&New file is created instead.'
+                                 ' New file is created instead.'
                 CALL message( 'define_netcdf_header', 'PA0391', 0, 1, 0, 6, 0 )
                 do2d_yz_time_count(av) = 0
@@ -3971,13 +3976,13 @@
           nc_stat = NF90_REDEF( id_set_yz(av) )
           CALL netcdf_handle_error( 'netcdf_define_header', 435 )
-          nc_stat = NF90_PUT_ATT( id_set_yz(av), NF90_GLOBAL, 'title', &
-                                  TRIM( run_description_header ) //    &
+          nc_stat = NF90_PUT_ATT( id_set_yz(av), NF90_GLOBAL, 'title',         &
+                                  TRIM( run_description_header ) //            &
                                   TRIM( time_average_text ) )
           CALL netcdf_handle_error( 'netcdf_define_header', 217 )
           nc_stat = NF90_ENDDEF( id_set_yz(av) )
           CALL netcdf_handle_error( 'netcdf_define_header', 436 )
-          message_string = 'netCDF file for cross-sections ' //           &
-                            TRIM( var ) // ' from previous run found.' // &
-                           '&This file will be extended.'
+          message_string = 'netCDF file for cross-sections ' //                &
+                            TRIM( var ) // ' from previous run found.' //      &
+                           ' This file will be extended.'
           CALL message( 'define_netcdf_header', 'PA0253', 0, 0, 0, 6, 0 )
 
@@ -3988,16 +3993,16 @@
 !--       Define some global attributes of the dataset
           IF ( averaging_interval_pr /= 0.0_wp )  THEN
-             WRITE (time_average_text,'('', '',F7.1,'' s average'')') &
+             WRITE (time_average_text,'('', '',F7.1,'' s average'')')          &
                                                             averaging_interval_pr
-             nc_stat = NF90_PUT_ATT( id_set_pr, NF90_GLOBAL, 'title',   &
-                                     TRIM( run_description_header ) //  &
+             nc_stat = NF90_PUT_ATT( id_set_pr, NF90_GLOBAL, 'title',          &
+                                     TRIM( run_description_header ) //         &
                                      TRIM( time_average_text ) )
              CALL netcdf_handle_error( 'netcdf_define_header', 218 )
 
              WRITE ( time_average_text,'(F7.1,'' s avg'')' ) averaging_interval_pr
-             nc_stat = NF90_PUT_ATT( id_set_pr, NF90_GLOBAL, 'time_avg', &
+             nc_stat = NF90_PUT_ATT( id_set_pr, NF90_GLOBAL, 'time_avg',       &
                                      TRIM( time_average_text ) )
           ELSE
-             nc_stat = NF90_PUT_ATT( id_set_pr, NF90_GLOBAL, 'title', &
+             nc_stat = NF90_PUT_ATT( id_set_pr, NF90_GLOBAL, 'title',          &
                                      TRIM( run_description_header ) )
           ENDIF
@@ -4092,5 +4097,5 @@
              DO  j = 1, cross_profiles_count
 
-                IF ( TRIM(cross_profiles_char(j)) == TRIM(data_output_pr(i))) &
+                IF ( TRIM(cross_profiles_char(j)) == TRIM(data_output_pr(i)))  &
                 THEN
                    EXIT
@@ -4101,7 +4106,7 @@
                    cross_profiles_count = cross_profiles_count + 1
                    cross_profiles_maxi  = cross_profiles_maxi  + 1
-                   cross_profiles_char(MIN( crmax, cross_profiles_count )) =  &
+                   cross_profiles_char(MIN( crmax, cross_profiles_count )) =   &
                                                       TRIM( data_output_pr(i) )
-                   cross_profiles_numb(MIN( crmax, cross_profiles_count )) =  &
+                   cross_profiles_numb(MIN( crmax, cross_profiles_count )) =   &
                                                       cross_profiles_maxi
                 ENDIF
@@ -4111,7 +4116,7 @@
 
           IF ( cross_profiles_count >= crmax )  THEN
-             message_string = 'It is not allowed to arrange more than '     &
-                              // '100 profiles with & cross_profiles. Apart'&
-                              // ' from that, all profiles are saved & to ' &
+             message_string = 'It is not allowed to arrange more than '        &
+                              // '100 profiles with cross_profiles. Apart'     &
+                              // ' from that, all profiles are saved to '      &
                               // 'the netCDF file.'
              CALL message( 'define_netcdf_header', 'PA0354', 0, 0, 0, 6, 0 )
@@ -4285,9 +4290,9 @@
 
           IF ( TRIM( var_list ) /= TRIM( var_list_old ) )  THEN
-             message_string = 'netCDF file for vertical profiles ' //        &
-                              'from previous run found,' //                  &
-                              '& but this file cannot be extended due to' // &
-                              ' variable mismatch.' //                       &
-                              '&New file is created instead.'
+             message_string = 'netCDF file for vertical profiles ' //          &
+                              'from previous run found,' //                    &
+                              ' but this file cannot be extended due to' //    &
+                              ' variable mismatch.' //                         &
+                              ' New file is created instead.'
              CALL message( 'define_netcdf_header', 'PA0254', 0, 1, 0, 6, 0 )
              extend = .FALSE.
@@ -4319,11 +4324,11 @@
 
           IF ( last_time_coordinate(1) >= simulated_time )  THEN
-             message_string = 'netCDF file for vertical profiles ' //       &
-                              'from previous run found,' //                 &
-                              '&but this file cannot be extended becaus' // &
-                              'e the current output time' //                &
-                              '&is less or equal than the last output t' // &
-                              'ime on this file.' //                        &
-                              '&New file is created instead.'
+             message_string = 'netCDF file for vertical profiles ' //          &
+                              'from previous run found,' //                    &
+                              ' but this file cannot be extended becaus' //    &
+                              'e the current output time' //                   &
+                              ' is less or equal than the last output t' //    &
+                              'ime on this file.' //                           &
+                              ' New file is created instead.'
              CALL message( 'define_netcdf_header', 'PA0255', 0, 1, 0, 6, 0 )
              dopr_time_count = 0
@@ -4339,5 +4344,5 @@
  
              IF ( statistic_regions == 0 )  THEN
-                nc_stat = NF90_INQ_VARID( id_set_pr, data_output_pr(i), &
+                nc_stat = NF90_INQ_VARID( id_set_pr, data_output_pr(i),        &
                                           id_var_dopr(i,0) )
                 CALL netcdf_handle_error( 'netcdf_define_header', 245 )
@@ -4346,5 +4351,5 @@
                    WRITE ( suffix, '(''_'',I2.2)' )  j
                    netcdf_var_name = TRIM( data_output_pr(i) ) // suffix
-                   nc_stat = NF90_INQ_VARID( id_set_pr, netcdf_var_name, &
+                   nc_stat = NF90_INQ_VARID( id_set_pr, netcdf_var_name,       &
                                              id_var_dopr(i,j) )
                    CALL netcdf_handle_error( 'netcdf_define_header', 246 )
@@ -4378,6 +4383,6 @@
           nc_stat = NF90_REDEF( id_set_pr )
           CALL netcdf_handle_error( 'netcdf_define_header', 437 )
-          nc_stat = NF90_PUT_ATT( id_set_pr, NF90_GLOBAL, 'title', &
-                                  TRIM( run_description_header ) //    &
+          nc_stat = NF90_PUT_ATT( id_set_pr, NF90_GLOBAL, 'title',             &
+                                  TRIM( run_description_header ) //            &
                                   TRIM( time_average_text ) )
           CALL netcdf_handle_error( 'netcdf_define_header', 248 )
@@ -4385,7 +4390,7 @@
           nc_stat = NF90_ENDDEF( id_set_pr )
           CALL netcdf_handle_error( 'netcdf_define_header', 438 )
-          message_string = 'netCDF file for vertical profiles ' // &
-                           'from previous run found.' //           &
-                           '&This file will be extended.'
+          message_string = 'netCDF file for vertical profiles ' //             &
+                           'from previous run found.' //                       &
+                           ' This file will be extended.'
           CALL message( 'define_netcdf_header', 'PA0256', 0, 0, 0, 6, 0 )
 
@@ -4395,5 +4400,5 @@
 !
 !--       Define some global attributes of the dataset
-          nc_stat = NF90_PUT_ATT( id_set_ts, NF90_GLOBAL, 'title', &
+          nc_stat = NF90_PUT_ATT( id_set_ts, NF90_GLOBAL, 'title',             &
                                   TRIM( run_description_header ) )
           CALL netcdf_handle_error( 'netcdf_define_header', 249 )
@@ -4476,5 +4481,5 @@
                 DO  j = 0, statistic_regions
                    WRITE ( suffix, '(''_'',I2.2)' )  j
-                   var_list = TRIM( var_list ) // TRIM( dots_label(i) ) // &
+                   var_list = TRIM( var_list ) // TRIM( dots_label(i) ) //     &
                               suffix // ';'
                 ENDDO
@@ -4484,9 +4489,9 @@
 
           IF ( TRIM( var_list ) /= TRIM( var_list_old ) )  THEN
-             message_string = 'netCDF file for time series ' //              &
-                              'from previous run found,' //                  &
-                              '& but this file cannot be extended due to' // &
-                              ' variable mismatch.' //                       &
-                              '&New file is created instead.'
+             message_string = 'netCDF file for time series ' //                &
+                              'from previous run found,' //                    &
+                              ' but this file cannot be extended due to' //    &
+                              ' variable mismatch.' //                         &
+                              ' New file is created instead.'
              CALL message( 'define_netcdf_header', 'PA0257', 0, 1, 0, 6, 0 )
              extend = .FALSE.
@@ -4502,27 +4507,27 @@
           CALL netcdf_handle_error( 'netcdf_define_header', 261 )
 
-          nc_stat = NF90_INQUIRE_VARIABLE( id_set_ts, id_var_time_ts, &
+          nc_stat = NF90_INQUIRE_VARIABLE( id_set_ts, id_var_time_ts,          &
                                            dimids = id_dim_time_old )
           CALL netcdf_handle_error( 'netcdf_define_header', 262 )
           id_dim_time_ts = id_dim_time_old(1)
 
-          nc_stat = NF90_INQUIRE_DIMENSION( id_set_ts, id_dim_time_ts, &
+          nc_stat = NF90_INQUIRE_DIMENSION( id_set_ts, id_dim_time_ts,         &
                                             len = dots_time_count )
           CALL netcdf_handle_error( 'netcdf_define_header', 263 )
 
-          nc_stat = NF90_GET_VAR( id_set_ts, id_var_time_ts,        &
-                                  last_time_coordinate,             &
-                                  start = (/ dots_time_count /), &
+          nc_stat = NF90_GET_VAR( id_set_ts, id_var_time_ts,                   &
+                                  last_time_coordinate,                        &
+                                  start = (/ dots_time_count /),               &
                                   count = (/ 1 /) )
           CALL netcdf_handle_error( 'netcdf_define_header', 264 )
 
           IF ( last_time_coordinate(1) >= simulated_time )  THEN
-             message_string = 'netCDF file for time series ' //             &
-                              'from previous run found,' //                 &
-                              '&but this file cannot be extended becaus' // &
-                              'e the current output time' //                &
-                              '&is less or equal than the last output t' // &
-                              'ime on this file.' //                        &
-                              '&New file is created instead.'
+             message_string = 'netCDF file for time series ' //                &
+                              'from previous run found,' //                    &
+                              ' but this file cannot be extended becaus' //    &
+                              'e the current output time' //                   &
+                              ' is less or equal than the last output t' //    &
+                              'ime on this file.' //                           &
+                              ' New file is created instead.'
              CALL message( 'define_netcdf_header', 'PA0258', 0, 1, 0, 6, 0 )
              dots_time_count = 0
@@ -4562,12 +4567,12 @@
           nc_stat = NF90_REDEF( id_set_ts )
           CALL netcdf_handle_error( 'netcdf_define_header', 439 )
-          nc_stat = NF90_PUT_ATT( id_set_ts, NF90_GLOBAL, 'title', &
+          nc_stat = NF90_PUT_ATT( id_set_ts, NF90_GLOBAL, 'title',             &
                                   TRIM( run_description_header ) )
           CALL netcdf_handle_error( 'netcdf_define_header', 267 )
           nc_stat = NF90_ENDDEF( id_set_ts )
           CALL netcdf_handle_error( 'netcdf_define_header', 440 )
-          message_string = 'netCDF file for time series ' // &
-                           'from previous run found.' //     &
-                           '&This file will be extended.'
+          message_string = 'netCDF file for time series ' //                   &
+                           'from previous run found.' //                       &
+                           ' This file will be extended.'
           CALL message( 'define_netcdf_header', 'PA0259', 0, 0, 0, 6, 0 )
 
@@ -4578,8 +4583,8 @@
 !--       Define some global attributes of the dataset
           IF ( averaging_interval_sp /= 0.0_wp )  THEN
-             WRITE (time_average_text,'('', '',F7.1,'' s average'')') &
+             WRITE (time_average_text,'('', '',F7.1,'' s average'')')          &
                                                             averaging_interval_sp
-             nc_stat = NF90_PUT_ATT( id_set_sp, NF90_GLOBAL, 'title',  &
-                                     TRIM( run_description_header ) // &
+             nc_stat = NF90_PUT_ATT( id_set_sp, NF90_GLOBAL, 'title',          &
+                                     TRIM( run_description_header ) //         &
                                      TRIM( time_average_text ) )
              CALL netcdf_handle_error( 'netcdf_define_header', 268 )
@@ -4801,9 +4806,9 @@
 
           IF ( TRIM( var_list ) /= TRIM( var_list_old ) )  THEN
-             message_string = 'netCDF file for spectra  ' //                 &
-                              'from previous run found,' //                  &
-                              '& but this file cannot be extended due to' // &
-                              ' variable mismatch.' //                       &
-                              '&New file is created instead.'
+             message_string = 'netCDF file for spectra  ' //                   &
+                              'from previous run found,' //                    &
+                              ' but this file cannot be extended due to' //    &
+                              ' variable mismatch.' //                         &
+                              ' New file is created instead.'
              CALL message( 'define_netcdf_header', 'PA0260', 0, 1, 0, 6, 0 )
              extend = .FALSE.
@@ -4835,10 +4840,10 @@
 
           IF ( ns /= ns_old )  THEN
-             message_string = 'netCDF file for spectra ' //                 &
-                              ' from previous run found,' //                &
-                              '&but this file cannot be extended due to' // &
-                              ' mismatch in number of' //                   &
-                              '&vertical levels.' //                        &
-                              '&New file is created instead.'
+             message_string = 'netCDF file for spectra ' //                    &
+                              ' from previous run found,' //                   &
+                              ' but this file cannot be extended due to' //    &
+                              ' mismatch in number of' //                      &
+                              ' vertical levels.' //                           &
+                              ' New file is created instead.'
              CALL message( 'define_netcdf_header', 'PA0261', 0, 1, 0, 6, 0 )
              extend = .FALSE.
@@ -4857,8 +4862,8 @@
                 message_string = 'netCDF file for spectra ' //                 &
                                  ' from previous run found,' //                &
-                                 '&but this file cannot be extended due to' // &
+                                 ' but this file cannot be extended due to' // &
                                  ' mismatch in heights of' //                  &
-                                 '&vertical levels.' //                        &
-                                 '&New file is created instead.'
+                                 ' vertical levels.' //                        &
+                                 ' New file is created instead.'
                 CALL message( 'define_netcdf_header', 'PA0262', 0, 1, 0, 6, 0 )
                 extend = .FALSE.
@@ -4893,11 +4898,11 @@
 
           IF ( last_time_coordinate(1) >= simulated_time )  THEN
-             message_string = 'netCDF file for spectra ' //                 &
-                              'from previous run found,' //                 &
-                              '&but this file cannot be extended becaus' // &
-                              'e the current output time' //                & 
-                              '&is less or equal than the last output t' // &
-                              'ime on this file.' //                        &
-                              '&New file is created instead.'
+             message_string = 'netCDF file for spectra ' //                    &
+                              'from previous run found,' //                    &
+                              ' but this file cannot be extended becaus' //    &
+                              'e the current output time' //                   &  
+                              ' is less or equal than the last output t' //    &
+                              'ime on this file.' //                           &
+                              ' New file is created instead.'
              CALL message( 'define_netcdf_header', 'PA0263', 0, 1, 0, 6, 0 )
              dosp_time_count = 0
@@ -4948,8 +4953,8 @@
 
              WRITE ( time_average_text,'(F7.1,'' s avg'')' )  averaging_interval_sp
-             nc_stat = NF90_PUT_ATT( id_set_sp, NF90_GLOBAL, 'time_avg', &
+             nc_stat = NF90_PUT_ATT( id_set_sp, NF90_GLOBAL, 'time_avg',       &
                                      TRIM( time_average_text ) )
           ELSE
-             nc_stat = NF90_PUT_ATT( id_set_sp, NF90_GLOBAL, 'title', &
+             nc_stat = NF90_PUT_ATT( id_set_sp, NF90_GLOBAL, 'title',          &
                                      TRIM( run_description_header ) )
           ENDIF
@@ -4957,59 +4962,61 @@
           nc_stat = NF90_ENDDEF( id_set_sp )
           CALL netcdf_handle_error( 'netcdf_define_header', 442 )
-          message_string = 'netCDF file for spectra ' //     &
-                           'from previous run found.' //     &
-                           '&This file will be extended.'
+          message_string = 'netCDF file for spectra ' //                       &
+                           'from previous run found.' //                       &
+                           ' This file will be extended.'
           CALL message( 'define_netcdf_header', 'PA0264', 0, 0, 0, 6, 0 )
 
-
-       CASE ( 'pt_new' )
+!
+!--     Currently disabled (DATA_PRT_NETCDF)
+!       CASE ( 'pt_new' )
 
 !
 !--       Define some global attributes of the dataset
-          nc_stat = NF90_PUT_ATT( id_set_prt, NF90_GLOBAL, 'title', &
-                                  TRIM( run_description_header ) )
-          CALL netcdf_handle_error( 'netcdf_define_header', 310 )
+!          nc_stat = NF90_PUT_ATT( id_set_prt, NF90_GLOBAL, 'title',            &
+!                                  TRIM( run_description_header ) )
+!          CALL netcdf_handle_error( 'netcdf_define_header', 310 )
 
 !
 !--       Define time coordinate for particles (unlimited dimension)
-          CALL netcdf_create_dim( id_set_prt, 'time', NF90_UNLIMITED,          &
-                                  id_dim_time_prt, 311 )
-          CALL netcdf_create_var( id_set_prt, (/ id_dim_time_prt /), 'time',   &
-                                  NF90_DOUBLE, id_var_time_prt, 'seconds', '', &
-                                  312, 313, 000 )
+!          CALL netcdf_create_dim( id_set_prt, 'time', NF90_UNLIMITED,          &
+!                                  id_dim_time_prt, 311 )
+!          CALL netcdf_create_var( id_set_prt, (/ id_dim_time_prt /), 'time',   &
+!                                  NF90_DOUBLE, id_var_time_prt, 'seconds', '', &
+!                                  312, 313, 000 )
 !
 !--       netCDF4 allows more than one unlimited dimension
-          CALL netcdf_create_dim( id_set_prt, 'particle_number',            &
-                                  NF90_UNLIMITED, id_dim_prtnum, 314 )
-
-          CALL netcdf_create_var( id_set_prt, (/ id_dim_prtnum /),             &
-                                  'particle_number', NF90_DOUBLE,              &
-                                  id_var_prtnum, 'particle number', '', 315,   &
-                                  316, 000 )
+!          CALL netcdf_create_dim( id_set_prt, 'particle_number',            &
+!                                  NF90_UNLIMITED, id_dim_prtnum, 314 )
+
+!          CALL netcdf_create_var( id_set_prt, (/ id_dim_prtnum /),             &
+!                                  'particle_number', NF90_DOUBLE,              &
+!                                  id_var_prtnum, 'particle number', '', 315,   &
+!                                  316, 000 )
 !
 !--       Define variable which contains the real number of particles in use
-          CALL netcdf_create_var( id_set_prt, (/ id_dim_time_prt /),           &
-                                  'real_num_of_prt', NF90_DOUBLE,              &
-                                  id_var_rnop_prt, 'particle number', '', 317, &
-                                  318, 000 )
+!          CALL netcdf_create_var( id_set_prt, (/ id_dim_time_prt /),           &
+!                                  'real_num_of_prt', NF90_DOUBLE,              &
+!                                  id_var_rnop_prt, 'particle number', '', 317, &
+!                                  318, 000 )
 !
 !--       Define the variables
-          DO  i = 1, 17
-
-             CALL netcdf_create_var( id_set_prt, (/ id_dim_prtnum,             &
-                                     id_dim_time_prt /), prt_var_names(i),     &
-                                     nc_precision(8), id_var_prt(i),           &
-                                     TRIM( prt_var_units(i) ),                 &
-                                     TRIM( prt_var_names(i) ), 319, 320, 321 )
-
-          ENDDO
+!          DO  i = 1, 17
+
+!             CALL netcdf_create_var( id_set_prt, (/ id_dim_prtnum,             &
+!                                     id_dim_time_prt /), prt_var_names(i),     &
+!                                     nc_precision(8), id_var_prt(i),           &
+!                                     TRIM( prt_var_units(i) ),                 &
+!                                     TRIM( prt_var_names(i) ), 319, 320, 321 )
+
+!          ENDDO
 
 !
 !--       Leave netCDF define mode
-          nc_stat = NF90_ENDDEF( id_set_prt )
-          CALL netcdf_handle_error( 'netcdf_define_header', 322 )
-
-
-       CASE ( 'pt_ext' )
+!          nc_stat = NF90_ENDDEF( id_set_prt )
+!          CALL netcdf_handle_error( 'netcdf_define_header', 322 )
+
+!
+!--     Currently disabled (DATA_PRT_NETCDF)
+!       CASE ( 'pt_ext' )
 
 !
@@ -5018,55 +5025,55 @@
 !--       The current time must be larger than the last output time
 !--       on the file.
-          nc_stat = NF90_INQ_VARID( id_set_prt, 'time', id_var_time_prt )
-          CALL netcdf_handle_error( 'netcdf_define_header', 323 )
-
-          nc_stat = NF90_INQUIRE_VARIABLE( id_set_prt, id_var_time_prt, &
-                                           dimids = id_dim_time_old )
-          CALL netcdf_handle_error( 'netcdf_define_header', 324 )
-          id_dim_time_prt = id_dim_time_old(1)
-
-          nc_stat = NF90_INQUIRE_DIMENSION( id_set_prt, id_dim_time_prt, &
-                                            len = prt_time_count )
-          CALL netcdf_handle_error( 'netcdf_define_header', 325 )
-
-          nc_stat = NF90_GET_VAR( id_set_prt, id_var_time_prt,  &
-                                  last_time_coordinate,         &
-                                  start = (/ prt_time_count /), &
-                                  count = (/ 1 /) )
-          CALL netcdf_handle_error( 'netcdf_define_header', 326 )
-
-          IF ( last_time_coordinate(1) >= simulated_time )  THEN
-             message_string = 'netCDF file for particles ' //               &
-                              'from previous run found,' //                 &
-                              '&but this file cannot be extended becaus' // &
-                              'e the current output time' //                &
-                              '&is less or equal than the last output t' // &
-                              'ime on this file.' //                        &
-                              '&New file is created instead.'
-             CALL message( 'define_netcdf_header', 'PA0265', 0, 1, 0, 6, 0 )
-             prt_time_count = 0
-             extend = .FALSE.
-             RETURN
-          ENDIF
+!          nc_stat = NF90_INQ_VARID( id_set_prt, 'time', id_var_time_prt )
+!          CALL netcdf_handle_error( 'netcdf_define_header', 323 )
+
+!          nc_stat = NF90_INQUIRE_VARIABLE( id_set_prt, id_var_time_prt, &
+!                                           dimids = id_dim_time_old )
+!          CALL netcdf_handle_error( 'netcdf_define_header', 324 )
+!          id_dim_time_prt = id_dim_time_old(1)
+
+!          nc_stat = NF90_INQUIRE_DIMENSION( id_set_prt, id_dim_time_prt, &
+!                                            len = prt_time_count )
+!          CALL netcdf_handle_error( 'netcdf_define_header', 325 )
+
+!          nc_stat = NF90_GET_VAR( id_set_prt, id_var_time_prt,  &
+!                                  last_time_coordinate,         &
+!                                  start = (/ prt_time_count /), &
+!                                  count = (/ 1 /) )
+!          CALL netcdf_handle_error( 'netcdf_define_header', 326 )
+
+!          IF ( last_time_coordinate(1) >= simulated_time )  THEN
+!             message_string = 'netCDF file for particles ' //                  &
+!                              'from previous run found,' //                    &
+!                              ' but this file cannot be extended becaus' //    &
+!                              'e the current output time' //                   &
+!                              ' is less or equal than the last output t' //    &
+!                              'ime on this file.' //                           &
+!                              ' New file is created instead.'
+!             CALL message( 'define_netcdf_header', 'PA0265', 0, 1, 0, 6, 0 )
+!             prt_time_count = 0
+!             extend = .FALSE.
+!             RETURN
+!          ENDIF
 
 !
 !--       Dataset seems to be extendable.
 !--       Now get the variable ids.
-          nc_stat = NF90_INQ_VARID( id_set_prt, 'real_num_of_prt', &
-                                    id_var_rnop_prt )
-          CALL netcdf_handle_error( 'netcdf_define_header', 327 )
-
-          DO  i = 1, 17
-
-             nc_stat = NF90_INQ_VARID( id_set_prt, prt_var_names(i), &
-                                       id_var_prt(i) )
-             CALL netcdf_handle_error( 'netcdf_define_header', 328 )
-
-          ENDDO
-
-          message_string = 'netCDF file for particles ' // &
-                           'from previous run found.' //   &
-                           '&This file will be extended.'
-          CALL message( 'define_netcdf_header', 'PA0266', 0, 0, 0, 6, 0 )
+!         nc_stat = NF90_INQ_VARID( id_set_prt, 'real_num_of_prt',             &
+!                                   id_var_rnop_prt )
+!         CALL netcdf_handle_error( 'netcdf_define_header', 327 )
+
+!          DO  i = 1, 17
+
+!             nc_stat = NF90_INQ_VARID( id_set_prt, prt_var_names(i),           &
+!                                       id_var_prt(i) )
+!             CALL netcdf_handle_error( 'netcdf_define_header', 328 )
+
+!          ENDDO
+
+!          message_string = 'netCDF file for particles ' //                     &
+!                           'from previous run found.' //                       &
+!                           ' This file will be extended.'
+!          CALL message( 'define_netcdf_header', 'PA0266', 0, 0, 0, 6, 0 )
         
 
@@ -5076,5 +5083,5 @@
 !
 !--       Define some global attributes of the dataset
-          nc_stat = NF90_PUT_ATT( id_set_pts, NF90_GLOBAL, 'title', &
+          nc_stat = NF90_PUT_ATT( id_set_pts, NF90_GLOBAL, 'title',            &
                                   TRIM( run_description_header ) )
           CALL netcdf_handle_error( 'netcdf_define_header', 396 )
@@ -5173,9 +5180,9 @@
 
           IF ( TRIM( var_list ) /= TRIM( var_list_old ) )  THEN
-             message_string = 'netCDF file for particle time series ' //     &
-                              'from previous run found,' //                  &
-                              '& but this file cannot be extended due to' // &
-                              ' variable mismatch.' //                       &
-                              '&New file is created instead.'
+             message_string = 'netCDF file for particle time series ' //       &
+                              'from previous run found,' //                    &
+                              ' but this file cannot be extended due to' //    &
+                              ' variable mismatch.' //                         &
+                              ' New file is created instead.'
              CALL message( 'define_netcdf_header', 'PA0267', 0, 1, 0, 6, 0 )
              extend = .FALSE.
@@ -5207,11 +5214,11 @@
 
           IF ( last_time_coordinate(1) >= simulated_time )  THEN
-             message_string = 'netCDF file for particle time series ' //    &
-                              'from previous run found,' //                 &
-                              '&but this file cannot be extended becaus' // &
-                              'e the current output time' //                &
-                              '&is less or equal than the last output t' // &
-                              'ime on this file.' //                        &
-                              '&New file is created instead.'
+             message_string = 'netCDF file for particle time series ' //       &
+                              'from previous run found,' //                    &
+                              ' but this file cannot be extended becaus' //    &
+                              'e the current output time' //                   &
+                              ' is less or equal than the last output t' //    &
+                              'ime on this file.' //                           &
+                              ' New file is created instead.'
              CALL message( 'define_netcdf_header', 'PA0268', 0, 1, 0, 6, 0 )
              dopts_time_count = 0
@@ -5255,12 +5262,12 @@
           nc_stat = NF90_REDEF( id_set_pts )
           CALL netcdf_handle_error( 'netcdf_define_header', 443 )
-          nc_stat = NF90_PUT_ATT( id_set_pts, NF90_GLOBAL, 'title', &
+          nc_stat = NF90_PUT_ATT( id_set_pts, NF90_GLOBAL, 'title',            &
                                   TRIM( run_description_header ) )
           CALL netcdf_handle_error( 'netcdf_define_header', 411 )
           nc_stat = NF90_ENDDEF( id_set_pts )
           CALL netcdf_handle_error( 'netcdf_define_header', 444 )
-          message_string = 'netCDF file for particle time series ' // &
-                           'from previous run found.' //              &
-                           '&This file will be extended.'
+          message_string = 'netCDF file for particle time series ' //          &
+                           'from previous run found.' //                       &
+                           ' This file will be extended.'
           CALL message( 'netcdf_define_header', 'PA0269', 0, 0, 0, 6, 0 )
 
@@ -5355,7 +5362,7 @@
              message_string = 'netCDF file for flight time series ' //         &
                               'from previous run found,' //                    &
-                              '& but this file cannot be extended due to' //   &
+                              ' but this file cannot be extended due to' //    &
                               ' variable mismatch.' //                         &
-                              '&New file is created instead.'
+                              ' New file is created instead.'
              CALL message( 'define_netcdf_header', 'PA0257', 0, 1, 0, 6, 0 )
              extend = .FALSE.
@@ -5371,10 +5378,10 @@
           CALL netcdf_handle_error( 'netcdf_define_header', 261 )
 
-          nc_stat = NF90_INQUIRE_VARIABLE( id_set_fl, id_var_time_fl, &
+          nc_stat = NF90_INQUIRE_VARIABLE( id_set_fl, id_var_time_fl,          &
                                            dimids = id_dim_time_old )
           CALL netcdf_handle_error( 'netcdf_define_header', 262 )
           id_dim_time_fl = id_dim_time_old(1)
 
-          nc_stat = NF90_INQUIRE_DIMENSION( id_set_fl, id_dim_time_fl, &
+          nc_stat = NF90_INQUIRE_DIMENSION( id_set_fl, id_dim_time_fl,         &
                                             len = dofl_time_count )
           CALL netcdf_handle_error( 'netcdf_define_header', 263 )
@@ -5387,11 +5394,11 @@
 
           IF ( last_time_coordinate(1) >= simulated_time )  THEN
-             message_string = 'netCDF file for flight-time series ' //      &
-                              'from previous run found,' //                 &
-                              '&but this file cannot be extended becaus' // &
-                              'e the current output time' //                &
-                              '&is less or equal than the last output t' // &
-                              'ime on this file.' //                        &
-                              '&New file is created instead.'
+             message_string = 'netCDF file for flight-time series ' //         &
+                              'from previous run found,' //                    &
+                              ' but this file cannot be extended becaus' //    &
+                              'e the current output time' //                   &
+                              ' is less or equal than the last output t' //    &
+                              'ime on this file.' //                           &
+                              ' New file is created instead.'
              CALL message( 'define_netcdf_header', 'PA0258', 0, 1, 0, 6, 0 )
              dofl_time_count = 0
@@ -5441,5 +5448,5 @@
           message_string = 'netCDF file for flight-time series ' //            &
                            'from previous run found.' //                       &
-                           '&This file will be extended.'
+                           ' This file will be extended.'
           CALL message( 'define_netcdf_header', 'PA0259', 0, 0, 0, 6, 0 )
 
