Index: palm/trunk/SOURCE/data_output_2d.f90
===================================================================
--- palm/trunk/SOURCE/data_output_2d.f90	(revision 1321)
+++ palm/trunk/SOURCE/data_output_2d.f90	(revision 1327)
@@ -20,5 +20,6 @@
 ! Current revisions:
 ! -----------------
-! 
+! parts concerning iso2d output removed,
+! -netcdf output queries
 !
 ! Former revisions:
@@ -101,6 +102,6 @@
                do2d_xz_last_time, do2d_xz_n, do2d_xz_time_count,               &
                do2d_yz_last_time, do2d_yz_n, do2d_yz_time_count,               &
-               ibc_uv_b, icloud_scheme, io_blocks, io_group, iso2d_output,     &
-               message_string, netcdf_data_format, netcdf_output,              &
+               ibc_uv_b, icloud_scheme, io_blocks, io_group,                   &
+               message_string, netcdf_data_format,                             &
                ntdim_2d_xy, ntdim_2d_xz, ntdim_2d_yz, psolver, section,        &
                simulated_time,  simulated_time_chr, time_since_reference_point
@@ -236,6 +237,5 @@
 !
 !--       Parallel netCDF4/HDF5 output is done on all PEs, all other on PE0 only
-          IF ( netcdf_output .AND. ( myid == 0 .OR. netcdf_data_format > 4 ) ) &
-          THEN
+          IF ( myid == 0  .OR.  netcdf_data_format > 4 )  THEN
              CALL check_open( 101+av*10 )
           ENDIF
@@ -245,5 +245,4 @@
           ELSE
              IF ( myid == 0 )  THEN
-                IF ( iso2d_output )  CALL check_open( 21 )
 #if defined( __parallel )
                 ALLOCATE( total_2d(-nbgp:nx+nbgp,-nbgp:ny+nbgp) )
@@ -269,6 +268,5 @@
 !
 !--       Parallel netCDF4/HDF5 output is done on all PEs, all other on PE0 only
-          IF ( netcdf_output .AND. ( myid == 0 .OR. netcdf_data_format > 4 ) ) &
-          THEN
+          IF ( myid == 0 .OR. netcdf_data_format > 4 )  THEN
              CALL check_open( 102+av*10 )
           ENDIF
@@ -278,5 +276,4 @@
           ELSE
              IF ( myid == 0 )  THEN
-                IF ( iso2d_output )  CALL check_open( 22 )
 #if defined( __parallel )
                 ALLOCATE( total_2d(-nbgp:nx+nbgp,nzb:nzt+1) )
@@ -302,6 +299,5 @@
 !
 !--       Parallel netCDF4/HDF5 output is done on all PEs, all other on PE0 only
-          IF ( netcdf_output .AND. ( myid == 0 .OR. netcdf_data_format > 4 ) ) &
-          THEN
+          IF ( myid == 0 .OR. netcdf_data_format > 4 )  THEN
              CALL check_open( 103+av*10 )
           ENDIF
@@ -311,5 +307,4 @@
           ELSE
              IF ( myid == 0 )  THEN
-                IF ( iso2d_output )  CALL check_open( 23 )
 #if defined( __parallel )
                 ALLOCATE( total_2d(-nbgp:ny+nbgp,nzb:nzt+1) )
@@ -882,6 +877,6 @@
                       do2d_xy_last_time(av)  = simulated_time
                       IF ( myid == 0 )  THEN
-                         IF ( ( .NOT. data_output_2d_on_each_pe  .AND.         &
-                              netcdf_output )  .OR.  netcdf_data_format > 4 )  &
+                         IF ( .NOT. data_output_2d_on_each_pe  &
+                              .OR.  netcdf_data_format > 4 )   &
                          THEN
 #if defined( __netcdf )
@@ -921,5 +916,5 @@
 
 #if defined( __parallel )
-                   IF ( netcdf_output  .AND.  netcdf_data_format > 4 )  THEN
+                   IF ( netcdf_data_format > 4 )  THEN
 !
 !--                   Parallel output in netCDF4/HDF5 format.
