Changeset 4371 for LMDZ6/trunk/libf
- Timestamp:
- Dec 7, 2022, 2:58:39 PM (2 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
LMDZ6/trunk/libf/dyn3dmem/mod_xios_dyn3dmem.F90
r4146 r4371 29 29 MODULE PROCEDURE writefield_dyn1d_v, writefield_dyn2d_v 30 30 END INTERFACE writefield_dyn_v 31 32 REAL, ALLOCATABLE, SAVE :: NewField_U(:,:,:), NewField_V(:,:,:) 31 33 32 34 … … 63 65 ! 0 Initialisations 64 66 pi = 4. * ATAN (1.) 67 ! allocation of fields passed to xios 68 !$OMP BARRIER 69 !$OMP MASTER 70 allocate(NewField_U(iip1, jj_begin:jj_end, llm)) 71 allocate(NewField_V(iip1, jj_begin:jj_end, llm)) 72 !$OMP END MASTER 73 !$OMP BARRIER 65 74 66 75 ! 1 Context initialisation … … 151 160 CHARACTER(LEN=*) :: name 152 161 REAL, DIMENSION(ij_begin:ij_end,llm) :: Field 153 REAL, DIMENSION(iip1, jj_begin:jj_end,llm) :: NewField 162 ! REAL, ALLOCATABLE, SAVE :: NewField(:,:,:) 154 163 INTEGER :: i,j,l, count 155 164 156 !$OMP DO SCHEDULE(STATIC,OMP_CHUNK) 165 !!!!!$OMP BARRIER 166 !!!!!$OMP MASTER 167 !!!! allocate(NewField(iip1, jj_begin:jj_end, llm)) 168 !!!!!$OMP END MASTER 169 !!!!!$OMP BARRIER 170 171 172 !$OMP DO SCHEDULE(STATIC,OMP_CHUNK) 157 173 DO l = 1, llm 158 NewField (:,jj_begin:jj_end,l)=reshape(Field(ij_begin:ij_end,l),(/iip1,jj_nb/))174 NewField_U(:,jj_begin:jj_end,l)=reshape(Field(ij_begin:ij_end,l),(/iip1,jj_nb/)) 159 175 ENDDO 160 176 !$OMP ENDDO … … 162 178 163 179 !$OMP MASTER 164 !! write(14,*)'iip1,ij_begin,ij_end,llm,jj_begin,jj_end,jj_nb ',iip1,ij_begin,ij_end,llm,jj_begin,jj_end,jj_nb 165 166 CALL xios_send_field(name, NewField) 167 !$OMP END MASTER180 CALL xios_send_field(name, NewField_U) 181 !!!! DEALLOCATE(NewField) 182 !$OMP END MASTER 183 !$OMP BARRIER 168 184 169 185 END SUBROUTINE writefield_dyn2d_u … … 207 223 CHARACTER(LEN=*) :: name 208 224 REAL, DIMENSION(ij_begin:ij_end,llm) :: Field 209 REAL, DIMENSION(iip1, jj_begin:jj_end,llm) :: NewField 225 !!!! REAL, ALLOCATABLE, SAVE :: NewField(:,:,:) 210 226 INTEGER :: l, jje, ije, jjn 227 228 !!!!!$OMP BARRIER 229 !!!!!$OMP MASTER 230 !!!! allocate(NewField(iip1, jj_begin:jj_end,llm)) 231 !!!!!$OMP END MASTER 232 !!!!!$OMP BARRIER 211 233 212 234 IF (pole_sud) THEN … … 223 245 !$OMP DO SCHEDULE(STATIC,OMP_CHUNK) 224 246 DO l = 1, llm 225 NewField (:,jj_begin:jje,l)=reshape(Field(ij_begin:ije,l),(/iip1,jjn/))247 NewField_V(:,jj_begin:jje,l)=reshape(Field(ij_begin:ije,l),(/iip1,jjn/)) 226 248 ENDDO 227 249 !$OMP ENDDO 228 229 250 !$OMP BARRIER 230 !$OMP MASTER 231 CALL xios_send_field(name, NewField(:,jj_begin:jje,:)) 232 !$OMP END MASTER 251 252 !$OMP MASTER 253 CALL xios_send_field(name, NewField_V(:,jj_begin:jje,:)) 254 !!!! DEALLOCATE(NewField) 255 !$OMP END MASTER 256 !$OMP BARRIER 233 257 234 258 END SUBROUTINE writefield_dyn2d_v
Note: See TracChangeset
for help on using the changeset viewer.