1 | include(dom.inc)
2 |
3 | SUBROUTINE EMISSIV_SNB(celldata,Lb,Lo,epsil,Tf,WVNB_SI, &
4 | & nelmts,ieltd,ieltf,bcell,bface, &
5 | & nbface,bfbeg,bfend)
6 |
7 | USE mod_pmm
8 | #ifdef USEPALM
9 | USE palmlib
10 | #endif
11 |
12 | IMPLICIT NONE
13 |
14 | include 'dom_constants.h'
15 |
16 | ! IN
17 | DOM_INT :: nelmts,nbface
18 | DOM_INT :: ieltd, ieltf
19 | DOM_INT :: bfbeg, bfend
20 | DOM_REAL :: WVNB_SI
21 | DOM_REAL, DIMENSION(8,nelmts) :: celldata
22 | DOM_REAL, DIMENSION(nbface) :: epsil, Tf
23 | DOM_INT , DIMENSION(nbface) :: bcell, bface
24 |
25 | ! OUT
26 | DOM_REAL, DIMENSION(nelmts) :: Lb
27 | DOM_REAL, DIMENSION(nbface) :: Lo
28 |
29 | ! LOCAL
30 | DOM_INT :: ielt,m, ibnd
31 | DOM_INT :: local_ncell
32 | DOM_INT :: ierr
33 | DOM_REAL :: blae
34 | DOM_REAL, DIMENSION(nelmts) :: local_Lb
35 | DOM_REAL, DIMENSION(nbface) :: local_Lo
36 |
37 | Lo = 0.
38 | Lb = 0.
39 |
40 | ! -----------------------------!
41 | ! Initializing local cell data !
42 | ! -----------------------------!
43 |
44 | local_Lo = 0.
45 | local_Lb = 0.
46 |
47 | ! --------------------------------------------------------!
48 | ! Intensities at the boundaries in the partitioned domain !
49 | ! --------------------------------------------------------!
50 |
51 | DO ibnd = bfbeg, bfend
52 |
53 | local_Lo(ibnd)=epsil(ibnd)/pi*blae(WVNB_SI,Tf(ibnd))
54 |
55 | ENDDO
56 |
57 | ! ---------------------------------------------!
58 | ! Spectral intensity in the partitioned domain !
59 | ! ---------------------------------------------!
60 |
61 | DO ielt = ieltd, ieltf
62 |
63 | local_Lb(ielt)=blae(WVNB_SI,celldata(1,ielt))/pi
64 |
65 | ENDDO
66 |
67 | ! ---------------------------------------!
68 | ! communcation....to put in pmm_reducelb !
69 | ! ---------------------------------------!
70 |
71 | ! print*, " proc ", pmm_rank,": sending L (",ieltd,",",ieltf,")"
72 | #ifdef USEPALM
73 | CALL MPI_ALLREDUCE(local_Lo, Lo, nbface, &
74 | & MPI_DOUBLE_PRECISION, MPI_SUM, PL_COMM_EXEC ,&
75 | & ierr)
76 |
77 | CALL MPI_ALLREDUCE(local_Lb, Lb, nelmts, MPI_DOUBLE_PRECISION, &
78 | & MPI_SUM, PL_COMM_EXEC , ierr)
79 | #else
80 | CALL MPI_ALLREDUCE(local_Lo, Lo, nbface, &
81 | & MPI_DOUBLE_PRECISION, MPI_SUM, MPI_COMM_WORLD,&
82 | & ierr)
83 |
84 | CALL MPI_ALLREDUCE(local_Lb, Lb, nelmts, MPI_DOUBLE_PRECISION, &
85 | & MPI_SUM, MPI_COMM_WORLD, ierr)
86 | #endif
87 |
88 | END SUBROUTINE EMISSIV_SNB
emissiv_snb.F could be called by: