source: LMDZ5/trunk/libf/phylmd/rrtm/yomprad.F90 @ 4867

Last change on this file since 4867 was 2010, checked in by Laurent Fairhead, 11 years ago

Modifications pour OpenMP


OpenMP modifications

  • 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
File size: 6.9 KB
RevLine 
[1989]1MODULE YOMPRAD
2
3USE PARKIND1  ,ONLY : JPIM     ,JPRB
4
5IMPLICIT NONE
6
7SAVE
8
9!----------------------------------------------------------------
10!*    new radiation grid data structures
11!----------------------------------------------------------------
12
13! NRESOL_ID : transformation package resolution identifier
14! NSMAX     : spectral truncation
15! NASM0     : address in a spectral array of (m, n=m)
16! MYMS      : actual wave numbers handled by this processor
17! NDGLG     : number of latitude rows
18! NDLON     : length of a row of latitude near equator
19! NDGSAL    : Local version of NDGSA , always 1
20! NDGENL    : Number of latitude rows for which this process has grid points
21! NDGSAH    : 1-NROWIDE
22! NDGENH    : NDGENL+NROWIDE
23! NDGSAG    : Global version of NDGSA
24! NDGENG    : Global version of NDGEN
25! NDSUR1    : over dimensioning of NDLON for technical reasons (at least 2)
26! NDLSUR    : NDLON+NDSUR1
27! NDGSUR    : number of additional rows at each pole for semi-lagrangian
28!           : interpolation
29! MYFRSTACTLAT : first actual lat on this PE in grid-point space,
30!              : it is nfrstlat(my_region_ns)
31! MYLSTACTLAT  : last actual lat on this PE in grid-point space,
32!              : it is nlstlat(my_region_ns)
33! NGPTOT    : number of local grid points
34! NGPTOTG   : total number of grid points
35! NRGRI     : number of grid points on a latitude row
36! NLOENG    : as above but extended at poles for SL interpolation
37! GELAM     : radiation grid geographic longitude "lambda"
38! GELAT     : radiation grid geographic latitude "theta"
39! GESLO     : sine of geographic longitude "sin(lambda)"
40! GECLO     : cosine of geographic longitude "cos(lambda)
41! GEMU      : sine of geographic latitude "sin(theta)"
42! RMU       : mu              sin(theta)
43! RSQM2     : SQRT(R1MU2)     cos(theta)
44! RLATIG    : arcsin(mu)      theta  GLOBAL VIEW
45! RLATI     : arcsin(mu)      theta
46! RIPI0     : bi-cubic interpolation coefficients
47! RIPI1     : bi-cubic interpolation coefficients
48! RIPI2     : bi-cubic interpolation coefficients
49
50TYPE RADIATION_GRID_STRUCT
51INTEGER(KIND=JPIM)                            :: NRESOL_ID, NGPTOT, NGPTOTG, &
52 & NGPTOTMX, NSPEC2, NSMAX, &
53 & NPTRFLOFF, NUMP, NDLON, &
54 & NDGSAL, NDGENL, NDGSAH, NDGENH, &
55 & NDGLG, NDGSAG, NDGENG, NDLSUR, &
56 & NFRSTLOFF, NDSUR1,NDGSUR, &
57 & MYFRSTACTLAT, MYLSTACTLAT 
58INTEGER(KIND=JPIM), POINTER, DIMENSION(:)     :: NRGRI, NLOENG, NPTRFRSTLAT, NFRSTLAT, &
59 & NLSTLAT, MYMS, NASM0 
60INTEGER(KIND=JPIM), POINTER, DIMENSION(:,:)   :: NSTA, NONL
61REAL(KIND=JPRB),    POINTER, DIMENSION(:)     :: GELAM, GELAT, GECLO, GESLO, GEMU, &
62 & RMU, RSQM2, RLATIG, RLATI, &
63 & RIPI0, RIPI1, RIPI2 
64END TYPE RADIATION_GRID_STRUCT
65
66TYPE(RADIATION_GRID_STRUCT) :: RADGRID
67
68!----------------------------------------------------------------
69!*    radiation on demand comms data structures
70!----------------------------------------------------------------
71
72LOGICAL :: LRADONDEM
73LOGICAL :: LRADONDEM_ACTIVE
74INTEGER(KIND=JPIM) :: NFIXRADFLD(2)
75INTEGER(KIND=JPIM),ALLOCATABLE :: MASK_RI1(:)
76INTEGER(KIND=JPIM),ALLOCATABLE :: MASK_RI2(:)
77INTEGER(KIND=JPIM),ALLOCATABLE :: MASK_RO1(:)
78INTEGER(KIND=JPIM),ALLOCATABLE :: MASK_RO2(:)
79
80!----------------------------------------------------------------
81!*    radiation interpolation/load balancing data structures
82!----------------------------------------------------------------
83
84! NRIRINT  : INTERPOLATION INTERVAL FOR LOCAL LATITUDES
85! NRFRSTOFF: OFFSET TO FIRST COURSE POINT FROM FIRST FINE POINT
86! NRLASTOFF: OFFSET TO FIRST COURSE POINT FROM LAST  FINE POINT
87! NRIMAX   : NUMBER OF COURSE POINTS FOR LOCAL LATITUDES
88! NRIMAXT  : TOTAL NUMBER OF COURSE POINTS IN THIS PROCESSOR
89! NRIMAXLT : TOTAL NUMBER OF COURSE POINTS TO BE PROCESSED BY THIS PROC
90! NRLPRCS  : NUMBER OF PROCESSORS REQUIRED FOR LOAD BALANCING
91! NRIMAXLA : LOAD BALANCING DATA - SETA OF PROCESSOR TO COMMUNICATE WITH
92! NRIMAXLB : LOAD BALANCING DATA - SETB OF PROCESSOR TO COMMUNICATE WITH
93! NRIMAXLN : LOAD BALANCING DATA - NUMBER OF COURSE POINTS TO SND/RCV
94! NRCNEEDW : NUMBER OF COURSE POINTS NEEDED ON WESTERN END OF LOCAL LATS
95! NRCNEEDE : NUMBER OF COURSE POINTS NEEDED ON EASTERN END OF LOCAL LATS
96! NRCSNDW  : NUMBER OF WESTERN COURSE POINTS TO SEND TO LOCAL PROCS
97! NRCSNDE  : NUMBER OF EASTERN COURSE POINTS TO SEND TO LOCAL PROCS
98! NRCRCVW  : NUMBER OF WESTERN COURSE POINTS TO RCV FROM LOCAL PROCS
99! NRCRCVE  : NUMBER OF WESTERN COURSE POINTS TO RCV FROM LOCAL PROCS
100! NRCSNDT  : TOTAL NUMBER OF COURSE POINTS TO SEND TO LOCAL PROCESSORS
101! NRCRCVT  : TOTAL NUMBER OF COURSE POINTS TO RCV FROM LOCAL PROCESSORS
102! NRCRCVWO : OFFSET OF WESTERN BOUNDARY COURSE POINTS IN BOUNDARY ARRAY
103! NRCRCVEO : OFFSET OF EASTERN BOUNDARY COURSE POINTS IN BOUNDARY ARRAY
104
105! LODBGRADI: DEBUGGING FLAG, EACH PROCESSOR WILL DUMP ABOVE INFO TO A
106!            PER PROCESSOR FILE CALLED 'debug_aaa_bbb'
107!            where aaa=my_region_ns and bbb=my_region_ew
108! LODBGRADL: DEBUGGING FLAG, EACH PROCESSOR WILL DUMP LOAD BALANCING
109!            ARRAYS as above
110
111! NRLBCHUNKS: NUMBER OF BLOCKING LOOPS FOR LOAD-BALANCING COMMS
112! NRLRCHUNKS: NUMBER OF BLOCKING LOOPS FOR LOAD-BALANCING COMMS (RESTORING)
113! NRLBPOINTS: MAX NUMBER OF POINTS FOR LOAD-BALANCING COMMS
114! NRLRPOINTS: MAX NUMBER OF POINTS FOR LOAD-BALANCING COMMS (RESTORING)
115! NRLBDATA  : NUMBER OF DATA VALUES PER LOAD-BALANCING POINT
116! NRLRDATA  : NUMBER OF DATA VALUES PER LOAD-BALANCING POINT (RESTORING)
117
118LOGICAL :: LODBGRADI
119LOGICAL :: LODBGRADL
120INTEGER(KIND=JPIM) :: NRLBCHUNKS
121INTEGER(KIND=JPIM) :: NRLRCHUNKS
122INTEGER(KIND=JPIM) :: NRLBPOINTS
123INTEGER(KIND=JPIM) :: NRLRPOINTS
124INTEGER(KIND=JPIM) :: NRLBDATA
125INTEGER(KIND=JPIM) :: NRLRDATA
126INTEGER(KIND=JPIM), PARAMETER :: JPMAXLOADP=32
127INTEGER(KIND=JPIM),ALLOCATABLE:: NRIRINT(:)
128INTEGER(KIND=JPIM),ALLOCATABLE:: NRFRSTOFF(:,:)
129INTEGER(KIND=JPIM),ALLOCATABLE:: NRLASTOFF(:,:)
130INTEGER(KIND=JPIM),ALLOCATABLE:: NRIMAX(:,:)
131INTEGER(KIND=JPIM) :: NRIMAXT
132INTEGER(KIND=JPIM) :: NRIMAXLT
133INTEGER(KIND=JPIM) :: NRLPRCS
134INTEGER(KIND=JPIM) :: NRIMAXLA(JPMAXLOADP)
135INTEGER(KIND=JPIM) :: NRIMAXLB(JPMAXLOADP)
136INTEGER(KIND=JPIM) :: NRIMAXLN(JPMAXLOADP)
137INTEGER(KIND=JPIM),ALLOCATABLE:: NRCNEEDW(:,:)
138INTEGER(KIND=JPIM),ALLOCATABLE:: NRCNEEDE(:,:)
139INTEGER(KIND=JPIM),ALLOCATABLE:: NRCSNDW(:,:,:)
140INTEGER(KIND=JPIM),ALLOCATABLE:: NRCSNDE(:,:,:)
141INTEGER(KIND=JPIM),ALLOCATABLE:: NRCRCVW(:,:,:)
142INTEGER(KIND=JPIM),ALLOCATABLE:: NRCRCVE(:,:,:)
143INTEGER(KIND=JPIM),ALLOCATABLE:: NRCSNDT(:,:)
144INTEGER(KIND=JPIM),ALLOCATABLE:: NRCRCVT(:,:)
145INTEGER(KIND=JPIM),ALLOCATABLE:: NRCRCVWO(:,:,:)
146INTEGER(KIND=JPIM),ALLOCATABLE:: NRCRCVEO(:,:,:)
[2010]147!$OMP THREADPRIVATE(lodbgradi,lodbgradl,lradondem,lradondem_active,nfixradfld,nrimaxla,nrimaxlb)
148!$OMP THREADPRIVATE(nrimaxln,nrimaxlt,nrimaxt,nrlbchunks,nrlbdata,nrlbpoints,nrlprcs,nrlrchunks)
149!$OMP THREADPRIVATE(nrlrdata,nrlrpoints,radgrid)
150!$OMP THREADPRIVATE(mask_ri1,mask_ri2,mask_ro1,mask_ro2,nrcneede,nrcneedw,nrcrcve,nrcrcveo,nrcrcvt)
151!$OMP THREADPRIVATE(nrcrcvw,nrcrcvwo,nrcsnde,nrcsndt,nrcsndw,nrfrstoff,nrimax,nrirint,nrlastoff)
[1989]152END MODULE YOMPRAD
Note: See TracBrowser for help on using the repository browser.