@@ -947,5 +942,5 @@
 !--                      Output of partial arrays on each PE
 #if defined( __netcdf )
-                         IF ( netcdf_output  .AND.  myid == 0 )  THEN
+                         IF ( myid == 0 )  THEN
                             WRITE ( 21 )  time_since_reference_point,          &
                                           do2d_xy_time_count(av), av
@@ -994,9 +989,4 @@
                             ENDDO
 !
-!--                         Output of the total cross-section.
-                            IF ( iso2d_output )  THEN
-                               WRITE (21)  total_2d(-nbgp:nx+nbgp,-nbgp:ny+nbgp)
-                            ENDIF
-!
 !--                         Relocate the local array for the next loop increment
                             DEALLOCATE( local_2d )
@@ -1004,20 +994,18 @@
 
 #if defined( __netcdf )
-                            IF ( netcdf_output )  THEN
-                               IF ( two_d ) THEN
-                                  nc_stat = NF90_PUT_VAR( id_set_xy(av),       &
-                                                          id_var_do2d(av,if),  &
-                                                      total_2d(0:nx+1,0:ny+1), &
-                                start = (/ 1, 1, 1, do2d_xy_time_count(av) /), &
-                                                count = (/ nx+2, ny+2, 1, 1 /) )
-                               ELSE
-                                  nc_stat = NF90_PUT_VAR( id_set_xy(av),       &
-                                                          id_var_do2d(av,if),  &
-                                                      total_2d(0:nx+1,0:ny+1), &
-                               start = (/ 1, 1, is, do2d_xy_time_count(av) /), &
-                                                count = (/ nx+2, ny+2, 1, 1 /) )
-                               ENDIF
-                               CALL handle_netcdf_error( 'data_output_2d', 54 )
+                            IF ( two_d ) THEN
+                               nc_stat = NF90_PUT_VAR( id_set_xy(av),       &
+                                                       id_var_do2d(av,if),  &
+                                                   total_2d(0:nx+1,0:ny+1), &
+                             start = (/ 1, 1, 1, do2d_xy_time_count(av) /), &
+                                             count = (/ nx+2, ny+2, 1, 1 /) )
+                            ELSE
+                               nc_stat = NF90_PUT_VAR( id_set_xy(av),       &
+                                                       id_var_do2d(av,if),  &
+                                                   total_2d(0:nx+1,0:ny+1), &
+                            start = (/ 1, 1, is, do2d_xy_time_count(av) /), &
+                                             count = (/ nx+2, ny+2, 1, 1 /) )
                             ENDIF
+                            CALL handle_netcdf_error( 'data_output_2d', 54 )
 #endif
 
@@ -1043,48 +1031,22 @@
                    ENDIF
 #else
-                   IF ( iso2d_output )  THEN
-                      WRITE (21)  local_2d(nxl:nxr+1,nys:nyn+1)
+#if defined( __netcdf )
+                   IF ( two_d ) THEN
+                      nc_stat = NF90_PUT_VAR( id_set_xy(av),                &
+                                              id_var_do2d(av,if),           &
+                                             local_2d(nxl:nxr+1,nys:nyn+1), &
+                             start = (/ 1, 1, 1, do2d_xy_time_count(av) /), &
+                                           count = (/ nx+2, ny+2, 1, 1 /) )
+                   ELSE
+                      nc_stat = NF90_PUT_VAR( id_set_xy(av),                &
+                                              id_var_do2d(av,if),           &
+                                             local_2d(nxl:nxr+1,nys:nyn+1), &
+                            start = (/ 1, 1, is, do2d_xy_time_count(av) /), &
+                                           count = (/ nx+2, ny+2, 1, 1 /) )
                    ENDIF
