source: LMDZ5/branches/IPSLCM5A2.1_ISO/libf/phyiso/rrtm/mysendset_mod.F90

Last change on this file was 3331, checked in by acozic, 7 years ago

Add modification for isotopes

  • Property svn:executable set to *
File size: 1.4 KB
Line 
1MODULE MYSENDSET_MOD
2CONTAINS
3FUNCTION MYSENDSET(KSETS,KMYSET,KSET)
4
5#ifdef DOC
6
7!**** *MYSENDSET* RETURNS SET NUMBER TO SEND TO
8
9!     Purpose.
10!     --------
11!       
12
13!**   Interface.
14!     ----------
15!        ISENDSET = MYSENDSET(KSETS,KMYSET,KSET)
16
17!        Explicit arguments : 
18!        --------------------
19!                  input:   KSETS
20
21!        Implicit arguments :  NONE
22!        --------------------
23!     Method.
24!     -------
25
26!     Externals.
27!     ----------
28!         NONE
29
30!     Reference.
31!     ----------
32!        ECMWF Research Department documentation of the IFS
33
34!     Author.
35!     -------
36!        Mats Hamrud *ECMWF*
37
38!     Modifications.
39!     --------------
40!        Original : 00-02-03
41
42!     ------------------------------------------------------------------
43#endif
44
45USE PARKIND1  ,ONLY : JPIM     ,JPRB
46USE ABORT_TRANS_MOD
47
48IMPLICIT NONE
49INTEGER(KIND=JPIM) :: MYSENDSET
50INTEGER(KIND=JPIM),INTENT(IN)  :: KSETS,KMYSET,KSET
51
52
53!     ------------------------------------------------------------------
54
55!*       1.    Check input argument for validity
56!              ---------------------------------
57
58IF(KSETS < 1 .OR. KMYSET > KSETS .OR. KSET > KSETS-1) THEN
59
60  CALL ABORT_TRANS(' MYSENDSET: INVALID ARGUMENT ')
61
62ELSE
63
64!*       2.    Compute output parameters
65!              -------------------------
66
67  MYSENDSET = MOD(KMYSET+KSET-1,KSETS)+1
68
69ENDIF
70
71END FUNCTION MYSENDSET
72END MODULE MYSENDSET_MOD
Note: See TracBrowser for help on using the repository browser.