Changeset 2785 for trunk/ICOSA_LMDZ/src
- Timestamp:
- Aug 3, 2022, 5:07:41 PM (2 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/ICOSA_LMDZ/src/phystd/interface_icosa_lmdz.f90
r2556 r2785 37 37 INTEGER,SAVE :: nbp_phys_glo 38 38 39 CHARACTER(len=30),SAVE,ALLOCATABLE :: tname(:) ! tracer names40 39 REAL,SAVE :: pday ! number of ellapsed sols since Ls=0 41 40 REAL,SAVE :: ptime ! "universal time" as fraction of sol (e.g. 0.5 for noon) … … 204 203 205 204 206 ! INTEGER :: nqo, nbtr207 205 CHARACTER(len=4) :: type_trac 208 ! CHARACTER(len=20),ALLOCATABLE :: tname(:) ! tracer short name for restart and diagnostics 209 ! CHARACTER(len=23),ALLOCATABLE :: ttext(:) ! tracer long name for diagnostics 210 ! INTEGER,ALLOCATABLE :: niadv(:) ! equivalent dyn / physique 211 ! INTEGER,ALLOCATABLE :: conv_flg(:) ! conv_flg(it)=0 : convection desactivated for tracer number it 212 ! INTEGER,ALLOCATABLE :: pbl_flg(:) ! pbl_flg(it)=0 : boundary layer diffusion desactivaded for tracer number it 213 ! CHARACTER(len=8),ALLOCATABLE :: solsym(:) ! tracer name from inca 206 214 207 TYPE(t_field),POINTER,SAVE :: f_ind_cell_glo(:) 215 208 216 209 INTEGER :: iflag_phys 217 210 INTEGER :: nq 211 character(len=500) :: tracline ! to read traceur.def file 218 212 219 213 !! to get starting date … … 285 279 CALL getin('type_trac',type_trac) 286 280 287 ! init model for standard lmdz case 288 ! nqo=2 289 ! nbtr=2 290 !$OMP MASTER 291 ALLOCATE(tname(nqtot)) 292 !$OMP END MASTER 293 !$OMP BARRIER 294 ! ALLOCATE(ttext(nqtot)) 295 ! ALLOCATE(niadv(nqtot)) 296 ! ALLOCATE(conv_flg(nbtr)) 297 ! ALLOCATE(pbl_flg(nbtr)) 298 ! ALLOCATE(solsym(nbtr)) 299 300 301 ! read tname() from traceur.def file 281 282 ! read nq from traceur.def file 283 ! We allow to read the Modern-trac-V1 as well to get nqtot 302 284 IF (is_mpi_root) THEN 303 285 !$OMP MASTER 304 286 OPEN(unit=42,file="traceur.def",form="formatted",status="old",iostat=ierr) 305 287 IF (ierr==0) THEN 306 READ(42,*) nq ! should be the same as nqtot 288 READ(42,*) tracline 289 if (trim(tracline) .ne. '#ModernTrac-v1') then !checking if we're using Modern-Trac or not 290 read(tracline,*) nq !should be equal to nqtot 291 else 292 do !loop on lines until we find uncommented lines 293 read(42,'(A)',iostat=ierr) tracline 294 if (ierr==0) then 295 if (index(tracline,"#") .ne. 1) then ! Allow for arbitrary number of commented lines in header 296 read(tracline,*) nq !should be equal to nqtot 297 exit 298 endif !index(tracline,"#") .ne. 1 299 endif !ierr=0 300 enddo 301 endif !(trim(tracline) .ne. '#ModernTrac-v1') 307 302 IF (nq /= nqtot) THEN 308 303 WRITE(*,*) "Error: number of tracers in tracer.def should match nqtot!" 309 304 WRITE(*,*) " will just use nqtot=",nqtot," tracers" 310 305 ENDIF 311 DO i=1,nqtot312 READ(42,*) tname(i)313 ENDDO314 306 CLOSE(42) 315 ENDIF 307 ENDIF !ierr==0 (1st one) 316 308 !$OMP END MASTER 317 309 !$OMP BARRIER 318 310 ENDIF ! of (is_mpi_root) 319 311 320 DO i=1,nqtot 321 CALL bcast(tname(i)) 322 ENDDO 312 323 313 324 314 ! CALL init_infotrac_phy(nqtot,nqo,nbtr,tname,ttext,type_trac,& … … 627 617 !$OMP BARRIER 628 618 CALL physiq(klon_omp, llm, nqtot, & 629 tname, &630 619 debut, lafin, & 631 620 pday, ptime, dtphy, &
Note: See TracChangeset
for help on using the changeset viewer.