Index: palm/trunk/UTIL/combine_plot_fields.f90
===================================================================
--- palm/trunk/UTIL/combine_plot_fields.f90	(revision 2410)
+++ palm/trunk/UTIL/combine_plot_fields.f90	(revision 2512)
@@ -25,4 +25,8 @@
 ! -----------------
 ! $Id$
+! PALM output does not contain ghost layer data any more
+! avs- and iso2d-related parts removed, handling of compressed data removed
+! 
+! 2365 2017-08-21 14:59:59Z kanani
 ! Vertical grid nesting implemented (SadiqHuq)
 !
@@ -121,10 +125,8 @@
     INTEGER(iwp), DIMENSION(0:1,1000) ::  id_var, levels
 
-    LOGICAL  ::  avs_output, compressed, found, iso2d_output, netcdf_output,   &
-                 netcdf_parallel, netcdf_0, netcdf_1
+    LOGICAL  ::  found, netcdf_output, netcdf_parallel, netcdf_0, netcdf_1
     LOGICAL  ::  vnest
 
     REAL(wp) ::  cpu_start_time, cpu_end_time, dx, simulated_time
-    REAL(wp),  DIMENSION(:),   ALLOCATABLE   ::  eta, ho, hu
     REAL(wp),  DIMENSION(:,:), ALLOCATABLE   ::  pf, pf_tmp
     REAL(spk), DIMENSION(:,:,:), ALLOCATABLE ::  pf3d, pf3d_tmp
@@ -227,9 +229,4 @@
 
 !
