- Timestamp:
- Jul 21, 2009, 9:59:02 AM (15 years ago)
- Location:
- LMDZ4/branches/LMDZ4-dev/libf/phylmd
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
LMDZ4/branches/LMDZ4-dev/libf/phylmd/phytrac.F90
r1192 r1212 235 235 236 236 CALL traclmdz(& 237 pdtphys, t_seri,&237 nstep, pdtphys, t_seri, & 238 238 paprs, pplay, cdragh, coefh, & 239 239 yu1, yv1, ftsol, pctsrf, & -
LMDZ4/branches/LMDZ4-dev/libf/phylmd/traclmdz_mod.F90
r1209 r1212 57 57 ! Allocate restart variables trs 58 58 ALLOCATE( trs(klon,nbtr), stat=ierr) 59 IF (ierr /= 0) CALL abort_gcm('traclmdz_ start', 'pb in allocation 1',1)59 IF (ierr /= 0) CALL abort_gcm('traclmdz_from_restart', 'pb in allocation 1',1) 60 60 61 61 ! Initialize trs with values read from restart file … … 90 90 91 91 ALLOCATE( scavtr(nbtr), stat=ierr) 92 IF (ierr /= 0) CALL abort_gcm(' phytrac', 'pb in allocation 9',1)92 IF (ierr /= 0) CALL abort_gcm('traclmdz_init', 'pb in allocation 9',1) 93 93 scavtr(:)=1. 94 94 95 95 ALLOCATE( radio(nbtr), stat=ierr) 96 IF (ierr /= 0) CALL abort_gcm(' phytrac', 'pb in allocation 11',1)96 IF (ierr /= 0) CALL abort_gcm('traclmdz_init', 'pb in allocation 11',1) 97 97 radio(:) = .false. ! Par defaut pas decroissance radioactive 98 98 99 99 ALLOCATE( masktr(klon,nbtr), stat=ierr) 100 IF (ierr /= 0) CALL abort_gcm(' phytrac', 'pb in allocation 2',1)100 IF (ierr /= 0) CALL abort_gcm('traclmdz_init', 'pb in allocation 2',1) 101 101 102 102 ALLOCATE( fshtr(klon,nbtr), stat=ierr) 103 IF (ierr /= 0) CALL abort_gcm(' phytrac', 'pb in allocation 3',1)103 IF (ierr /= 0) CALL abort_gcm('traclmdz_init', 'pb in allocation 3',1) 104 104 105 105 ALLOCATE( hsoltr(nbtr), stat=ierr) 106 IF (ierr /= 0) CALL abort_gcm(' phytrac', 'pb in allocation 4',1)106 IF (ierr /= 0) CALL abort_gcm('traclmdz_init', 'pb in allocation 4',1) 107 107 108 108 ALLOCATE( tautr(nbtr), stat=ierr) 109 IF (ierr /= 0) CALL abort_gcm(' phytrac', 'pb in allocation 5',1)109 IF (ierr /= 0) CALL abort_gcm('traclmdz_init', 'pb in allocation 5',1) 110 110 tautr(:) = 0. 111 111 112 112 ALLOCATE( vdeptr(nbtr), stat=ierr) 113 IF (ierr /= 0) CALL abort_gcm(' phytrac', 'pb in allocation 6',1)113 IF (ierr /= 0) CALL abort_gcm('traclmdz_init', 'pb in allocation 6',1) 114 114 vdeptr(:) = 0. 115 115 … … 121 121 ! Recherche des traceurs connus : Be7, CO2,... 122 122 ! -------------------------------------------- 123 id_be=0 123 124 DO it=1,nbtr 124 125 iiq=niadv(it+2) 125 !126 ! Recherche du Beryllium 7127 !128 126 IF ( tname(iiq) == "BE" .OR. tname(iiq) == "Be" .OR. & 129 127 tname(iiq) == "BE7" .OR. tname(iiq) == "Be7" ) THEN 128 ! Recherche du Beryllium 7 130 129 id_be=it 131 130 ALLOCATE( srcbe(klon,klev) ) … … 134 133 CALL init_be(pctsrf,masktr(:,id_be),tautr(id_be),vdeptr(id_be),scavtr(id_be),srcbe) 135 134 WRITE(*,*) 'Initialisation srcBe: OK' 136 ELSE 137 id_be=0 138 END IF 139 140 ! Placer ici la recherche de nouveaux traceurs 141 ! ... 135 END IF 142 136 END DO 143 137 ! … … 159 153 160 154 SUBROUTINE traclmdz( & 161 pdtphys, t_seri,&155 nstep, pdtphys, t_seri, & 162 156 paprs, pplay, cdragh, coefh, & 163 157 yu1, yv1, ftsol, pctsrf, & … … 180 174 ! 181 175 !Configuration grille,temps: 176 INTEGER,INTENT(IN) :: nstep ! nombre d'appels de la physiq 182 177 REAL,INTENT(IN) :: pdtphys ! Pas d'integration pour la physique (seconde) 183 178 REAL,DIMENSION(klon),INTENT(IN) :: xlat ! latitudes pour chaque point … … 218 213 219 214 INTEGER :: i, k, it 220 221 215 222 216 REAL,DIMENSION(klon) :: d_trs ! Td dans le reservoir … … 250 244 251 245 IF (couchelimite) THEN 252 DO it=1, nbtr 253 IF ( it == id_be ) THEN 254 DO i=1, klon 255 zrho = pplay(i,1)/t_seri(i,1)/RD 256 source(i,it) = - vdeptr(it)*tr_seri(i,1,it)*zrho 257 END DO 258 ELSE 259 source(:,it) = 0.0 260 END IF 261 END DO 246 source(:,:) = 0.0 247 248 IF (id_be /=0) THEN 249 DO i=1, klon 250 zrho = pplay(i,1)/t_seri(i,1)/RD 251 source(i,id_be) = - vdeptr(id_be)*tr_seri(i,1,id_be)*zrho 252 END DO 253 END IF 254 262 255 END IF 263 256 … … 307 300 END IF 308 301 END DO 309 310 302 311 303 END SUBROUTINE traclmdz … … 322 314 REAL,DIMENSION(klon,nbtr), INTENT(OUT) :: trs_out 323 315 INTEGER :: ierr 324 !AJ-beg - 325 ALLOCATE( trs(klon,nbtr), stat=ierr ) 326 IF (ierr == 0) THEN 327 ! no previous allocate [case create_etat0_limit.e] 328 trs_out(:,:) = 0.0 316 317 IF ( ALLOCATED(trs) ) THEN 318 trs_out(:,:) = trs(:,:) 329 319 ELSE 330 ! already allocate by traclmdz_from_restart() [case gcm.e]331 trs_out(:,:) = trs(:,:)320 ! No previous allocate of trs. This is the case for create_etat0_limit. 321 trs_out(:,:) = 0.0 332 322 END IF 333 !cAJ-end -323 334 324 END SUBROUTINE traclmdz_to_restart 335 325
Note: See TracChangeset
for help on using the changeset viewer.