Oasis3 4.0.2
icoor.f
Go to the documentation of this file.
00001       FUNCTION icoor (kind, kimax)
00002 C****
00003 C               ******************************
00004 C               * OASIS FUNCTION  -  LEVEL T *
00005 C               * --------------     ------- *
00006 C               ******************************
00007 C
00008 C**** *icoor*  - Search function
00009 C
00010 C     Purpose:
00011 C     -------
00012 C     Given an index value, kind, for a 2D array which has kimax rows, 
00013 C     this function returns the row number
00014 C
00015 C**   Interface:
00016 C     ---------
00017 C       *ii =*  *icoor (kind, kimax)*
00018 C
00019 C     Input:
00020 C     -----
00021 C                kind   : index (integer)
00022 C                kimax  : number of rows (integer)
00023 C
00024 C     Output:
00025 C     ------
00026 C     None
00027 C
00028 C     Workspace:
00029 C     ---------
00030 C     None
00031 C
00032 C     Externals:
00033 C     ---------
00034 C     None
00035 C
00036 C     Reference:
00037 C     ---------
00038 C     See OASIS manual (1995)
00039 C
00040 C     History:
00041 C     -------
00042 C       Version   Programmer     Date      Description
00043 C       -------   ----------     ----      -----------  
00044 C       1.1       R. Sutton      95/11/25  Created
00045 C       2.0       L. Terray      95/12/26  Modified: to suit OASIS 2.0
00046 C
00047 C %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
00048 C
00049 C* ---------------------------- Include files ---------------------------
00050 C
00051       USE mod_unit
00052 C
00053 C* ---------------------------- Argument declarations -------------------
00054 C
00055       INTEGER (kind=ip_intwp_p) icoor
00056 C
00057 C* ---------------------------- Poema verses ----------------------------
00058 C
00059 C %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
00060 C
00061 C*    1. Find the row number 
00062 C        -------------------
00063 C      
00064       icoor = kind - ((kind-1) / kimax) * kimax
00065 C
00066 C* End of function
00067 C
00068       RETURN
00069       END
 All Data Structures Namespaces Files Functions Variables Defines