GCC Code Coverage Report


Directory: ./
File: phys/radio_decay.f90
Date: 2022-01-11 19:19:34
Exec Total Coverage
Lines: 13 13 100.0%
Branches: 17 20 85.0%

Line Branch Exec Source
1 !
2 ! $Id $
3 !
4 480 SUBROUTINE radio_decay(radio,rnpb,dtime,tautr,tr,d_tr)
5 !
6 ! Caluclate radioactive decay for all tracers with radio(it)=true
7 !
8 USE dimphy
9 USE infotrac_phy, ONLY : nbtr
10 USE traclmdz_mod, ONLY : id_rn, id_pb
11 IMPLICIT NONE
12 !-----------------------------------------------------------------------
13 ! Auteur(s): AA + CG (LGGE/CNRS) Date 24-06-94
14 ! Objet: Calcul de la tendance radioactive des traceurs type radioelements
15 ! Cas particulier pour le couple radon-plomb : Le radon decroit en plomb
16 !-----------------------------------------------------------------------
17 !
18 ! Entrees
19 !
20 LOGICAL,DIMENSION(nbtr),INTENT(IN) :: radio ! .true. = traceur radioactif
21 LOGICAL,INTENT(IN) :: rnpb ! .true. = decroissance RN = source PB
22 REAL,INTENT(IN) :: dtime ! Pas de temps physique (secondes)
23 REAL,DIMENSION(nbtr),INTENT(IN) :: tautr ! Constante de decroissance radioactive
24 REAL,DIMENSION(klon,klev,nbtr),INTENT(IN) :: tr ! Concentrations traceurs U/kgA
25 !
26 ! Sortie
27 !
28 REAL,DIMENSION(klon,klev,nbtr),INTENT(OUT) :: d_tr ! Tendance de decroissance radioactive
29 !
30 ! Locales
31 !
32 INTEGER :: i,k,it
33
34
35
2/2
✓ Branch 0 taken 960 times.
✓ Branch 1 taken 480 times.
1440 DO it = 1,nbtr
36
4/4
✓ Branch 0 taken 37440 times.
✓ Branch 1 taken 960 times.
✓ Branch 2 taken 37215360 times.
✓ Branch 3 taken 37440 times.
37253760 d_tr(:,:,it) = 0.
37
1/2
✓ Branch 0 taken 960 times.
✗ Branch 1 not taken.
1440 IF ( radio(it) ) THEN
38
1/2
✓ Branch 0 taken 960 times.
✗ Branch 1 not taken.
960 IF (tautr(it) .GT. 0.) THEN
39
2/2
✓ Branch 0 taken 37440 times.
✓ Branch 1 taken 960 times.
38400 DO k = 1,klev
40
2/2
✓ Branch 0 taken 37215360 times.
✓ Branch 1 taken 37440 times.
37253760 DO i = 1,klon
41 37252800 d_tr(i,k,it) = - tr(i,k,it) * dtime / tautr(it)
42 END DO
43 END DO
44 END IF
45 END IF
46 END DO
47
48 !-------------------------------------------------------
49 ! Cas particulier radon (id_rn) => plomb (id_pb)
50 !-------------------------------------------------------
51
1/2
✓ Branch 0 taken 480 times.
✗ Branch 1 not taken.
480 IF ( rnpb ) THEN
52
2/2
✓ Branch 0 taken 18720 times.
✓ Branch 1 taken 480 times.
19200 DO k = 1,klev
53
2/2
✓ Branch 0 taken 18607680 times.
✓ Branch 1 taken 18720 times.
18626880 DO i = 1,klon
54 18626400 d_tr(i,k,id_pb) = d_tr(i,k,id_pb) - d_tr(i,k,id_rn)
55 ENDDO
56 ENDDO
57 ENDIF
58
59 480 END SUBROUTINE radio_decay
60