Directory: | ./ |
---|---|
File: | phys/hgardfou.f90 |
Date: | 2022-01-11 19:19:34 |
Exec | Total | Coverage | |
---|---|---|---|
Lines: | 26 | 50 | 52.0% |
Branches: | 27 | 52 | 51.9% |
Line | Branch | Exec | Source |
---|---|---|---|
1 | |||
2 | ! $Id: hgardfou.F90 2399 2015-11-20 16:23:28Z emillour $ | ||
3 | 6720 | SUBROUTINE hgardfou(t, tsol, text,abortphy) | |
4 | USE dimphy, ONLY: klon, klev | ||
5 | USE phys_state_var_mod, ONLY: pctsrf | ||
6 | USE geometry_mod, ONLY: longitude_deg, latitude_deg | ||
7 | USE indice_sol_mod, ONLY: nbsrf | ||
8 | USE print_control_mod, ONLY: lunout | ||
9 | IMPLICIT NONE | ||
10 | ! ====================================================================== | ||
11 | ! Verifier la temperature | ||
12 | ! ====================================================================== | ||
13 | include "YOMCST.h" | ||
14 | REAL t(klon, klev), tsol(klon, nbsrf) | ||
15 | CHARACTER(len=*), intent(in):: text | ||
16 | CHARACTER (LEN=20) :: modname = 'hgardfou' | ||
17 | INTEGER abortphy | ||
18 | |||
19 | INTEGER i, k, nsrf | ||
20 | 13440 | REAL zt(klon) | |
21 | 13440 | INTEGER jadrs(klon), jbad | |
22 | LOGICAL ok | ||
23 | |||
24 | LOGICAL firstcall | ||
25 | SAVE firstcall | ||
26 | DATA firstcall/.TRUE./ | ||
27 | !$OMP THREADPRIVATE(firstcall) | ||
28 | |||
29 |
2/2✓ Branch 0 taken 1 times.
✓ Branch 1 taken 6719 times.
|
6720 | IF (firstcall) THEN |
30 | 1 | WRITE (lunout, *) 'hgardfou garantit la temperature dans [100,370] K' | |
31 | 1 | firstcall = .FALSE. | |
32 | ! DO i = 1, klon | ||
33 | ! WRITE(lunout,*)'i=',i,'rlon=',rlon(i),'rlat=',rlat(i) | ||
34 | ! ENDDO | ||
35 | |||
36 | END IF | ||
37 | |||
38 | ok = .TRUE. | ||
39 |
2/2✓ Branch 0 taken 262080 times.
✓ Branch 1 taken 6720 times.
|
268800 | DO k = 1, klev |
40 |
2/2✓ Branch 0 taken 262080 times.
✓ Branch 1 taken 260507520 times.
|
260769600 | DO i = 1, klon |
41 | 260769600 | zt(i) = t(i, k) | |
42 | END DO | ||
43 | jbad = 0 | ||
44 |
2/2✓ Branch 0 taken 260507520 times.
✓ Branch 1 taken 262080 times.
|
260769600 | DO i = 1, klon |
45 |
1/2✗ Branch 0 not taken.
✓ Branch 1 taken 260507520 times.
|
260769600 | IF (zt(i)>370.) THEN |
46 | ✗ | jbad = jbad + 1 | |
47 | ✗ | jadrs(jbad) = i | |
48 | END IF | ||
49 | END DO | ||
50 |
1/2✗ Branch 0 not taken.
✓ Branch 1 taken 262080 times.
|
262080 | IF (jbad>0) THEN |
51 | ok = .FALSE. | ||
52 | ✗ | DO i = 1, jbad | |
53 | ✗ | WRITE (lunout, *) 'i,k,temperature,lon,lat,pourc ter,lic,oce,sic =', & | |
54 | ✗ | jadrs(i), k, zt(jadrs(i)), longitude_deg(jadrs(i)), & | |
55 | ✗ | latitude_deg(jadrs(i)),(pctsrf(jadrs(i),nsrf), nsrf=1, nbsrf) | |
56 | END DO | ||
57 | END IF | ||
58 | jbad = 0 | ||
59 |
2/2✓ Branch 0 taken 260507520 times.
✓ Branch 1 taken 262080 times.
|
260769600 | DO i = 1, klon |
60 | ! IF (zt(i).LT.100.0) THEN | ||
61 |
1/2✗ Branch 0 not taken.
✓ Branch 1 taken 260507520 times.
|
260769600 | IF (zt(i)<50.0) THEN |
62 | ✗ | jbad = jbad + 1 | |
63 | ✗ | jadrs(jbad) = i | |
64 | END IF | ||
65 | END DO | ||
66 |
1/2✗ Branch 0 not taken.
✓ Branch 1 taken 262080 times.
|
268800 | IF (jbad>0) THEN |
67 | ok = .FALSE. | ||
68 | ✗ | DO i = 1, jbad | |
69 | ✗ | WRITE (lunout, *) 'i,k,temperature,lon,lat,pourc ter,lic,oce,sic =', & | |
70 | ✗ | jadrs(i), k, zt(jadrs(i)), longitude_deg(jadrs(i)), & | |
71 | ✗ | latitude_deg(jadrs(i)), (pctsrf(jadrs(i),nsrf), nsrf=1, nbsrf) | |
72 | END DO | ||
73 | END IF | ||
74 | END DO | ||
75 | |||
76 |
2/2✓ Branch 0 taken 26880 times.
✓ Branch 1 taken 6720 times.
|
33600 | DO nsrf = 1, nbsrf |
77 |
2/2✓ Branch 0 taken 26880 times.
✓ Branch 1 taken 26718720 times.
|
26745600 | DO i = 1, klon |
78 | 26745600 | zt(i) = tsol(i, nsrf) | |
79 | END DO | ||
80 | jbad = 0 | ||
81 |
2/2✓ Branch 0 taken 26718720 times.
✓ Branch 1 taken 26880 times.
|
26745600 | DO i = 1, klon |
82 |
1/2✗ Branch 0 not taken.
✓ Branch 1 taken 26718720 times.
|
26745600 | IF (zt(i)>370.0) THEN |
83 | ✗ | jbad = jbad + 1 | |
84 | ✗ | jadrs(jbad) = i | |
85 | END IF | ||
86 | END DO | ||
87 |
1/2✗ Branch 0 not taken.
✓ Branch 1 taken 26880 times.
|
26880 | IF (jbad>0) THEN |
88 | ok = .FALSE. | ||
89 | ✗ | DO i = 1, jbad | |
90 | WRITE (lunout, *) & | ||
91 | ✗ | 'i,nsrf,temperature,lon,lat,pourc ter,lic,oce,sic =', jadrs(i), & | |
92 | ✗ | nsrf, zt(jadrs(i)), longitude_deg(jadrs(i)), & | |
93 | ✗ | latitude_deg(jadrs(i)), pctsrf(jadrs(i), nsrf) | |
94 | END DO | ||
95 | END IF | ||
96 | jbad = 0 | ||
97 |
2/2✓ Branch 0 taken 26718720 times.
✓ Branch 1 taken 26880 times.
|
26745600 | DO i = 1, klon |
98 | ! IF (zt(i).LT.100.0) THEN | ||
99 |
1/2✗ Branch 0 not taken.
✓ Branch 1 taken 26718720 times.
|
26745600 | IF (zt(i)<50.0) THEN |
100 | ✗ | jbad = jbad + 1 | |
101 | ✗ | jadrs(jbad) = i | |
102 | END IF | ||
103 | END DO | ||
104 |
1/2✗ Branch 0 not taken.
✓ Branch 1 taken 26880 times.
|
33600 | IF (jbad>0) THEN |
105 | ok = .FALSE. | ||
106 | ✗ | DO i = 1, jbad | |
107 | WRITE (lunout, *) & | ||
108 | ✗ | 'i,nsrf,temperature,lon,lat,pourc ter,lic,oce,sic =', jadrs(i), & | |
109 | ✗ | nsrf, zt(jadrs(i)), longitude_deg(jadrs(i)), & | |
110 | ✗ | latitude_deg(jadrs(i)), pctsrf(jadrs(i), nsrf) | |
111 | END DO | ||
112 | END IF | ||
113 | END DO | ||
114 | |||
115 | ! IF (.NOT. ok) CALL abort_physic(modname, text, 1) | ||
116 |
1/2✗ Branch 0 not taken.
✓ Branch 1 taken 6720 times.
|
6720 | IF (.NOT. ok) abortphy=1 |
117 | |||
118 | 6720 | END SUBROUTINE hgardfou | |
119 |