GCC Code Coverage Report


Directory: ./
File: phys/inifis_mod.f90
Date: 2022-01-11 19:19:34
Exec Total Coverage
Lines: 21 39 53.8%
Branches: 8 20 40.0%

Line Branch Exec Source
1 ! $Id: inifis_mod.F90 3435 2019-01-22 15:21:59Z fairhead $
2 MODULE inifis_mod
3
4 CONTAINS
5
6 9 SUBROUTINE inifis(punjours, prad, pg, pr, pcpp)
7 ! Initialize some physical constants and settings
8 USE init_print_control_mod, ONLY : init_print_control
9 USE print_control_mod, ONLY: lunout
10 IMPLICIT NONE
11
12 include "YOMCST.h"
13 REAL,INTENT(IN) :: prad, pg, pr, pcpp, punjours
14
15 CHARACTER (LEN=20) :: modname = 'inifis'
16 CHARACTER (LEN=80) :: abort_message
17
18 ! Initialize flags lunout, prt_level, debug
19 1 CALL init_print_control
20
21 ! suphel => initialize some physical constants (orbital parameters,
22 ! geoid, gravity, thermodynamical constants, etc.) in the
23 ! physics
24 1 CALL suphel
25
26 ! check that physical constants set in 'suphel' are coherent
27 ! with values set in the dynamics:
28
1/2
✗ Branch 0 not taken.
✓ Branch 1 taken 1 times.
1 IF (rday/=punjours) THEN
29 WRITE (lunout, *) 'inifis: length of day discrepancy!!!'
30 WRITE (lunout, *) ' in the dynamics punjours=', punjours
31 WRITE (lunout, *) ' but in the physics RDAY=', rday
32 IF (abs(rday-punjours)>0.01*punjours) THEN
33 ! stop here if the relative difference is more than 1%
34 abort_message = 'length of day discrepancy'
35 CALL abort_physic(modname, abort_message, 1)
36 END IF
37 END IF
38
1/2
✓ Branch 0 taken 1 times.
✗ Branch 1 not taken.
1 IF (rg/=pg) THEN
39 1 WRITE (lunout, *) 'inifis: gravity discrepancy !!!'
40 1 WRITE (lunout, *) ' in the dynamics pg=', pg
41 1 WRITE (lunout, *) ' but in the physics RG=', rg
42
1/2
✗ Branch 0 not taken.
✓ Branch 1 taken 1 times.
1 IF (abs(rg-pg)>0.01*pg) THEN
43 ! stop here if the relative difference is more than 1%
44 abort_message = 'gravity discrepancy'
45 CALL abort_physic(modname, abort_message, 1)
46 END IF
47 END IF
48
1/2
✗ Branch 0 not taken.
✓ Branch 1 taken 1 times.
1 IF (ra/=prad) THEN
49 WRITE (lunout, *) 'inifis: planet radius discrepancy !!!'
50 WRITE (lunout, *) ' in the dynamics prad=', prad
51 WRITE (lunout, *) ' but in the physics RA=', ra
52 IF (abs(ra-prad)>0.01*prad) THEN
53 ! stop here if the relative difference is more than 1%
54 abort_message = 'planet radius discrepancy'
55 CALL abort_physic(modname, abort_message, 1)
56 END IF
57 END IF
58
1/2
✓ Branch 0 taken 1 times.
✗ Branch 1 not taken.
1 IF (rd/=pr) THEN
59 1 WRITE (lunout, *) 'inifis: reduced gas constant discrepancy !!!'
60 1 WRITE (lunout, *) ' in the dynamics pr=', pr
61 1 WRITE (lunout, *) ' but in the physics RD=', rd
62
1/2
✗ Branch 0 not taken.
✓ Branch 1 taken 1 times.
1 IF (abs(rd-pr)>0.01*pr) THEN
63 ! stop here if the relative difference is more than 1%
64 abort_message = 'reduced gas constant discrepancy'
65 CALL abort_physic(modname, abort_message, 1)
66 END IF
67 END IF
68
1/2
✓ Branch 0 taken 1 times.
✗ Branch 1 not taken.
1 IF (rcpd/=pcpp) THEN
69 1 WRITE (lunout, *) 'inifis: specific heat discrepancy !!!'
70 1 WRITE (lunout, *) ' in the dynamics pcpp=', pcpp
71 1 WRITE (lunout, *) ' but in the physics RCPD=', rcpd
72
1/2
✗ Branch 0 not taken.
✓ Branch 1 taken 1 times.
1 IF (abs(rcpd-pcpp)>0.01*pcpp) THEN
73 ! stop here if the relative difference is more than 1%
74 abort_message = 'specific heat discrepancy'
75 CALL abort_physic(modname, abort_message, 1)
76 END IF
77 END IF
78
79 1 END SUBROUTINE inifis
80
81 END MODULE inifis_mod
82