-#if defined( __netcdf )
-                   IF ( netcdf_output )  THEN
-                      IF ( two_d ) THEN
-                         nc_stat = NF90_PUT_VAR( id_set_xy(av),                &
-                                                 id_var_do2d(av,if),           &
-                                                local_2d(nxl:nxr+1,nys:nyn+1), &
-                                start = (/ 1, 1, 1, do2d_xy_time_count(av) /), &
-                                              count = (/ nx+2, ny+2, 1, 1 /) )
-                      ELSE
-                         nc_stat = NF90_PUT_VAR( id_set_xy(av),                &
-                                                 id_var_do2d(av,if),           &
-                                                local_2d(nxl:nxr+1,nys:nyn+1), &
-                               start = (/ 1, 1, is, do2d_xy_time_count(av) /), &
-                                              count = (/ nx+2, ny+2, 1, 1 /) )
-                      ENDIF
-                      CALL handle_netcdf_error( 'data_output_2d', 447 )
-                   ENDIF
+                   CALL handle_netcdf_error( 'data_output_2d', 447 )
 #endif
 #endif
                    do2d_xy_n = do2d_xy_n + 1
-!
-!--                Write LOCAL parameter set for ISO2D.
-                   IF ( myid == 0  .AND.  iso2d_output )  THEN
-                      IF ( section(is,s) /= -1 )  THEN
-                         WRITE ( section_chr, '(''z = '',F7.2,'' m  (GP '',I3, &
-                                               &'')'')'                        &
-                               )  level_z(layer_xy), layer_xy
-                      ELSE
-                         section_chr = 'averaged along z'
-                      ENDIF
-                      IF ( av == 0 )  THEN
-                         rtext = TRIM( do2d(av,if) ) // '  t = ' //            &
-                                 TRIM( simulated_time_chr ) // '  ' //         &
-                                 TRIM( section_chr )
-                      ELSE
-                         rtext = TRIM( do2d(av,if) ) // '  averaged t = ' //   &
-                                 TRIM( simulated_time_chr ) // '  ' //         &
-                                 TRIM( section_chr )
-                      ENDIF
-                      WRITE (27,LOCAL)
-                   ENDIF
 !
 !--                For 2D-arrays (e.g. u*) only one cross-section is available.
@@ -1104,6 +1066,6 @@
                       do2d_xz_last_time(av)  = simulated_time
                       IF ( myid == 0 )  THEN
-                         IF ( ( .NOT. data_output_2d_on_each_pe  .AND.         &
-                              netcdf_output )  .OR.  netcdf_data_format > 4 )  &
+                         IF ( .NOT. data_output_2d_on_each_pe  &
+                              .OR.  netcdf_data_format > 4 )   &
                          THEN
 #if defined( __netcdf )
@@ -1162,5 +1124,5 @@
 
 #if defined( __parallel )
-                   IF ( netcdf_output  .AND.  netcdf_data_format > 4 )  THEN
+                   IF ( netcdf_data_format > 4 )  THEN
 !
 !--                   Output in netCDF4/HDF5 format.
@@ -1192,5 +1154,5 @@
 !--                      index values.
 #if defined( __netcdf )
-                         IF ( netcdf_output  .AND.  myid == 0 )  THEN
+                         IF ( myid == 0 )  THEN
                             WRITE ( 22 )  time_since_reference_point,          &
                                           do2d_xz_time_count(av), av
@@ -1258,9 +1220,4 @@
                             ENDDO
 !
-!--                         Output of the total cross-section.
-                            IF ( iso2d_output )  THEN
-                               WRITE (22)  total_2d(-nbgp:nx+nbgp,nzb:nzt+1)
-                            ENDIF
-!
 !--                         Relocate the local array for the next loop increment
                             DEALLOCATE( local_2d )
@@ -1268,12 +1225,10 @@
 
 #if defined( __netcdf )
-                            IF ( netcdf_output )  THEN
-                               nc_stat = NF90_PUT_VAR( id_set_xz(av),          &
-                                                    id_var_do2d(av,if),        &
-                                                    total_2d(0:nx+1,nzb:nzt+1),&
-                               start = (/ 1, is, 1, do2d_xz_time_count(av) /), &
-                                                count = (/ nx+2, 1, nz+2, 1 /) )
-                               CALL handle_netcdf_error( 'data_output_2d', 58 )
-                            ENDIF
+                            nc_stat = NF90_PUT_VAR( id_set_xz(av),          &
+                                                 id_var_do2d(av,if),        &
+                                                 total_2d(0:nx+1,nzb:nzt+1),&
+                            start = (/ 1, is, 1, do2d_xz_time_count(av) /), &
+                                             count = (/ nx+2, 1, nz+2, 1 /) )
+                            CALL handle_netcdf_error( 'data_output_2d', 58 )
 #endif
 
