source: LMDZ6/trunk/libf/phylmd/dimphy.f90 @ 5494

Last change on this file since 5494 was 5494, checked in by evignon, 13 hours ago

ajout d'un commentaire dans dimphy pour preciser pourquoi certaines variables
ne sont pas threadprivate (en attendant de tester un changement d'initialisation pour ces variables)

  • Property copyright set to
    Name of program: LMDZ
    Creation date: 1984
    Version: LMDZ5
    License: CeCILL version 2
    Holder: Laboratoire de m\'et\'eorologie dynamique, CNRS, UMR 8539
    See the license file in the root directory
  • Property svn:eol-style set to native
  • Property svn:keywords set to Id
File size: 1.3 KB
RevLine 
[3442]1!
2! $Id: dimphy.f90 5494 2025-01-20 14:40:52Z evignon $
3!
4  MODULE dimphy
[776]5 
6  INTEGER,SAVE :: klon
7  INTEGER,SAVE :: kdlon
8  INTEGER,SAVE :: kfdia
9  INTEGER,SAVE :: kidia
10  INTEGER,SAVE :: klev
11  INTEGER,SAVE :: klevp1
12  INTEGER,SAVE :: klevm1
13  INTEGER,SAVE :: kflev
14
[5492]15!$OMP THREADPRIVATE(klon,kfdia,kidia,kdlon)
[5494]16! note that klev, klevp1, klevm1 and kflev are
17! not included in an ompthreadprivate statement
18! because of the way they are initialized below (omp master)
19
20REAL,save,allocatable,dimension(:) :: zmasq
[776]21!$OMP THREADPRIVATE(zmasq)   
22
23CONTAINS
24 
[1146]25  SUBROUTINE Init_dimphy(klon0,klev0)
[776]26  IMPLICIT NONE
27 
28    INTEGER, INTENT(in) :: klon0
29    INTEGER, INTENT(in) :: klev0
30   
31    klon=klon0
32    kdlon=klon
33    kidia=1
34    kfdia=klon
35!$OMP MASTER
36    klev=klev0
37    klevp1=klev+1
38    klevm1=klev-1
39    kflev=klev
40!$OMP END MASTER   
41    ALLOCATE(zmasq(klon))   
[3435]42    zmasq=0.
[776]43   
44  END SUBROUTINE Init_dimphy
45
[3442]46  SUBROUTINE Init_dimphy1D(klon0,klev0)
47! 1D special version of dimphy without ALLOCATE(zmasq)
48! which will be allocated in iniphysiq
49  IMPLICIT NONE
[776]50 
[3442]51    INTEGER, INTENT(in) :: klon0
52    INTEGER, INTENT(in) :: klev0
53   
54    klon=klon0
55    kdlon=klon
56    kidia=1
57    kfdia=klon
58    klev=klev0
59    klevp1=klev+1
60    klevm1=klev-1
61    kflev=klev
62   
63  END SUBROUTINE Init_dimphy1D
64
65 
[776]66END MODULE dimphy
Note: See TracBrowser for help on using the repository browser.