Changeset 4069 for palm/trunk/SOURCE


Ignore:
Timestamp:
Jul 1, 2019 2:05:51 PM (2 years ago)
Author:
Giersch
Message:

Bugfix for masked output, compiler warning removed, test case for wind turbine model revised

Location:
palm/trunk/SOURCE
Files:
15 edited

Legend:

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

    r3967 r4069  
    2525! -----------------
    2626! $Id$
     27! Masked output running index mid has been introduced as a local variable to
     28! avoid runtime error (Loop variable has been modified) in time_integration
     29!
     30! 3967 2019-05-09 16:04:34Z gronemeier
    2731! Save binary data of virtual measurements within separate folder
    2832!
     
    189193    USE control_parameters,                                                    &
    190194        ONLY:  coupling_char, data_output_2d_on_each_pe,                       &
    191                max_masks, message_string, mid, nz_do3d, openfile,              &
     195               max_masks, message_string, nz_do3d, openfile,              &
    192196               run_description_header
    193197
     
    227231    INTEGER(iwp) ::  file_id     !<
    228232    INTEGER(iwp) ::  ioerr       !< IOSTAT flag for IO-commands ( 0 = no error )
     233    INTEGER(iwp) ::  mid         !< masked output running index
    229234   
    230235    LOGICAL ::  netcdf_extend    !<
  • palm/trunk/SOURCE/check_parameters.f90

    r4048 r4069  
    2525! -----------------
    2626! $Id$
     27! Masked output running index mid has been introduced as a local variable to
     28! avoid runtime error (Loop variable has been modified) in time_integration
     29!
     30! 4048 2019-06-21 21:00:21Z knoop
    2731! Moved tcm_check_data_output to module_interface
    2832!
     
    858862    INTEGER(iwp) ::  k                               !< loop index
    859863    INTEGER(iwp) ::  kk                              !< loop index
     864    INTEGER(iwp) ::  mid                             !< masked output running index
    860865    INTEGER(iwp) ::  netcdf_data_format_save         !< initial value of netcdf_data_format
    861866    INTEGER(iwp) ::  position                        !< index position of string
  • palm/trunk/SOURCE/chemistry_model_mod.f90

    r4029 r4069  
    2727! -----------------
    2828! $Id$
     29! Masked output running index mid has been introduced as a local variable to
     30! avoid runtime error (Loop variable has been modified) in time_integration
     31!
     32! 4029 2019-06-14 14:04:35Z raasch
    2933! nest_chemistry option removed
    3034!
     
    15101514!> Subroutine defining mask output variables for chemical species
    15111515!------------------------------------------------------------------------------!
    1512  SUBROUTINE chem_data_output_mask( av, variable, found, local_pf )
     1516 SUBROUTINE chem_data_output_mask( av, variable, found, local_pf, mid )
    15131517
    15141518
     
    15201524
    15211525    CHARACTER(LEN=5)  ::  grid        !< flag to distinquish between staggered grids
     1526    CHARACTER(LEN=16) ::  spec_name
    15221527    CHARACTER(LEN=*)  ::  variable    !<
    1523     INTEGER(iwp)  ::  av              !< flag to control data output of instantaneous or time-averaged data
    1524     LOGICAL ::  found
    1525     REAL(wp), DIMENSION(mask_size_l(mid,1),mask_size_l(mid,2),mask_size_l(mid,3)) ::  &
    1526               local_pf   !<
    1527 !
    1528 !-- local variables.
    1529     CHARACTER(LEN=16)  ::  spec_name
     1528   
     1529    INTEGER(iwp) ::  av              !< flag to control data output of instantaneous or time-averaged data
    15301530    INTEGER(iwp) ::  lsp
    15311531    INTEGER(iwp) ::  i               !< grid index along x-direction
    15321532    INTEGER(iwp) ::  j               !< grid index along y-direction
    15331533    INTEGER(iwp) ::  k               !< grid index along z-direction
     1534    INTEGER(iwp) ::  mid             !< masked output running index
    15341535    INTEGER(iwp) ::  topo_top_ind    !< k index of highest horizontal surface
     1536   
     1537    LOGICAL ::  found
     1538   
     1539    REAL(wp), DIMENSION(mask_size_l(mid,1),mask_size_l(mid,2),mask_size_l(mid,3)) ::  &
     1540              local_pf   !<
     1541!
     1542!-- local variables.
    15351543
    15361544    found = .TRUE.
  • palm/trunk/SOURCE/close_file.f90

    r3655 r4069  
    2525! -----------------
    2626! $Id$
     27! Masked output running index mid has been introduced as a local variable to
     28! avoid runtime error (Loop variable has been modified) in time_integration
     29!
     30! 3655 2019-01-07 16:51:22Z knoop
    2731! unused variables and format statements removed
    2832!
     
    9498
    9599    USE control_parameters,                                                    &
    96         ONLY:  max_masks, mid, openfile
     100        ONLY:  max_masks, openfile
    97101               
    98102    USE kinds
     
    119123    INTEGER(iwp) ::  fid          !<
    120124    INTEGER(iwp) ::  file_id      !<
     125    INTEGER(iwp) ::  mid          !< masked output running index
    121126    INTEGER(iwp) ::  planz        !<
    122127
  • palm/trunk/SOURCE/data_output_mask.f90

    r4039 r4069  
    2525! -----------------
    2626! $Id$
     27! Masked output running index mid has been introduced as a local variable to
     28! avoid runtime error (Loop variable has been modified) in time_integration
     29!
     30! 4039 2019-06-18 10:32:41Z suehring
    2731! Modularize diagnostic output
    2832!
     
    156160!> Masked data output in netCDF format for current mask (current value of mid).
    157161!------------------------------------------------------------------------------!
    158  SUBROUTINE data_output_mask( av )
     162 SUBROUTINE data_output_mask( av, mid )
    159163
    160164 
     
    180184               mask_j, mask_k, mask_size, mask_size_l, mask_start_l,           &
    181185               mask_surface,                                                   &
    182                max_masks, message_string, mid, nz_do3d, salsa,                 &
     186               max_masks, message_string, nz_do3d, salsa,                      &
    183187               time_since_reference_point
    184188
     
    229233    INTEGER(iwp) ::  k                       !< loop index
    230234    INTEGER(iwp) ::  kk                      !< vertical index
     235    INTEGER(iwp) ::  mid                     !< masked output running index
    231236    INTEGER(iwp) ::  n                       !< loop index
    232237    INTEGER(iwp) ::  netcdf_data_format_save !< value of netcdf_data_format
     
    686691             IF ( radiation )  THEN
    687692                CALL radiation_data_output_mask(av, domask(mid,av,ivar), found,&
    688                                                 local_pf )
     693                                                local_pf, mid )
    689694             ENDIF
    690695
    691696             IF ( air_chemistry )  THEN
    692697                CALL chem_data_output_mask(av, domask(mid,av,ivar), found,     &
    693                                            local_pf )
     698                                           local_pf, mid )
    694699             ENDIF
    695700!
    696701!--          Check for diagnostic quantities
    697              CALL doq_output_mask( av, domask(mid,av,ivar), found, local_pf )
     702             CALL doq_output_mask( av, domask(mid,av,ivar), found, local_pf,   &
     703                                   mid)
    698704!
    699705!--          SALSA quantities
    700706             IF (  salsa )  THEN
    701707                CALL salsa_data_output_mask( av, domask(mid,av,ivar), found,   &
    702                                              local_pf )
     708                                             local_pf, mid )
    703709             ENDIF         
    704710!
     
    706712             IF ( .NOT. found )  THEN
    707713                CALL user_data_output_mask(av, domask(mid,av,ivar), found,     &
    708                                            local_pf )
     714                                           local_pf, mid )
    709715             ENDIF
    710716
  • palm/trunk/SOURCE/diagnostic_output_quantities_mod.f90

    r4039 r4069  
    2525! -----------------
    2626! $Id$
     27! Masked output running index mid has been introduced as a local variable to
     28! avoid runtime error (Loop variable has been modified) in time_integration
     29!
     30! 4039 2019-06-18 10:32:41Z suehring
    2731! - Add output of uu, vv, ww to enable variance calculation according temporal
    2832!   EC method
     
    679683!> temporary array with indices (i,j,k) for masked data output.
    680684!------------------------------------------------------------------------------!
    681  SUBROUTINE doq_output_mask( av, variable, found, local_pf )
     685 SUBROUTINE doq_output_mask( av, variable, found, local_pf, mid )
    682686 
    683687    USE control_parameters
     
    698702    INTEGER(iwp) ::  j            !< index variable along y-direction
    699703    INTEGER(iwp) ::  k            !< index variable along z-direction
     704    INTEGER(iwp) ::  mid          !< masked output running index
    700705    INTEGER(iwp) ::  topo_top_ind !< k index of highest horizontal surface
    701706
     
    965970
    966971    USE control_parameters,                                                    &
    967         ONLY:  do2d, do3d, domask, masks, mid
     972        ONLY:  do2d, do3d, domask, masks
    968973
    969974    IMPLICIT NONE
     
    976981    INTEGER(iwp) ::  ivar_all   !< loop index
    977982    INTEGER(iwp) ::  l          !< index for cutting string
     983    INTEGER(iwp) ::  mid          !< masked output running index
    978984
    979985    prepared_diagnostic_output_quantities = .FALSE.
  • palm/trunk/SOURCE/fft_xy_mod.f90

    r3655 r4069  
    2525! -----------------
    2626! $Id$
     27! Code added to avoid compiler warnings
     28!
     29! 3655 2019-01-07 16:51:22Z knoop
    2730! OpenACC port for SPEC
    2831!
     
    457460       REAL(wp), DIMENSION(0:nx,nys_x:nyn_x,nzb_x:nzt_x) ::                    &
    458461          ar      !<
     462
     463!
     464!--    To avoid compiler warning: Unused dummy argument ‘ar_2d’
     465       IF ( PRESENT( ar_2d ) )  CONTINUE
    459466
    460467       IF ( direction == 'forward' )  THEN
  • palm/trunk/SOURCE/header.f90

    r4023 r4069  
    2525! -----------------
    2626! $Id$
     27! Masked output running index mid has been introduced as a local variable to
     28! avoid runtime error (Loop variable has been modified) in time_integration
     29!
     30! 4023 2019-06-12 13:20:01Z maronga
    2731! Renamed "coupling start time" to "spinup time"
    2832!
     
    541545    INTEGER(iwp) ::  l              !< substring length
    542546    INTEGER(iwp) ::  ll             !< substring length
     547    INTEGER(iwp) ::  mid            !< masked output running index
    543548    INTEGER(iwp) ::  my_cpl_id      !< run id in a nested model setup
    544549    INTEGER(iwp) ::  n              !< running index over number of couplers in a nested model setup
  • palm/trunk/SOURCE/init_masks.f90

    r3766 r4069  
    2525! -----------------
    2626! $Id$
     27! Masked output running index mid has been introduced as a local variable to
     28! avoid runtime error (Loop variable has been modified) in time_integration
     29!
     30! 3766 2019-02-26 16:23:41Z raasch
    2731! unused variables removed
    2832!
     
    178182               mask_surface, mask_x,                                           &
    179183               mask_x_loop, mask_xyz_dimension, mask_y, mask_y_loop, mask_z,   &
    180                mask_z_loop, max_masks,  message_string, mid,                   &
     184               mask_z_loop, max_masks,  message_string,                        &
    181185               passive_scalar, ocean_mode, varnamelength
    182186
     
    216220    INTEGER(iwp) ::  k            !< loop index
    217221    INTEGER(iwp) ::  m            !< mask index
     222    INTEGER(iwp) ::  mid            !< masked output running index
    218223    INTEGER(iwp) ::  n            !< loop index
    219224    INTEGER(iwp) ::  sender       !< PE id of sending PE
  • palm/trunk/SOURCE/modules.f90

    r4017 r4069  
    2525! -----------------
    2626! $Id$
     27! Masked output running index mid has been introduced as a local variable to
     28! avoid runtime error (Loop variable has been modified) in time_integration
     29!
     30! 4017 2019-06-06 12:16:46Z schwenkel
    2731! increase maximum number of virtual flights
    2832!
     
    12261230    INTEGER(iwp) ::  mg_cycles = 4                     !< namelist parameter
    12271231    INTEGER(iwp) ::  mg_switch_to_pe0_level = -1       !< namelist parameter
    1228     INTEGER(iwp) ::  mid                               !< masked output running index
    12291232    INTEGER(iwp) ::  ngsrb = 2                         !< namelist parameter
    12301233    INTEGER(iwp) ::  nr_timesteps_this_run = 0         !< number of timesteps (cpu time measurements)
  • palm/trunk/SOURCE/netcdf_interface_mod.f90

    r4046 r4069  
    2525! -----------------
    2626! $Id$
     27! Masked output running index mid has been introduced as a local variable to
     28! avoid runtime error (Loop variable has been modified) in time_integration
     29!
     30! 4046 2019-06-21 17:32:04Z knoop
    2731! removal of special treatment for usm_define_netcdf_grid call
    2832!
     
    697701               mask_size_l, mask_i, mask_i_global, mask_j, mask_j_global,      &
    698702               mask_k_global, mask_surface,                                    &
    699                message_string, mid, ntdim_2d_xy, ntdim_2d_xz,                  &
     703               message_string, ntdim_2d_xy, ntdim_2d_xz,                       &
    700704               ntdim_2d_yz, ntdim_3d, nz_do3d, ocean_mode, plant_canopy,       &
    701705               run_description_header, salsa, section, simulated_time,         &
     
    796800    INTEGER(iwp) ::  k                                       !<
    797801    INTEGER(iwp) ::  kk                                      !<
     802    INTEGER(iwp) ::  mid                                     !< masked output running index
    798803    INTEGER(iwp) ::  ns                                      !<
    799804    INTEGER(iwp) ::  ns_do                                   !< actual value of ns for soil model data
  • palm/trunk/SOURCE/radiation_model_mod.f90

    r4067 r4069  
    2828! -----------------
    2929! $Id$
     30! Masked output running index mid has been introduced as a local variable to
     31! avoid runtime error (Loop variable has been modified) in time_integration
     32!
     33! 4067 2019-07-01 13:29:25Z suehring
    3034! Bugfix, pass dummy string to MPI_INFO_SET (J. Resler)
    3135!
     
    1110111105!> Subroutine defining masked data output
    1110211106!------------------------------------------------------------------------------!
    11103  SUBROUTINE radiation_data_output_mask( av, variable, found, local_pf )
     11107 SUBROUTINE radiation_data_output_mask( av, variable, found, local_pf, mid )
    1110411108 
    1110511109    USE control_parameters
     
    1112011124    INTEGER(iwp) ::  j               !<
    1112111125    INTEGER(iwp) ::  k               !<
     11126    INTEGER(iwp) ::  mid             !< masked output running index
    1112211127    INTEGER(iwp) ::  topo_top_ind    !< k index of highest horizontal surface
    1112311128
  • palm/trunk/SOURCE/salsa_mod.f90

    r4058 r4069  
    2626! -----------------
    2727! $Id$
     28! Masked output running index mid has been introduced as a local variable to
     29! avoid runtime error (Loop variable has been modified) in time_integration
     30!
     31! 4058 2019-06-27 15:25:42Z knoop
    2832! Bugfix: to_be_resorted was uninitialized in case of s_H2O in 3d_data_averaging
    2933!
     
    1071610720!> Subroutine defining mask output variables
    1071710721!------------------------------------------------------------------------------!
    10718  SUBROUTINE salsa_data_output_mask( av, variable, found, local_pf )
     10722 SUBROUTINE salsa_data_output_mask( av, variable, found, local_pf, mid )
    1071910723
    1072010724    USE arrays_3d,                                                                                 &
     
    1072210726
    1072310727    USE control_parameters,                                                                        &
    10724         ONLY:  mask_size_l, mask_surface, mid
     10728        ONLY:  mask_size_l, mask_surface
    1072510729
    1072610730    USE surface_mod,                                                                               &
     
    1074010744    INTEGER(iwp) ::  j               !< loop index in y-direction
    1074110745    INTEGER(iwp) ::  k               !< loop index in z-direction
     10746    INTEGER(iwp) ::  mid            !< masked output running index
    1074210747    INTEGER(iwp) ::  topo_top_ind    !< k index of highest horizontal surface
    1074310748
  • palm/trunk/SOURCE/time_integration.f90

    r4064 r4069  
    2525! -----------------
    2626! $Id$
     27! Masked output running index mid has been introduced as a local variable to
     28! avoid runtime error (Loop variable has been modified) in time_integration
     29!
     30! 4064 2019-07-01 05:33:33Z gronemeier
    2731! Moved call to radiation module out of intermediate time loop
    2832!
     
    572576               indoor_model, intermediate_timestep_count, intermediate_timestep_count_max,         &
    573577               land_surface, large_scale_forcing, loop_optimization, lsf_surf, lsf_vert, masks,    &
    574                mid, multi_agent_system_end, multi_agent_system_start, nesting_offline, neutral,    &
     578               multi_agent_system_end, multi_agent_system_start, nesting_offline, neutral,         &
    575579               nr_timesteps_this_run, nudging, ocean_mode, passive_scalar, pt_reference,           &
    576580               pt_slope_offset, random_heatflux, rans_mode, rans_tke_e, run_coupled, salsa,        &
     
    728732    CHARACTER (LEN=9) ::  time_to_string   !<
    729733
    730     INTEGER(iwp)      ::  ib        !< index for aerosol size bins
    731     INTEGER(iwp)      ::  ic        !< index for aerosol mass bins
    732     INTEGER(iwp)      ::  icc       !< additional index for aerosol mass bins
    733     INTEGER(iwp)      ::  ig        !< index for salsa gases
    734     INTEGER(iwp)      ::  lsp
    735     INTEGER(iwp)      ::  lsp_usr   !<
    736     INTEGER(iwp)      ::  n         !< loop counter for chemistry species
     734    INTEGER(iwp) ::  ib        !< index for aerosol size bins
     735    INTEGER(iwp) ::  ic        !< index for aerosol mass bins
     736    INTEGER(iwp) ::  icc       !< additional index for aerosol mass bins
     737    INTEGER(iwp) ::  ig        !< index for salsa gases
     738    INTEGER(iwp) ::  lsp
     739    INTEGER(iwp) ::  lsp_usr   !<
     740    INTEGER(iwp) ::  mid       !< masked output running index
     741    INTEGER(iwp) ::  n         !< loop counter for chemistry species
    737742
    738743    REAL(wp) ::  dt_3d_old  !< temporary storage of timestep to be used for
     
    18701875                CALL doq_calculate
    18711876
    1872              CALL data_output_mask( 0 )
     1877             CALL data_output_mask( 0, mid )
    18731878             time_domask(mid) = MOD( time_domask(mid), MAX( dt_domask(mid), dt_3d ) )
    18741879          ENDIF
     
    18901895          CALL data_output_3d( 1 )
    18911896          DO  mid = 1, masks
    1892              CALL data_output_mask( 1 )
     1897             CALL data_output_mask( 1, mid )
    18931898          ENDDO
    18941899          time_do_av = MOD( time_do_av, MAX( dt_data_output_av, dt_3d ) )
  • palm/trunk/SOURCE/user_data_output_mask.f90

    r3768 r4069  
    2525! -----------------
    2626! $Id$
     27! Masked output running index mid has been introduced as a local variable to
     28! avoid runtime error (Loop variable has been modified) in time_integration
     29!
     30! 3768 2019-02-27 14:35:58Z raasch
    2731! variables commented + statement added to avoid compiler warnings about unused variables
    2832!
     
    5963!> temporary array with indices (i,j,k) for masked data output.
    6064!------------------------------------------------------------------------------!
    61  SUBROUTINE user_data_output_mask( av, variable, found, local_pf )
     65 SUBROUTINE user_data_output_mask( av, variable, found, local_pf, mid )
    6266 
    6367
     
    7983
    8084    INTEGER(iwp) ::  av             !<
     85    INTEGER(iwp) ::  mid            !< masked output running index
    8186!    INTEGER(iwp) ::  i              !<
    8287!    INTEGER(iwp) ::  j              !<
Note: See TracChangeset for help on using the changeset viewer.