Directory: | ./ |
---|---|
File: | Ocean_skin/config_ocean_skin_m.f90 |
Date: | 2022-01-11 19:19:34 |
Exec | Total | Coverage | |
---|---|---|---|
Lines: | 9 | 22 | 40.9% |
Branches: | 2 | 7 | 28.6% |
Line | Branch | Exec | Source |
---|---|---|---|
1 | module config_ocean_skin_m | ||
2 | |||
3 | implicit none | ||
4 | |||
5 | logical, protected:: jcool ! cool skin calculation | ||
6 | logical, protected:: jwarm ! warm layer calculation | ||
7 | logical, protected:: rain_effect | ||
8 | |||
9 | real, protected:: depth_1 = 20. | ||
10 | ! Depth at which the temperature and salinity are input. Could be | ||
11 | ! the depth of a sensor, or the depth at the middle of the first | ||
12 | ! layer of an ocean model (half the depth of the first layer). In | ||
13 | ! m. Setting depth_1 to any value >= depth has the same effect as | ||
14 | ! setting depth_1 to depth. | ||
15 | |||
16 | !$omp threadprivate(jcool, jwarm, rain_effect, depth_1) | ||
17 | |||
18 | integer, protected:: activate_ocean_skin = 0 | ||
19 | ! Allowed values: 0 do not activate; 1 activate without retroaction | ||
20 | ! on LMDZ; 2 activate with retroaction on LMDZ | ||
21 | |||
22 | !$omp threadprivate(activate_ocean_skin) | ||
23 | |||
24 | contains | ||
25 | |||
26 | 1 | subroutine config_ocean_skin | |
27 | |||
28 | use ioipsl_getin_p_mod, only: getin_p | ||
29 | use assert_m, only: assert | ||
30 | |||
31 | integer:: flag_ocean_skin = 3 | ||
32 | !$omp threadprivate(flag_ocean_skin) | ||
33 | |||
34 | namelist /config_ocean_skin_nml/ flag_ocean_skin, depth_1 | ||
35 | |||
36 | !----------------------------------------------------------------------- | ||
37 | |||
38 | 1 | call getin_p("activate_ocean_skin", activate_ocean_skin) | |
39 | call assert(activate_ocean_skin >= 0 .and. activate_ocean_skin <= 2, & | ||
40 | 1 | "config_ocean_skin bad value of activate_ocean_skin") | |
41 |
1/2✗ Branch 0 not taken.
✓ Branch 1 taken 1 times.
|
1 | if (activate_ocean_skin >= 1) then |
42 | ✗ | call getin_p("flag_ocean_skin", flag_ocean_skin) | |
43 | ✗ | call getin_p("depth_1", depth_1) | |
44 | end if | ||
45 | |||
46 | ✗ | select case (flag_ocean_skin) | |
47 | case (0) | ||
48 | ✗ | jwarm = .false. | |
49 | ✗ | jcool = .false. | |
50 | ✗ | rain_effect = .false. | |
51 | case (1) | ||
52 | ✗ | jwarm = .false. | |
53 | ✗ | jcool = .true. | |
54 | ✗ | rain_effect = .false. | |
55 | case (2) | ||
56 | ✗ | jwarm = .true. | |
57 | ✗ | jcool = .true. | |
58 | ✗ | rain_effect = .false. | |
59 | case (3) | ||
60 | 1 | jwarm = .true. | |
61 | 1 | jcool = .true. | |
62 | 1 | rain_effect = .true. | |
63 | case default | ||
64 | ✗ | print *, "config_ocean_skin: bad value for flag_ocean_skin." | |
65 |
1/5✗ Branch 0 not taken.
✗ Branch 1 not taken.
✗ Branch 2 not taken.
✓ Branch 3 taken 1 times.
✗ Branch 4 not taken.
|
1 | stop 1 |
66 | end select | ||
67 | |||
68 | 1 | end subroutine config_ocean_skin | |
69 | |||
70 | end module config_ocean_skin_m | ||
71 |