Ignore:
Timestamp:
Feb 25, 2019 4:54:16 PM (3 years ago)
Author:
suehring
Message:

remove unused variables in surface_data_output_mod and use compiler diretives to declare variables only if netcdf4-output is used

File:
1 edited

Legend:

Unmodified
Added
Removed
  • palm/trunk/SOURCE/surface_data_output_mod.f90

    r3745 r3762  
    2525! -----------------
    2626! $Id$
     27! Remove unused variables and add preprocessor directives for variables that
     28! are used only when netcdf4 is defined
     29!
     30! 3745 2019-02-15 18:57:56Z suehring
    2731! Output of waste_heat and innermost wall flux from indoor model
    2832!
     
    156160   INTEGER(iwp) ::  average_count_surf = 0   !< number of ensemble members used for averaging
    157161   INTEGER(iwp) ::  dosurf_no(0:1) = 0       !< number of surface output quantities
    158 
     162#if defined( __netcdf4_parallel )
    159163   INTEGER(iwp) :: nc_stat                   !< error code for netcdf routines
    160164   INTEGER(iwp) ::  oldmode                  !< save old set-fill-mode of netcdf file (not needed, but required for routine call)
    161165
     166   INTEGER(iwp), DIMENSION(0:1) ::  dosurf_time_count = 0 !< count of output time steps
    162167   INTEGER(iwp), DIMENSION(0:1) ::  id_dim_s_surf         !< netcdf ID for dimension s
    163168   INTEGER(iwp), DIMENSION(0:1) ::  id_dim_time_surf      !< netcdf ID for dimension time
     
    172177   INTEGER(iwp), DIMENSION(0:1) ::  id_var_zenith_surf    !< netcdf ID for variable zenith
    173178   INTEGER(iwp), DIMENSION(0:1) ::  id_var_zs_surf        !< netcdf ID for variable zs
    174    INTEGER(iwp), DIMENSION(0:1) ::  dosurf_time_count = 0 !< count of output time steps
    175179   INTEGER(iwp), DIMENSION(0:1) ::  ntdim_surf            !< number of output time steps
    176180
    177181   INTEGER(iwp), DIMENSION(0:1,300) ::  id_var_dosurf     !< netcdf ID for output variables
     182#endif
    178183
    179184   LOGICAL :: first_output(0:1) = .FALSE.                 !< true if first output was already called
     
    305310
    306311      IMPLICIT NONE
    307 
     312     
     313#if defined( __netcdf4_parallel )
    308314      CHARACTER (LEN=100)  :: filename            !< name of output file
    309315      CHARACTER (LEN=80)   ::  time_average_text  !< string written to file attribute time_avg
     
    311317
    312318      INTEGER(iwp) ::  av                !< flag for averaged (=1) and non-averaged (=0) data
     319#endif
    313320      INTEGER(iwp) ::  i                 !< grid index in x-direction, also running variable for counting non-average data output
    314321      INTEGER(iwp) ::  j                 !< grid index in y-direction, also running variable for counting average data output
     
    328335      REAL(wp) ::  off_x !< grid offset in x-direction between the stored grid index and the actual wall
    329336      REAL(wp) ::  off_y !< grid offset in y-direction between the stored grid index and the actual wall
    330 
     337#if defined( __netcdf4_parallel )
    331338      REAL(wp), DIMENSION(:), ALLOCATABLE ::  netcdf_data_1d  !< dummy array to output 1D data into netcdf file
     339#endif
    332340
    333341!
     
    44934501!> This routine reads the respective restart data.
    44944502!------------------------------------------------------------------------------!
    4495     SUBROUTINE surface_data_output_rrd_local( i, k, nxlf, nxlc, nxl_on_file,   &
    4496                               nxrf, nxrc, nxr_on_file, nynf, nync, nyn_on_file,&
    4497                               nysf, nysc, nys_on_file, found )
     4503    SUBROUTINE surface_data_output_rrd_local( found )
    44984504
    44994505
     
    45034509       IMPLICIT NONE
    45044510
    4505        INTEGER(iwp)       ::  l                 !< index variable for surface type
    4506        INTEGER(iwp)       ::  i                 !< running index over input files
    45074511       INTEGER(iwp)       ::  k                 !< running index over previous input files covering current local domain
    4508        INTEGER(iwp)       ::  ns_h_on_file_usm  !< number of horizontal surface elements (urban type) on file
    4509        INTEGER(iwp)       ::  nxlc              !< index of left boundary on current subdomain
    4510        INTEGER(iwp)       ::  nxlf              !< index of left boundary on former subdomain
    4511        INTEGER(iwp)       ::  nxl_on_file       !< index of left boundary on former local domain
    4512        INTEGER(iwp)       ::  nxrc              !< index of right boundary on current subdomain
    4513        INTEGER(iwp)       ::  nxrf              !< index of right boundary on former subdomain
    4514        INTEGER(iwp)       ::  nxr_on_file       !< index of right boundary on former local domain
    4515        INTEGER(iwp)       ::  nync              !< index of north boundary on current subdomain
    4516        INTEGER(iwp)       ::  nynf              !< index of north boundary on former subdomain
    4517        INTEGER(iwp)       ::  nyn_on_file       !< index of north boundary on former local domain
    4518        INTEGER(iwp)       ::  nysc              !< index of south boundary on current subdomain
    4519        INTEGER(iwp)       ::  nysf              !< index of south boundary on former subdomain
    4520        INTEGER(iwp)       ::  nys_on_file       !< index of south boundary on former local domain
    45214512
    45224513       LOGICAL, INTENT(OUT)  ::  found
Note: See TracChangeset for help on using the changeset viewer.