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