@@ -1310,40 +1265,14 @@
                    ENDIF
 #else
-                   IF ( iso2d_output )  THEN
-                      WRITE (22)  local_2d(nxl:nxr+1,nzb:nzt+1)
-                   ENDIF
 #if defined( __netcdf )
-                   IF ( netcdf_output )  THEN
-                      nc_stat = NF90_PUT_VAR( id_set_xz(av),                   &
-                                              id_var_do2d(av,if),              &
-                                              local_2d(nxl:nxr+1,nzb:nzt+1),   &
-                               start = (/ 1, is, 1, do2d_xz_time_count(av) /), &
-                                              count = (/ nx+2, 1, nz+2, 1 /) )
-                      CALL handle_netcdf_error( 'data_output_2d', 451 )
-                   ENDIF
+                   nc_stat = NF90_PUT_VAR( id_set_xz(av),                   &
+                                           id_var_do2d(av,if),              &
+                                           local_2d(nxl:nxr+1,nzb:nzt+1),   &
+                            start = (/ 1, is, 1, do2d_xz_time_count(av) /), &
+                                           count = (/ nx+2, 1, nz+2, 1 /) )
+                   CALL handle_netcdf_error( 'data_output_2d', 451 )
 #endif
 #endif
                    do2d_xz_n = do2d_xz_n + 1
-!
-!--                Write LOCAL-parameter set for ISO2D.
-                   IF ( myid == 0  .AND.  iso2d_output )  THEN
-                      IF ( section(is,s) /= -1 )  THEN
-                         WRITE ( section_chr, '(''y = '',F8.2,'' m  (GP '',I3, &
-                                               &'')'')'                        &
-                               )  section(is,s)*dy, section(is,s)
-                      ELSE
-                         section_chr = 'averaged along y'
-                      ENDIF
-                      IF ( av == 0 )  THEN
-                         rtext = TRIM( do2d(av,if) ) // '  t = ' //            &
-                                 TRIM( simulated_time_chr ) // '  ' //         &
-                                 TRIM( section_chr )
-                      ELSE
-                         rtext = TRIM( do2d(av,if) ) // '  averaged t = ' //   &
-                                 TRIM( simulated_time_chr ) // '  ' //         &
-                                 TRIM( section_chr )
-                      ENDIF
-                      WRITE (28,LOCAL)
-                   ENDIF
 
                 CASE ( 'yz' )
@@ -1356,6 +1285,6 @@
                       do2d_yz_last_time(av)  = simulated_time
                       IF ( myid == 0 )  THEN
-                         IF ( ( .NOT. data_output_2d_on_each_pe  .AND.         &
-                              netcdf_output )  .OR.  netcdf_data_format > 4 )  &
+                         IF ( .NOT. data_output_2d_on_each_pe  &
+                              .OR.  netcdf_data_format > 4 )   &
                          THEN
 #if defined( __netcdf )
@@ -1414,5 +1343,5 @@
 
 #if defined( __parallel )
-                   IF ( netcdf_output  .AND.  netcdf_data_format > 4 )  THEN
+                   IF ( netcdf_data_format > 4 )  THEN
 !
 !--                   Output in netCDF4/HDF5 format.
@@ -1444,5 +1373,5 @@
 !--                      index values.
 #if defined( __netcdf )
-                         IF ( netcdf_output  .AND.  myid == 0 )  THEN
+                         IF ( myid == 0 )  THEN
                             WRITE ( 23 )  time_since_reference_point,          &
                                           do2d_yz_time_count(av), av
@@ -1510,9 +1439,4 @@
                             ENDDO
 !
