Index: palm/trunk/SOURCE/data_output_spectra.f90
===================================================================
--- palm/trunk/SOURCE/data_output_spectra.f90	(revision 4360)
+++ palm/trunk/SOURCE/data_output_spectra.f90	(revision 4577)
@@ -1,20 +1,19 @@
 !> @file data_output_spectra.f90
-!------------------------------------------------------------------------------!
+!--------------------------------------------------------------------------------------------------!
 ! This file is part of the PALM model system.
 !
-! PALM is free software: you can redistribute it and/or modify it under the
-! terms of the GNU General Public License as published by the Free Software
-! Foundation, either version 3 of the License, or (at your option) any later
-! version.
-!
-! PALM is distributed in the hope that it will be useful, but WITHOUT ANY
-! WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
-! A PARTICULAR PURPOSE.  See the GNU General Public License for more details.
-!
-! You should have received a copy of the GNU General Public License along with
-! PALM. If not, see <http://www.gnu.org/licenses/>.
+! PALM is free software: you can redistribute it and/or modify it under the terms of the GNU General
+! Public License as published by the Free Software Foundation, either version 3 of the License, or
+! (at your option) any later version.
+!
+! PALM is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the
+! implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General
+! Public License for more details.
+!
+! You should have received a copy of the GNU General Public License along with PALM. If not, see
+! <http://www.gnu.org/licenses/>.
 !
 ! Copyright 1997-2020 Leibniz Universitaet Hannover
-!------------------------------------------------------------------------------!
+!--------------------------------------------------------------------------------------------------!
 !
 ! Current revisions:
@@ -25,6 +24,9 @@
 ! -----------------
 ! $Id$
+! file re-formatted to follow the PALM coding standard
+!
+! 4360 2020-01-07 11:25:50Z suehring
 ! Corrected "Former revisions" section
-! 
+!
 ! 3655 2019-01-07 16:51:22Z knoop
 ! variables documented
@@ -38,12 +40,12 @@
 !> Writing spectra data on file, using a special format which allows
 !> plotting of these data with PROFIL-graphic-software
-!------------------------------------------------------------------------------!
+!--------------------------------------------------------------------------------------------------!
  SUBROUTINE data_output_spectra
- 
+
 #if defined( __netcdf )
-    USE control_parameters,                                                    &
+    USE control_parameters,                                                                        &
         ONLY:  message_string, time_since_reference_point
 
-    USE cpulog,                                                                &
+    USE cpulog,                                                                                    &
         ONLY:  cpu_log, log_point
 
@@ -52,13 +54,12 @@
     USE NETCDF
 
-    USE netcdf_interface,                                                      &
+    USE netcdf_interface,                                                                          &
         ONLY:  id_set_sp, id_var_time_sp, nc_stat, netcdf_handle_error
 
     USE pegrid
 
-    USE spectra_mod,                                                           &
-        ONLY:  average_count_sp, averaging_interval_sp, comp_spectra_level,    &
-               data_output_sp, dosp_time_count, spectra_direction, spectrum_x, &
-               spectrum_y
+    USE spectra_mod,                                                                               &
+        ONLY:  average_count_sp, averaging_interval_sp, comp_spectra_level, data_output_sp,        &
+               dosp_time_count, spectra_direction, spectrum_x, spectrum_y
 
 
@@ -67,5 +68,5 @@
     INTEGER(iwp) ::  m       !< running index over spectra output
     INTEGER(iwp) ::  pr      !< index used to assign default quantities to data output
-    
+
     CALL cpu_log( log_point(31), 'data_output_spectra', 'start' )
 
@@ -88,6 +89,6 @@
 !
 !--    Update the spectra time axis
