Changeset 2801 for palm/trunk/SOURCE/pmc_general_mod.f90
- Timestamp:
- Feb 14, 2018 4:01:55 PM (7 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
palm/trunk/SOURCE/pmc_general_mod.f90
r2718 r2801 26 26 ! ----------------- 27 27 ! $Id$ 28 ! Introduce particle transfer in nested models. 29 ! 30 ! 2718 2018-01-02 08:49:38Z maronga 28 31 ! Corrected "Former revisions" section 29 32 ! … … 88 91 SAVE 89 92 90 INTEGER , PARAMETER, PUBLIC :: da_desclen = 8 !<91 INTEGER , PARAMETER, PUBLIC :: da_namelen = 16 !<92 INTEGER , PARAMETER, PUBLIC :: pmc_da_name_err = 10 !<93 INTEGER , PARAMETER, PUBLIC :: pmc_max_array = 32 !< max # of arrays which can be coupled94 INTEGER , PARAMETER, PUBLIC :: pmc_max_models = 64 !<95 INTEGER , PARAMETER, PUBLIC :: pmc_status_ok = 0 !<96 INTEGER , PARAMETER, PUBLIC :: pmc_status_error = -1 !<93 INTEGER(iwp), PARAMETER, PUBLIC :: da_desclen = 8 !< 94 INTEGER(iwp), PARAMETER, PUBLIC :: da_namelen = 16 !< 95 INTEGER(iwp), PARAMETER, PUBLIC :: pmc_da_name_err = 10 !< 96 INTEGER(iwp), PARAMETER, PUBLIC :: pmc_max_array = 32 !< max # of arrays which can be coupled 97 INTEGER(iwp), PARAMETER, PUBLIC :: pmc_max_models = 64 !< 98 INTEGER(iwp), PARAMETER, PUBLIC :: pmc_status_ok = 0 !< 99 INTEGER(iwp), PARAMETER, PUBLIC :: pmc_status_error = -1 !< 97 100 98 101 99 102 TYPE, PUBLIC :: xy_ind !< pair of indices in horizontal plane 100 INTEGER :: i101 INTEGER :: j103 INTEGER(iwp) :: i 104 INTEGER(iwp) :: j 102 105 END TYPE 103 106 104 107 TYPE, PUBLIC :: arraydef 105 INTEGER :: coupleindex !< 106 INTEGER :: nrdims !< number of dimensions 107 INTEGER, DIMENSION(4) :: a_dim !< size of dimensions 108 INTEGER(iwp) :: coupleindex !< 109 INTEGER(iwp) :: nrdims !< number of dimensions 110 INTEGER(iwp) :: dimkey !< key for NR dimensions and array type 111 INTEGER(iwp), DIMENSION(4) :: a_dim !< size of dimensions 108 112 TYPE(C_PTR) :: data !< pointer of data in parent space 109 113 TYPE(C_PTR), DIMENSION(2) :: po_data !< base pointers, … … 112 116 INTEGER(idp) :: SendIndex !< index in send buffer 113 117 INTEGER(idp) :: RecvIndex !< index in receive buffer 114 INTEGER 115 INTEGER 118 INTEGER(iwp) :: SendSize !< size in send buffer 119 INTEGER(iwp) :: RecvSize !< size in receive buffer 116 120 TYPE(C_PTR) :: SendBuf !< data pointer in send buffer 117 121 TYPE(C_PTR) :: RecvBuf !< data pointer in receive buffer … … 123 127 124 128 TYPE, PUBLIC :: pedef 125 INTEGER :: nr_arrays = 0 !< number of arrays which will be transfered126 INTEGER :: nrele !< number of elements, same for all arrays129 INTEGER(iwp) :: nr_arrays = 0 !< number of arrays which will be transfered 130 INTEGER(iwp) :: nrele !< number of elements, same for all arrays 127 131 TYPE(xy_ind), POINTER, DIMENSION(:) :: locInd !< xy index local array for remote PE 128 132 TYPE(arraydef), POINTER, DIMENSION(:) :: array_list !< list of data arrays to be transfered … … 131 135 TYPE, PUBLIC :: childdef 132 136 INTEGER(idp) :: totalbuffersize !< 133 INTEGER 134 INTEGER 135 INTEGER 136 INTEGER 137 INTEGER 138 INTEGER 139 INTEGER 140 INTEGER 137 INTEGER(iwp) :: model_comm !< communicator of this model 138 INTEGER(iwp) :: inter_comm !< inter communicator model and child 139 INTEGER(iwp) :: intra_comm !< intra communicator model and child 140 INTEGER(iwp) :: model_rank !< rank of this model 141 INTEGER(iwp) :: model_npes !< number of PEs this model 142 INTEGER(iwp) :: inter_npes !< number of PEs child model 143 INTEGER(iwp) :: intra_rank !< rank within intra_comm 144 INTEGER(iwp) :: win_parent_child !< MPI RMA for preparing data on parent AND child side 141 145 TYPE(pedef), DIMENSION(:), POINTER :: pes !< list of all child PEs 142 146 END TYPE childdef 143 147 144 148 TYPE, PUBLIC :: da_namedef !< data array name definition 145 INTEGER 149 INTEGER(iwp) :: couple_index !< unique number of array 146 150 CHARACTER(LEN=da_desclen) :: parentdesc !< parent array description 147 151 CHARACTER(LEN=da_namelen) :: nameonparent !< name of array within parent … … 168 172 IMPLICIT NONE 169 173 170 CHARACTER(LEN=*) 171 INTEGER , INTENT(IN):: couple_index !<172 TYPE(childdef), INTENT(INOUT) 173 174 INTEGER :: i !<174 CHARACTER(LEN=*) :: aname !< 175 INTEGER(iwp), INTENT(IN) :: couple_index !< 176 TYPE(childdef), INTENT(INOUT) :: mychild !< 177 178 INTEGER(iwp) :: i !< 175 179 176 180 TYPE(arraydef), POINTER :: ar !< … … 195 199 IMPLICIT NONE 196 200 197 INTEGER , INTENT(IN) :: sort_ind198 INTEGER , DIMENSION(:,:), INTENT(INOUT) :: array199 200 INTEGER :: i !<201 INTEGER :: j !<202 INTEGER :: n !<203 204 INTEGER , DIMENSION(SIZE(array,1)) :: tmp !<201 INTEGER(iwp), INTENT(IN) :: sort_ind 202 INTEGER(iwp), DIMENSION(:,:), INTENT(INOUT) :: array 203 204 INTEGER(iwp) :: i !< 205 INTEGER(iwp) :: j !< 206 INTEGER(iwp) :: n !< 207 208 INTEGER(iwp), DIMENSION(SIZE(array,1)) :: tmp !< 205 209 206 210 n = SIZE(array,2)
Note: See TracChangeset
for help on using the changeset viewer.