-!--                         Output of the total cross-section.
-                            IF ( iso2d_output )  THEN
-                               WRITE (23)  total_2d(0:ny+1,nzb:nzt+1)
-                            ENDIF
-!
 !--                         Relocate the local array for the next loop increment
                             DEALLOCATE( local_2d )
@@ -1520,12 +1444,10 @@
 
 #if defined( __netcdf )
-                            IF ( netcdf_output )  THEN
-                               nc_stat = NF90_PUT_VAR( id_set_yz(av),          &
-                                                    id_var_do2d(av,if),        &
-                                                    total_2d(0:ny+1,nzb:nzt+1),&
-                               start = (/ is, 1, 1, do2d_yz_time_count(av) /), &
-                                                count = (/ 1, ny+2, nz+2, 1 /) )
-                               CALL handle_netcdf_error( 'data_output_2d', 61 )
-                            ENDIF
+                            nc_stat = NF90_PUT_VAR( id_set_yz(av),          &
+                                                 id_var_do2d(av,if),        &
+                                                 total_2d(0:ny+1,nzb:nzt+1),&
+                            start = (/ is, 1, 1, do2d_yz_time_count(av) /), &
+                                             count = (/ 1, ny+2, nz+2, 1 /) )
+                            CALL handle_netcdf_error( 'data_output_2d', 61 )
 #endif
 
@@ -1562,40 +1484,14 @@
                    ENDIF
 #else
-                   IF ( iso2d_output )  THEN
-                      WRITE (23)  local_2d(nys:nyn+1,nzb:nzt+1)
-                   ENDIF
 #if defined( __netcdf )
-                   IF ( netcdf_output )  THEN
-                      nc_stat = NF90_PUT_VAR( id_set_yz(av),                   &
-                                              id_var_do2d(av,if),              &
-                                              local_2d(nys:nyn+1,nzb:nzt+1),   &
-                               start = (/ is, 1, 1, do2d_xz_time_count(av) /), &
-                                              count = (/ 1, ny+2, nz+2, 1 /) )
-                      CALL handle_netcdf_error( 'data_output_2d', 452 )
-                   ENDIF
+                   nc_stat = NF90_PUT_VAR( id_set_yz(av),                   &
+                                           id_var_do2d(av,if),              &
+                                           local_2d(nys:nyn+1,nzb:nzt+1),   &
+                            start = (/ is, 1, 1, do2d_xz_time_count(av) /), &
+                                           count = (/ 1, ny+2, nz+2, 1 /) )
+                   CALL handle_netcdf_error( 'data_output_2d', 452 )
 #endif
 #endif
                    do2d_yz_n = do2d_yz_n + 1
-!
-!--                Write LOCAL-parameter set for ISO2D.
-                   IF ( myid == 0  .AND.  iso2d_output )  THEN
-                      IF ( section(is,s) /= -1 )  THEN
-                         WRITE ( section_chr, '(''x = '',F8.2,'' m  (GP '',I3, &
-                                               &'')'')'                        &
-                               )  section(is,s)*dx, section(is,s)
-                      ELSE
-                         section_chr = 'averaged along x'
-                      ENDIF
-                      IF ( av == 0 )  THEN
-                         rtext = TRIM( do2d(av,if) ) // '  t = ' //            &
-                                 TRIM( simulated_time_chr ) // '  ' //         &
-                                 TRIM( section_chr )
-                      ELSE
-                         rtext = TRIM( do2d(av,if) ) // '  averaged t = ' //   &
-                                 TRIM( simulated_time_chr ) // '  ' //         &
-                                 TRIM( section_chr )
-                      ENDIF
-                      WRITE (29,LOCAL)
-                   ENDIF
 
              END SELECT
@@ -1609,5 +1505,5 @@
 !--       the performance of the parallel output.
 #if defined( __netcdf )
-          IF ( netcdf_output .AND. netcdf_data_format > 4 )  THEN
+          IF ( netcdf_data_format > 4 )  THEN
 
                 SELECT CASE ( mode )
