Ignore:
Timestamp:
Jan 15, 2021 3:22:11 PM (3 years ago)
Author:
raasch
Message:

local namelist parameter added to switch off the module although the respective module namelist appears in the namelist file, further copyright updates

File:
1 edited

Legend:

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

    r4828 r4843  
    2525! -----------------
    2626! $Id$
     27! local namelist parameter added to switch off the module although the respective module namelist
     28! appears in the namelist file
     29!
     30! 4828 2021-01-05 11:21:41Z Giersch
    2731! Canopy-restricted anterpolation introduced. New namelist parameter anterpolation_starting_height
    2832! introduced for controlling canopy-restricted anterpolation.
     
    445449    INTEGER(iwp) ::  bad_llcorner  !<
    446450    INTEGER(iwp) ::  i             !<
    447     INTEGER(iwp) ::  istat         !<
     451    INTEGER(iwp) ::  io_status     !<
     452
     453    LOGICAL ::  switch_off_module = .FALSE.  !< local namelist parameter to switch off the module
     454                                             !< although the respective module namelist appears in
     455                                             !< the namelist file
    448456
    449457    TYPE(pmc_layout), DIMENSION(pmc_max_models) ::  domain_layouts  !<
    450458
    451     NAMELIST /nesting_parameters/  domain_layouts,                                                 &
     459    NAMELIST /nesting_parameters/  anterpolation_buffer_width,                                     &
     460                                   anterpolation_starting_height,                                  &
     461                                   domain_layouts,                                                 &
    452462                                   nesting_datatransfer_mode,                                      &
    453463                                   nesting_mode,                                                   &
    454                                    anterpolation_buffer_width,                                     &
    455                                    anterpolation_starting_height
     464                                   switch_off_module
     465
    456466
    457467!
     
    460470    m_ncpl =   0
    461471
    462     pmc_status = pmc_status_ok
     472    pmc_status = pmc_no_namelist_found
    463473!
    464474!-- Open the NAMELIST-file and read the nesting layout
    465475    CALL check_open( 11 )
    466     READ ( 11, nesting_parameters, IOSTAT = istat )
     476    READ ( 11, nesting_parameters, IOSTAT = io_status )
    467477!
    468478!-- Set filepointer to the beginning of the file. Otherwise process 0 will later be unable to read
     
    470480    REWIND ( 11 )
    471481
    472     IF ( istat < 0 )  THEN
     482    IF ( io_status == 0 )  THEN
     483!
     484!--    nesting_parameters namelist was found and read correctly. Enable the nesting by setting
     485!--    the palm model coupler status respectively.
     486       IF ( .NOT. switch_off_module )  THEN
     487          pmc_status = pmc_status_ok
     488       ELSE
     489          RETURN
     490       ENDIF
     491    ELSEIF ( io_status < 0 )  THEN
    473492!
    474493!--    No nesting_parameters-NAMELIST found
    475        pmc_status = pmc_no_namelist_found
    476494       RETURN
    477     ELSEIF ( istat > 0 )  THEN
     495    ELSEIF ( io_status > 0 )  THEN
    478496!
    479497!--    Errors in reading nesting_parameters-NAMELIST
     
    481499       RETURN
    482500    ENDIF
     501
    483502!
    484503!-- Output location message
Note: See TracChangeset for help on using the changeset viewer.