GCC Code Coverage Report
Directory: ./ Exec Total Coverage
File: phylmd/rrtm/yomprad.F90 Lines: 0 1 0.0 %
Date: 2023-06-30 12:56:34 Branches: 0 0 - %

Line Branch Exec Source
1
MODULE YOMPRAD
2
3
USE PARKIND1  ,ONLY : JPIM     ,JPRB
4
5
IMPLICIT NONE
6
7
SAVE
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
50
TYPE RADIATION_GRID_STRUCT
51
INTEGER(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
58
INTEGER(KIND=JPIM), POINTER, DIMENSION(:)     :: NRGRI, NLOENG, NPTRFRSTLAT, NFRSTLAT, &
59
 & NLSTLAT, MYMS, NASM0
60
INTEGER(KIND=JPIM), POINTER, DIMENSION(:,:)   :: NSTA, NONL
61
REAL(KIND=JPRB),    POINTER, DIMENSION(:)     :: GELAM, GELAT, GECLO, GESLO, GEMU, &
62
 & RMU, RSQM2, RLATIG, RLATI, &
63
 & RIPI0, RIPI1, RIPI2
64
END TYPE RADIATION_GRID_STRUCT
65
66
TYPE(RADIATION_GRID_STRUCT) :: RADGRID
67
68
!----------------------------------------------------------------
69
!*    radiation on demand comms data structures
70
!----------------------------------------------------------------
71
72
LOGICAL :: LRADONDEM
73
LOGICAL :: LRADONDEM_ACTIVE
74
INTEGER(KIND=JPIM) :: NFIXRADFLD(2)
75
INTEGER(KIND=JPIM),ALLOCATABLE :: MASK_RI1(:)
76
INTEGER(KIND=JPIM),ALLOCATABLE :: MASK_RI2(:)
77
INTEGER(KIND=JPIM),ALLOCATABLE :: MASK_RO1(:)
78
INTEGER(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
118
LOGICAL :: LODBGRADI
119
LOGICAL :: LODBGRADL
120
INTEGER(KIND=JPIM) :: NRLBCHUNKS
121
INTEGER(KIND=JPIM) :: NRLRCHUNKS
122
INTEGER(KIND=JPIM) :: NRLBPOINTS
123
INTEGER(KIND=JPIM) :: NRLRPOINTS
124
INTEGER(KIND=JPIM) :: NRLBDATA
125
INTEGER(KIND=JPIM) :: NRLRDATA
126
INTEGER(KIND=JPIM), PARAMETER :: JPMAXLOADP=32
127
INTEGER(KIND=JPIM),ALLOCATABLE:: NRIRINT(:)
128
INTEGER(KIND=JPIM),ALLOCATABLE:: NRFRSTOFF(:,:)
129
INTEGER(KIND=JPIM),ALLOCATABLE:: NRLASTOFF(:,:)
130
INTEGER(KIND=JPIM),ALLOCATABLE:: NRIMAX(:,:)
131
INTEGER(KIND=JPIM) :: NRIMAXT
132
INTEGER(KIND=JPIM) :: NRIMAXLT
133
INTEGER(KIND=JPIM) :: NRLPRCS
134
INTEGER(KIND=JPIM) :: NRIMAXLA(JPMAXLOADP)
135
INTEGER(KIND=JPIM) :: NRIMAXLB(JPMAXLOADP)
136
INTEGER(KIND=JPIM) :: NRIMAXLN(JPMAXLOADP)
137
INTEGER(KIND=JPIM),ALLOCATABLE:: NRCNEEDW(:,:)
138
INTEGER(KIND=JPIM),ALLOCATABLE:: NRCNEEDE(:,:)
139
INTEGER(KIND=JPIM),ALLOCATABLE:: NRCSNDW(:,:,:)
140
INTEGER(KIND=JPIM),ALLOCATABLE:: NRCSNDE(:,:,:)
141
INTEGER(KIND=JPIM),ALLOCATABLE:: NRCRCVW(:,:,:)
142
INTEGER(KIND=JPIM),ALLOCATABLE:: NRCRCVE(:,:,:)
143
INTEGER(KIND=JPIM),ALLOCATABLE:: NRCSNDT(:,:)
144
INTEGER(KIND=JPIM),ALLOCATABLE:: NRCRCVT(:,:)
145
INTEGER(KIND=JPIM),ALLOCATABLE:: NRCRCVWO(:,:,:)
146
INTEGER(KIND=JPIM),ALLOCATABLE:: NRCRCVEO(:,:,:)
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)
152
END MODULE YOMPRAD