1 | ! $Id: dimphy.F90 5151 2024-07-31 15:24:31Z fhourdin $ |
---|
2 | |
---|
3 | MODULE dimphy |
---|
4 | |
---|
5 | IMPLICIT NONE; PRIVATE |
---|
6 | PUBLIC klon, kdlon, kfdia, kidia, klev, klevp1, klevm1, kflev, & |
---|
7 | init_dimphy, init_dimphy1D, zmasq |
---|
8 | |
---|
9 | INTEGER :: klon, kdlon, kfdia, kidia, klev, klevp1, klevm1, kflev |
---|
10 | |
---|
11 | !$OMP THREADPRIVATE(klon,kfdia,kidia,kdlon) |
---|
12 | REAL, ALLOCATABLE, DIMENSION(:) :: zmasq |
---|
13 | !$OMP THREADPRIVATE(zmasq) |
---|
14 | |
---|
15 | CONTAINS |
---|
16 | |
---|
17 | SUBROUTINE init_dimphy(klon0, klev0) |
---|
18 | IMPLICIT NONE |
---|
19 | |
---|
20 | INTEGER, INTENT(IN) :: klon0, klev0 |
---|
21 | |
---|
22 | klon = klon0 |
---|
23 | kdlon = klon |
---|
24 | kidia = 1 |
---|
25 | kfdia = klon |
---|
26 | !$OMP MASTER |
---|
27 | klev = klev0 |
---|
28 | klevp1 = klev + 1 |
---|
29 | klevm1 = klev - 1 |
---|
30 | kflev = klev |
---|
31 | !$OMP END MASTER |
---|
32 | ALLOCATE(zmasq(klon)) |
---|
33 | zmasq = 0. |
---|
34 | |
---|
35 | END SUBROUTINE init_dimphy |
---|
36 | |
---|
37 | SUBROUTINE init_dimphy1D(klon0, klev0) |
---|
38 | ! 1D special version of dimphy without ALLOCATE(zmasq) |
---|
39 | ! which will be allocated in iniphysiq |
---|
40 | IMPLICIT NONE |
---|
41 | |
---|
42 | INTEGER, INTENT(IN) :: klon0 |
---|
43 | INTEGER, INTENT(IN) :: klev0 |
---|
44 | |
---|
45 | klon = klon0 |
---|
46 | kdlon = klon |
---|
47 | kidia = 1 |
---|
48 | kfdia = klon |
---|
49 | klev = klev0 |
---|
50 | klevp1 = klev + 1 |
---|
51 | klevm1 = klev - 1 |
---|
52 | kflev = klev |
---|
53 | |
---|
54 | END SUBROUTINE init_dimphy1D |
---|
55 | |
---|
56 | |
---|
57 | END MODULE dimphy |
---|