Changeset 2113 for palm/trunk/SOURCE


Ignore:
Timestamp:
Jan 12, 2017 1:40:46 PM (7 years ago)
Author:
kanani
Message:

cpp switch mpi3 added for MPI-3 standard code

File:
1 edited

Legend:

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

    r2101 r2113  
    1515! PALM. If not, see <http://www.gnu.org/licenses/>.
    1616!
    17 ! Copyright 2015-2016 Czech Technical University in Prague
     17! Copyright 2015-2017 Czech Technical University in Prague
    1818! Copyright 1997-2017 Leibniz Universitaet Hannover
    1919!--------------------------------------------------------------------------------!
     
    2121! Current revisions:
    2222! ------------------
    23 !
     23! cpp switch __mpi3 added for MPI-3 standard code (Ketelsen)
    2424!
    2525! Former revisions:
     
    14861486        CALL location_message( '    calculation of SVF and CSF', .TRUE. )
    14871487
     1488#if defined( __mpi3 )
    14881489!--     precalculate face areas for different face directions using normal vector
    14891490        DO d = 0, 9
     
    19601961        CALL message( 'init_urban_surface', 'PA0502', 2, 2, 0, 6, 0 )
    19611962       
     1963#endif
    19621964    END SUBROUTINE usm_calc_svf
    19631965
     
    26352637        REAL(wp)     ::  c, d, tin, exn
    26362638       
     2639
    26372640        CALL cpu_log( log_point_s(78), 'usm_init', 'start' )
    26382641!--     surface forcing have to be disabled for LSF
     
    27382741       
    27392742        CALL cpu_log( log_point_s(78), 'usm_init', 'stop' )
    2740        
     2743
    27412744       
    27422745    END SUBROUTINE usm_init_urban_surface
     
    28572860!--    Set flag that indicates that the land surface model is switched on
    28582861       urban_surface = .TRUE.
     2862       
     2863!
     2864!--    Check whether pre-processor (cpp) option "__mpi3" is set. It is required
     2865!--    for the full functionality of the USM. "__mpi3" directive is implemented,
     2866!--    because some compilers cannot handle MPI-3 operations, hence, these parts
     2867!--    of code shall only be compiled if explicitly enabled.
     2868#if ! defined ( __mpi3 )
     2869          message_string = 'urban surface model requires compilation of ' //   &
     2870                           'PALM with pre-processor directive -D__mpi3'
     2871          CALL message( 'usm_parin', 'PA0503', 1, 2, 0, 6, 0 )
     2872#endif
    28592873
    28602874
     
    32033217        REAL(wp), PARAMETER                    :: grow_factor = 1.5_wp !< factor of expansion of grow arrays
    32043218
     3219#if defined( __mpi3 )
    32053220!--     Maximum number of gridboxes visited equals to maximum number of boundaries crossed in each dimension plus one. That's also
    32063221!--     the maximum number of plant canopy boxes written. We grow the acsf array accordingly using exponential factor.
     
    33463361        visible = .TRUE.
    33473362       
     3363#else
     3364        visible      = .FALSE.                          !Set variables to avoid compiler warnimngs
     3365        transparency = 0.0
     3366#endif
    33483367    END SUBROUTINE usm_raytrace
    33493368   
     
    34993518          ENDIF
    35003519#if defined( __parallel )
    3501           CALL MPI_Barrier( comm2d, ierr )
     3520          CALL MPI_BARRIER( comm2d, ierr )
    35023521#endif
    35033522       ENDDO
     
    39143933        REAL(wp)                              :: acoef              !< actual coefficient of diurnal profile of anthropogenic heat
    39153934
     3935#if defined( __mpi3 )
    39163936        dxdir = (/dz,dy,dy,dx,dx/)
    39173937       
     
    41244144       ENDIF
    41254145
     4146#endif
    41264147    END SUBROUTINE usm_surface_energy_balance
    41274148
     
    42494270          ENDIF
    42504271#if defined( __parallel )
    4251           CALL MPI_Barrier( comm2d, ierr )
     4272          CALL MPI_BARRIER( comm2d, ierr )
    42524273#endif
    42534274       ENDDO
Note: See TracChangeset for help on using the changeset viewer.