-       nc_stat = NF90_PUT_VAR( id_set_sp, id_var_time_sp,        &
-                               (/ time_since_reference_point /), &
+       nc_stat = NF90_PUT_VAR( id_set_sp, id_var_time_sp,                                          &
+                               (/ time_since_reference_point /),                                   &
                                start = (/ dosp_time_count /), count = (/ 1 /) )
        CALL netcdf_handle_error( 'data_output_spectra', 47 )
@@ -96,6 +97,6 @@
 !--    If necessary, calculate time average and reset average counter
        IF ( average_count_sp == 0 )  THEN
-           message_string = 'no spectra data available'
-           CALL message( 'data_output_spectra', 'PA0186', 0, 0, 0, 6, 0 )
+          message_string = 'no spectra data available'
+          CALL message( 'data_output_spectra', 'PA0186', 0, 0, 0, 6, 0 )
        ENDIF
        IF ( average_count_sp /= 1 )  THEN
@@ -132,8 +133,7 @@
              CASE DEFAULT
 !
-!--             The DEFAULT case is reached either if the parameter 
-!--             data_output_sp(m) contains a wrong character string or if the 
-!--             user has coded a special case in the user interface. There, the 
-!--             subroutine user_spectra checks which of these two conditions 
+!--             The DEFAULT case is reached either if the parameter data_output_sp(m) contains a
+!--             wrong character string or if the user has coded a special case in the user
+!--             interface. There, the subroutine user_spectra checks which of these two conditions
 !--             applies.
                 CALL user_spectra( 'data_output', m, pr )
@@ -175,19 +175,19 @@
 
 
-!------------------------------------------------------------------------------!
+!--------------------------------------------------------------------------------------------------!
 ! Description:
 ! ------------
 !> @todo Missing subroutine description.
-!------------------------------------------------------------------------------!
+!--------------------------------------------------------------------------------------------------!
  SUBROUTINE output_spectra_netcdf( nsp, direction )
 #if defined( __netcdf )
 
-    USE basic_constants_and_equations_mod,                                     &
+    USE basic_constants_and_equations_mod,                                                         &
         ONLY:  pi
 
-    USE grid_variables,                                                        &
+    USE grid_variables,                                                                            &
         ONLY:  dx, dy
 
-    USE indices,                                                               &
+    USE indices,                                                                                   &
         ONLY:  nx, ny
 
@@ -196,9 +196,8 @@
     USE NETCDF
 
-    USE netcdf_interface,                                                      &
-        ONLY:  id_set_sp, id_var_dospx, id_var_dospy, nc_stat,                 &
-               netcdf_handle_error
-
-    USE spectra_mod,                                                           &
+    USE netcdf_interface,                                                                          &
+        ONLY:  id_set_sp, id_var_dospx, id_var_dospy, nc_stat, netcdf_handle_error
+
+    USE spectra_mod,                                                                               &
         ONLY:  dosp_time_count, n_sp_x, n_sp_y, spectrum_x, spectrum_y
 
@@ -228,6 +227,6 @@
           ENDDO
 
-          nc_stat = NF90_PUT_VAR( id_set_sp, id_var_dospx(nsp), netcdf_data_x, &
-                                  start = (/ 1, k, dosp_time_count /), &
+          nc_stat = NF90_PUT_VAR( id_set_sp, id_var_dospx(nsp), netcdf_data_x,                     &
+                                  start = (/ 1, k, dosp_time_count /),                             &
                                   count = (/ nx/2, 1, 1 /) )
           CALL netcdf_handle_error( 'data_output_spectra', 348 )
@@ -246,6 +245,6 @@
           ENDDO
 
-          nc_stat = NF90_PUT_VAR( id_set_sp, id_var_dospy(nsp), netcdf_data_y, &
-                                  start = (/ 1, k, dosp_time_count /), &
+          nc_stat = NF90_PUT_VAR( id_set_sp, id_var_dospy(nsp), netcdf_data_y,                     &
+                                  start = (/ 1, k, dosp_time_count /),                             &
                                   count = (/ ny/2, 1, 1 /) )
           CALL netcdf_handle_error( 'data_output_spectra', 349 )
