Changeset 4114 for dynamico_lmdz
- Timestamp:
- Sep 12, 2018, 4:20:27 PM (6 years ago)
- Location:
- dynamico_lmdz/aquaplanet/ICOSA_LMDZ/src
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
dynamico_lmdz/aquaplanet/ICOSA_LMDZ/src/distrib_icosa_lmdz.f90
r3852 r4114 90 90 INTEGER,POINTER :: index(:) 91 91 92 !$OMP BARRIER 92 93 pos=0 93 94 DO ind=1,ndomain_distrib … … 114 115 INTEGER :: l 115 116 117 !$OMP BARRIER 116 118 DO l=1,size(field_lmdz,2) 117 119 pos=0 … … 141 143 INTEGER :: l,q 142 144 145 !$OMP BARRIER 143 146 DO q=1,size(field_lmdz,3) 144 147 DO l=1,size(field_lmdz,2) … … 167 170 INTEGER,POINTER :: index(:) 168 171 172 !$OMP BARRIER 169 173 pos=0 170 174 DO ind=1,ndomain_distrib … … 189 193 INTEGER :: l 190 194 195 !$OMP BARRIER 191 196 DO l=1,size(field_lmdz,2) 192 197 pos=0 … … 215 220 INTEGER :: l,q 216 221 222 !$OMP BARRIER 217 223 DO q=1,size(field_lmdz,3) 218 224 DO l=1,size(field_lmdz,2) -
dynamico_lmdz/aquaplanet/ICOSA_LMDZ/src/phylmd/interface_icosa_lmdz.f90
r4047 r4114 29 29 INTEGER :: stop_clock 30 30 INTEGER :: count_clock=0 31 32 ! REAL,SAVE :: day_length ! length of a day (s)33 31 34 32 INTEGER,SAVE :: nbp_phys … … 189 187 190 188 INTEGER :: run_length 191 REAL ,SAVE :: day_length ! length of a day (s) ! SAVEd to be OpenMP shared192 INTEGER ,SAVE:: annee_ref193 INTEGER ,SAVE:: day_ref189 REAL :: day_length ! length of a day (s) ! SAVEd to be OpenMP shared <--- NO!!!! 190 INTEGER :: annee_ref 191 INTEGER :: day_ref 194 192 INTEGER :: day_ini 195 193 REAL :: start_time … … 198 196 ! Tracer stuff (SAVEd when needed to be OpenMP shared) 199 197 INTEGER :: nq 200 INTEGER ,SAVE:: nqo, nbtr201 CHARACTER(len=4) ,SAVE:: type_trac202 CHARACTER(len=20),ALLOCATABLE ,SAVE:: tname(:) ! tracer short name for restart and diagnostics198 INTEGER :: nqo, nbtr 199 CHARACTER(len=4) :: type_trac 200 CHARACTER(len=20),ALLOCATABLE :: tname(:) ! tracer short name for restart and diagnostics 203 201 CHARACTER(len=23),ALLOCATABLE :: ttext(:) ! tracer long name for diagnostics 204 202 INTEGER,ALLOCATABLE :: niadv(:) ! equivalent dyn / physique … … 235 233 INTEGER :: iflag_phys 236 234 235 237 236 CALL init_distrib_icosa_lmdz 238 237 … … 264 263 ENDDO 265 264 266 !$OMP BARRIER 267 265 268 266 CALL transfer_icosa_to_lmdz(f_ind_cell_glo,ind_cell_glo) 269 267 CALL deallocate_field(f_ind_cell_glo) … … 280 278 281 279 ! Initialize tracer names, numbers, etc. for physics 282 !$OMP MASTER283 280 !Config Key = type_trac 284 281 !Config Desc = Choix de couplage avec model de chimie INCA ou REPROBUS … … 290 287 type_trac = 'lmdz' 291 288 CALL getin('type_trac',type_trac) 292 !$OMP END MASTER293 !$OMP BARRIER294 289 295 290 ! allocate some of the tracer arrays … … 299 294 300 295 ! read "traceur.def" file to know tracer names (and figure out nqo and nbtr) 301 !$OMP MASTER 302 OPEN(unit=42,file="traceur.def",form="formatted",status="old",iostat=ierr) 303 IF (ierr==0) THEN 304 READ(42,*) nq ! should be the same as nqtot 305 IF (nq /= nqtot) THEN 306 WRITE(*,*) "Error: number of tracers in tracer.def should match nqtot!" 307 WRITE(*,*) " will just use nqtot=",nqtot," tracers" 296 IF (is_mpi_root) THEN 297 !$OMP MASTER 298 OPEN(unit=42,file="traceur.def",form="formatted",status="old",iostat=ierr) 299 IF (ierr==0) THEN 300 READ(42,*) nq ! should be the same as nqtot 301 IF (nq /= nqtot) THEN 302 WRITE(*,*) "Error: number of tracers in tracer.def should match nqtot!" 303 WRITE(*,*) " will just use nqtot=",nqtot," tracers" 304 ENDIF 305 DO i=1,nqtot 306 READ(42,*) j,k,tname(i) 307 ENDDO 308 CLOSE(42) 308 309 ENDIF 310 ! figure out how many water tracers are present 311 nqo=0 309 312 DO i=1,nqtot 310 READ(42,*) j,k,tname(i) 311 ENDDO 312 CLOSE(42) 313 IF (INDEX(tname(i),"H2O")==1) THEN 314 nqo=nqo+1 315 ENDIF 316 ENDDO 317 nbtr=nqtot-nqo 318 !$OMP END MASTER 313 319 ENDIF 314 ! figure out how many water tracers are present 315 nqo=0 320 321 CALL bcast(nqo) 322 CALL bcast(nbtr) 316 323 DO i=1,nqtot 317 IF (INDEX(tname(i),"H2O")==1) THEN 318 nqo=nqo+1 319 ENDIF 320 ENDDO 321 nbtr=nqtot-nqo 322 !$OMP END MASTER 323 !$OMP BARRIER 324 324 CALL bcast(tname(i)) 325 ENDDO 326 325 327 ALLOCATE(conv_flg(nbtr)) 326 328 ALLOCATE(pbl_flg(nbtr)) … … 374 376 375 377 ! Initialize physical constant 376 !$OMP MASTER377 378 day_length=86400 378 379 CALL getin('day_length',day_length) … … 387 388 day_ref=1 388 389 CALL getin("dayref",day_ref) 389 !$OMP END MASTER390 !$OMP BARRIER391 390 392 391 physics_timestep=dt*itau_physics
Note: See TracChangeset
for help on using the changeset viewer.