[3442] | 1 | ! $Id: dimphy.F90 5151 2024-07-31 15:24:31Z abarral $ |
---|
[5099] | 2 | |
---|
[5142] | 3 | MODULE dimphy |
---|
[5151] | 4 | |
---|
| 5 | IMPLICIT NONE; PRIVATE |
---|
| 6 | PUBLIC klon, kdlon, kfdia, kidia, klev, klevp1, klevm1, kflev, & |
---|
| 7 | init_dimphy, init_dimphy1D, zmasq |
---|
[776] | 8 | |
---|
[5151] | 9 | INTEGER :: klon, kdlon, kfdia, kidia, klev, klevp1, klevm1, kflev |
---|
[776] | 10 | |
---|
[5142] | 11 | !$OMP THREADPRIVATE(klon,kfdia,kidia,kdlon) |
---|
[5151] | 12 | REAL, ALLOCATABLE, DIMENSION(:) :: zmasq |
---|
[5142] | 13 | !$OMP THREADPRIVATE(zmasq) |
---|
| 14 | |
---|
[776] | 15 | CONTAINS |
---|
[5142] | 16 | |
---|
[5151] | 17 | SUBROUTINE init_dimphy(klon0, klev0) |
---|
[5142] | 18 | IMPLICIT NONE |
---|
| 19 | |
---|
[5151] | 20 | INTEGER, INTENT(IN) :: klon0, klev0 |
---|
[5142] | 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 | |
---|
[5151] | 35 | END SUBROUTINE init_dimphy |
---|
[776] | 36 | |
---|
[5151] | 37 | SUBROUTINE init_dimphy1D(klon0, klev0) |
---|
[5142] | 38 | ! 1D special version of dimphy without ALLOCATE(zmasq) |
---|
| 39 | ! which will be allocated in iniphysiq |
---|
| 40 | IMPLICIT NONE |
---|
| 41 | |
---|
[5117] | 42 | INTEGER, INTENT(IN) :: klon0 |
---|
| 43 | INTEGER, INTENT(IN) :: klev0 |
---|
[5142] | 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 | |
---|
[5151] | 54 | END SUBROUTINE init_dimphy1D |
---|
[3442] | 55 | |
---|
[5142] | 56 | |
---|
[776] | 57 | END MODULE dimphy |
---|