-!--       Inquire whether an iso2d parameter file exists
-          INQUIRE( FILE='PLOT2D_'//modus//'_GLOBAL'//TRIM( model_string ), &
-               EXIST=iso2d_output )
-
-!
 !--       Inquire whether a NetCDF file exists
           INQUIRE( FILE='DATA_2D_'//modus//'_NETCDF'//TRIM( model_string ), &
@@ -387,19 +384,11 @@
 !--                File from PE0 contains special information at the beginning,
 !--                concerning the lower and upper indices of the total-domain
-!--                used in PALM (nxag, nxeg, nyag, nyeg) and the lower and
-!--                upper indices of the array to be written by this routine
-!--                (nxa, nxe, nya, nye). Usually in the horizontal directions
-!--                nxag=-1 and nxa=0 while all other variables have the same
-!--                value (i.e. nxeg=nxe).
+!--                used in PALM (nxa, nxe, nya, nye).
 !--                Allocate necessary arrays, open the output file and write
 !--                the coordinate informations needed by ISO2D.
                    IF ( id == 0  .AND.  fanz(0) == 0  .AND.  fanz(1) == 0 ) THEN
-                      READ ( id+110 )  nxag, nxeg, nyag, nyeg
+
                       READ ( id+110 )  nxa, nxe, nya, nye
-                      ALLOCATE ( eta(nya:nye), ho(nxa:nxe), hu(nxa:nxe), &
-                                 pf(nxag:nxeg,nyag:nyeg) )
-                      READ ( id+110 )  dx, eta, hu, ho
-
-
+                      ALLOCATE ( pf(nxa:nxe,nya:nye) )
 !
 !--                   Set actual domain bounds to total domain
@@ -407,21 +396,9 @@
                       ye_do = nye
 
-                      IF ( iso2d_output )  THEN
-                         OPEN ( 2, FILE='PLOT2D_'//modus//TRIM( model_string ),&
-                                   FORM='UNFORMATTED' )
-                         WRITE ( 2 )  dx, eta, hu, ho
-                      ENDIF
                    ENDIF
 !
 !--                Read output time
                    IF ( netcdf_output  .AND.  id == 0 )  THEN
-                      IF ( netcdf_1 )  THEN
-                         READ ( id+110, END=998 )  simulated_time, time_step, av
-                      ELSE
-!
-!--                      For compatibility with earlier PALM versions
-                         READ ( id+110, END=998 )  simulated_time, time_step
-                         av = 0
-                      ENDIF
+                      READ ( id+110, END=998 )  simulated_time, time_step, av
                    ENDIF
 !
@@ -460,9 +437,5 @@
                 ENDDO
 !
-!--             Write the data of the total domain cross-section
-                IF ( iso2d_output )  WRITE ( 2 )  pf(nxa:nxe,nya:nye)
-       
-!
-!--             Write same data in NetCDF format
+!--             Write data in NetCDF format
                 IF ( netcdf_output )  THEN
 #if defined( __netcdf )
@@ -544,5 +517,5 @@
              ENDDO
              CLOSE ( 2 )
-             DEALLOCATE ( eta, ho, hu, pf )
+             DEALLOCATE ( pf )
 
 !
@@ -598,8 +571,4 @@
        CALL SYSTEM_CLOCK( count, count_rate )
        cpu_start_time = REAL( count ) / REAL( count_rate )
-
-!
-!--    Inquire whether an avs fld file exists
-       INQUIRE( FILE='PLOT3D_FLD'//TRIM( model_string ), EXIST=avs_output )
 
 !
@@ -639,12 +608,6 @@
 
 !
-!--    Combination only works, if data are not compressed. In that case, 
-!--    PALM created a flag file (PLOT3D_COMPRESSED)
-       INQUIRE ( FILE='PLOT3D_COMPRESSED'//TRIM( model_string ), &
-            EXIST=compressed )
-
-!
 !--    Find out the number of files and open them
-       DO  WHILE ( found  .AND.  .NOT. compressed )
+       DO  WHILE ( found )
 
           OPEN ( danz+110, &
@@ -678,9 +641,5 @@
              PRINT*, '    3D-data:     ', danz, ' file(s) found'
           ELSE
-             IF ( found .AND. compressed )  THEN
-                PRINT*, '+++ no 3D-data processing, since data are compressed'
-             ELSE
-                PRINT*, '    no 3D-data file available'
-             ENDIF
+             PRINT*, '    no 3D-data file available'
           ENDIF
        ENDIF
@@ -764,19 +723,11 @@
              DO  id = 0, danz-1
 !
-!--             File from PE0 contains special information at the beginning,
-!--             concerning the lower and upper indices of the total-domain used
-!--             in PALM (nxag, nxeg, nyag, nyeg) and the lower and
-!--             upper indices of the array to be written by this routine (nxa,
-!--             nxe, nya, nye, nza, nze). Usually nxag=-1 and nxa=0, nyag=-1
-!--             and nya=0, nzeg=nz and nze=nz_do3d.
-!--             Allocate necessary array and open the output file.
+!--             File from PE0 contains at the beginning the index bounds 
+!--             of PALM's total domain.
+!--             Allocate the array for storing the total domain data
                 IF ( id == 0  .AND.  fanz(0) == 0  .AND.  fanz(1) == 0 )  THEN
-                   READ ( id+110 )  nxag, nxeg, nyag, nyeg
+!                   READ ( id+110 )  nxag, nxeg, nyag, nyeg
                    READ ( id+110 )  nxa, nxe, nya, nye, nza, nze
                    ALLOCATE ( pf3d(nxa:nxe,nya:nye,nza:nze) )
-                   IF ( avs_output )  THEN
-                      OPEN ( 2, FILE='PLOT3D_DATA'//TRIM( model_string ), &
-                             FORM='UNFORMATTED' )
-                   ENDIF
                 ENDIF
 
@@ -818,9 +769,5 @@
 
 !
-!--          Write data of the total domain
-             IF ( avs_output )  WRITE ( 2 )  pf3d(nxa:nxe,nya:nye,nza:nze)
-       
-!
-!--          Write same data in NetCDF format
+!--          Write data of the total domain in NetCDF format
              IF ( netcdf_output )  THEN
 #if defined( __netcdf )
