Ignore:
Timestamp:
Aug 25, 2020 12:11:17 PM (4 years ago)
Author:
raasch
Message:

files re-formatted to follow the PALM coding standard

File:
1 edited

Legend:

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

    r4629 r4649  
    11 MODULE pmc_general
    22
    3 !------------------------------------------------------------------------------!
     3!--------------------------------------------------------------------------------------------------!
    44! This file is part of the PALM model system.
    55!
    6 ! PALM is free software: you can redistribute it and/or modify it under the
    7 ! terms of the GNU General Public License as published by the Free Software
    8 ! Foundation, either version 3 of the License, or (at your option) any later
    9 ! version.
    10 !
    11 ! PALM is distributed in the hope that it will be useful, but WITHOUT ANY
    12 ! WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
    13 ! A PARTICULAR PURPOSE.  See the GNU General Public License for more details.
    14 !
    15 ! You should have received a copy of the GNU General Public License along with
    16 ! PALM. If not, see <http://www.gnu.org/licenses/>.
     6! PALM is free software: you can redistribute it and/or modify it under the terms of the GNU General
     7! Public License as published by the Free Software Foundation, either version 3 of the License, or
     8! (at your option) any later version.
     9!
     10! PALM is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the
     11! implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General
     12! Public License for more details.
     13!
     14! You should have received a copy of the GNU General Public License along with PALM. If not, see
     15! <http://www.gnu.org/licenses/>.
    1716!
    1817! Copyright 1997-2020 Leibniz Universitaet Hannover
    19 !------------------------------------------------------------------------------!
     18!--------------------------------------------------------------------------------------------------!
     19!
    2020!
    2121! Current revisions:
    22 ! ------------------
     22! -----------------
    2323!
    2424!
     
    2626! -----------------
    2727! $Id$
    28 ! support for MPI Fortran77 interface (mpif.h) removed
    29 !
     28! File re-formatted to follow the PALM coding standard
     29!
     30! 4629 2020-07-29 09:37:56Z raasch
     31! Support for MPI Fortran77 interface (mpif.h) removed
     32!
    3033! 4360 2020-01-07 11:25:50Z suehring
    3134! Corrected "Former revisions" section
     
    3841! 3655 2019-01-07 16:51:22Z knoop
    3942! Determine number of coupled arrays dynamically.
    40 ! 
     43!
    4144! 1762 2016-02-25 12:31:13Z hellstea
    4245! Initial revision by K. Ketelsen
     
    4649!
    4750! Structure definition and utilities of Palm Model Coupler
    48 !------------------------------------------------------------------------------!
     51!--------------------------------------------------------------------------------------------------!
    4952
    5053#if defined( __parallel )
     
    6164    SAVE
    6265
    63     INTEGER(iwp), PUBLIC            :: pmc_max_array          !< max # of arrays which can be coupled - will be determined dynamically in pmc_interface
    64    
    6566    INTEGER(iwp), PARAMETER, PUBLIC :: da_desclen       =  8  !<
    6667    INTEGER(iwp), PARAMETER, PUBLIC :: da_namelen       = 16  !<
     
    7071    INTEGER(iwp), PARAMETER, PUBLIC :: pmc_status_error = -1  !<
    7172
     73    INTEGER(iwp), PUBLIC ::  pmc_max_array  !< max # of arrays which can be coupled
     74                                            !< - will be determined dynamically in pmc_interface
     75
    7276
    7377    TYPE, PUBLIC :: xy_ind  !< pair of indices in horizontal plane
     
    7781
    7882    TYPE, PUBLIC ::  arraydef
    79        INTEGER(iwp)                   :: coupleindex  !<
    80        INTEGER(iwp)                   :: nrdims       !< number of dimensions
    81        INTEGER(iwp)                   :: dimkey       !< key for NR dimensions and array type
    82        INTEGER(iwp), DIMENSION(4)     :: a_dim        !< size of dimensions
    83        TYPE(C_PTR)               :: data         !< pointer of data in parent space
    84        TYPE(C_PTR), DIMENSION(2) :: po_data      !< base pointers,
    85                                                  !< pmc_s_set_active_data_array
    86                                                  !< sets active pointer
    87        INTEGER(idp)              :: SendIndex    !< index in send buffer
    88        INTEGER(idp)              :: RecvIndex    !< index in receive buffer
    89        INTEGER(iwp)              :: SendSize     !< size in send buffer
    90        INTEGER(iwp)              :: RecvSize     !< size in receive buffer
    91        TYPE(C_PTR)               :: SendBuf      !< data pointer in send buffer
    92        TYPE(C_PTR)               :: RecvBuf      !< data pointer in receive buffer
    93        CHARACTER(LEN=da_namelen) :: Name         !< name of array
    94        TYPE(arraydef), POINTER   :: next
     83       CHARACTER(LEN=da_namelen) ::  Name  !< name of array
     84
     85       INTEGER(iwp) ::  coupleindex  !<
     86       INTEGER(iwp) ::  dimkey       !< key for NR dimensions and array type
     87       INTEGER(iwp) ::  nrdims       !< number of dimensions
     88       INTEGER(iwp) ::  RecvSize     !< size in receive buffer
     89       INTEGER(iwp) ::  SendSize     !< size in send buffer
     90
     91       INTEGER(idp) ::  RecvIndex  !< index in receive buffer
     92       INTEGER(idp) ::  SendIndex  !< index in send buffer
     93
     94       INTEGER(iwp), DIMENSION(4) ::  a_dim  !< size of dimensions
     95
     96       TYPE(C_PTR) ::  data     !< pointer of data in parent space
     97       TYPE(C_PTR) ::  SendBuf  !< data pointer in send buffer
     98       TYPE(C_PTR) ::  RecvBuf  !< data pointer in receive buffer
     99
     100       TYPE(arraydef), POINTER ::  next  !<
     101
     102       TYPE(C_PTR), DIMENSION(2) ::  po_data  !< base pointers, pmc_s_set_active_data_array
     103                                              !< sets active pointer
    95104    END TYPE arraydef
    96105
    97     TYPE(arraydef), PUBLIC, POINTER  :: next
     106
     107    TYPE(arraydef), PUBLIC, POINTER  :: next  !<
     108
    98109
    99110    TYPE, PUBLIC ::  pedef
    100111       INTEGER(iwp) :: nr_arrays = 0  !< number of arrays which will be transfered
    101112       INTEGER(iwp) :: nrele          !< number of elements, same for all arrays
     113
     114       TYPE(arraydef), POINTER, DIMENSION(:) ::  array_list  !< list of data arrays to be transfered
    102115       TYPE(xy_ind), POINTER, DIMENSION(:)   ::  locInd      !< xy index local array for remote PE
    103        TYPE(arraydef), POINTER, DIMENSION(:) ::  array_list  !< list of data arrays to be transfered
    104116    END TYPE pedef
    105117
     118
    106119    TYPE, PUBLIC ::  childdef
     120       INTEGER(iwp) ::  inter_comm         !< inter communicator model and child
     121       INTEGER(iwp) ::  inter_npes         !< number of PEs child model
     122       INTEGER(iwp) ::  intra_comm         !< intra communicator model and child
     123       INTEGER(iwp) ::  intra_rank         !< rank within intra_comm
     124       INTEGER(iwp) ::  model_comm         !< communicator of this model
     125       INTEGER(iwp) ::  model_npes         !< number of PEs this model
     126       INTEGER(iwp) ::  model_rank         !< rank of this model
    107127       INTEGER(idp) ::  totalbuffersize    !<
    108        INTEGER(iwp) ::  model_comm         !< communicator of this model
    109        INTEGER(iwp) ::  inter_comm         !< inter communicator model and child
    110        INTEGER(iwp) ::  intra_comm         !< intra communicator model and child
    111        INTEGER(iwp) ::  model_rank         !< rank of this model
    112        INTEGER(iwp) ::  model_npes         !< number of PEs this model
    113        INTEGER(iwp) ::  inter_npes         !< number of PEs child model
    114        INTEGER(iwp) ::  intra_rank         !< rank within intra_comm
    115128       INTEGER(iwp) ::  win_parent_child   !< MPI RMA for preparing data on parent AND child side
    116129       TYPE(pedef), DIMENSION(:), POINTER ::  pes  !< list of all child PEs
    117130    END TYPE childdef
    118131
     132
    119133    TYPE, PUBLIC ::  da_namedef  !< data array name definition
    120        INTEGER(iwp)              ::  couple_index  !< unique number of array
    121        CHARACTER(LEN=da_desclen) ::  parentdesc    !< parent array description
    122        CHARACTER(LEN=da_namelen) ::  nameonparent  !< name of array within parent
    123134       CHARACTER(LEN=da_desclen) ::  childdesc     !< child array description
    124135       CHARACTER(LEN=da_namelen) ::  nameonchild   !< name of array within child
     136       CHARACTER(LEN=da_namelen) ::  nameonparent  !< name of array within parent
     137       CHARACTER(LEN=da_desclen) ::  parentdesc    !< parent array description
     138       INTEGER(iwp)              ::  couple_index  !< unique number of array
    125139    END TYPE da_namedef
    126140
     
    137151 CONTAINS
    138152
    139 
    140    
     153!--------------------------------------------------------------------------------------------------!
     154! Description:
     155! ------------
     156!> @Todo: Missing subroutine description.
     157!--------------------------------------------------------------------------------------------------!
    141158 SUBROUTINE pmc_g_setname( mychild, couple_index, aname )
    142159
     
    144161
    145162    CHARACTER(LEN=*)              ::  aname         !<
     163
    146164    INTEGER(iwp), INTENT(IN)      ::  couple_index  !<
     165
     166    INTEGER(iwp) ::  i  !<
     167
    147168    TYPE(childdef), INTENT(INOUT) ::  mychild       !<
    148 
    149     INTEGER(iwp) ::  i  !<
    150169
    151170    TYPE(pedef), POINTER    ::  ape  !<
     
    164183
    165184
    166 
     185!--------------------------------------------------------------------------------------------------!
     186! Description:
     187! ------------
     188!> @Todo: Missing subroutine description.
     189!--------------------------------------------------------------------------------------------------!
    167190 SUBROUTINE sort_2d_i( array, sort_ind )
    168191
     
    178201    INTEGER(iwp), DIMENSION(SIZE(array,1)) ::  tmp  !<
    179202
    180     n = SIZE(array,2)
     203    n = SIZE( array, 2 )
    181204    DO  j = 1, n-1
    182205       DO  i = j+1, n
Note: See TracChangeset for help on using the changeset viewer.