/[MITgcm]/MITgcm/eesupp/src/different_multiple.F
ViewVC logotype

Diff of /MITgcm/eesupp/src/different_multiple.F

Parent Directory Parent Directory | Revision Log Revision Log | View Revision Graph Revision Graph | View Patch Patch

revision 1.3 by adcroft, Mon May 24 14:57:55 1999 UTC revision 1.5 by cnh, Fri Sep 21 03:54:34 2001 UTC
# Line 1  Line 1 
1  C     $Header$  C     $Header$
2    C $Name$
3  #include "CPP_EEOPTIONS.h"  #include "CPP_EEOPTIONS.h"
4    
5  CStartofinterface  CBOP
6    C     !ROUTINE: DIFFERENT_MULTIPLE
7    
8    C     !INTERFACE:
9        LOGICAL FUNCTION DIFFERENT_MULTIPLE( freq, val1, val2 )        LOGICAL FUNCTION DIFFERENT_MULTIPLE( freq, val1, val2 )
 C     /==========================================================\  
 C     | LOGICAL FUNCTION DIFFERENT_MULTIPLE                      |  
 C     | o Checks two numbers multiple of a third number.         |  
 C     |==========================================================|  
 C     | This routine is used for diagnostic and other periodic   |  
 C     | operations. It is very sensitive to arithmetic precision.|  
 C     | For IEEE conforming arithmetic is works well but for     |  
 C     | cases where short cut arithmetic  is used it may not work|  
 C     | as expected. To overcome this issue compile this routine |  
 C     | separately with no optimisation.                         |  
 C     \==========================================================/  
10        IMPLICIT NONE        IMPLICIT NONE
11  C     Returns TRUE if val1 and val2 are different multiples of freq.  
12    C     !DESCRIPTION:
13    C     *==========================================================*
14    C     | LOGICAL FUNCTION DIFFERENT_MULTIPLE                      
15    C     | o Checks two numbers multiple of a third number.          
16    C     *==========================================================*
17    C     | This routine is used for diagnostic and other periodic    
18    C     | operations. It is very sensitive to arithmetic precision.
19    C     | For IEEE conforming arithmetic it works well but for      
20    C     | cases where short cut arithmetic  is used it may not work
21    C     | as expected. To overcome this issue compile this routine  
22    C     | separately with no optimisation.                          
23    C     *==========================================================*
24    
25    C     !INPUT PARAMETERS:
26    C     == Routine arguments ==
27    C     val1, val2 :: Two times that are checked
28    C     freq       :: Frequency by which times are divided.
29        _RL  freq, val1, val2        _RL  freq, val1, val2
30  CEndofinterface  
31    C     !LOCAL VARIABLES:
32    C     == Local variables ==
33    C     f              :: Temp. for holding freq
34    C     v1, v2, v3, v4 :: Temp. for holding time
35    C     d1, d2, d3     :: Temp. for hold difference
36    C     step           :: Temp. for hold difference used as increment
37        _RL  f, v1, v2, v3, v4, d1, d2, d3, step        _RL  f, v1, v2, v3, v4, d1, d2, d3, step
38    CEOP
39    
40  C     o Do easy cases first.  C     o Do easy cases first.
41        DIFFERENT_MULTIPLE = .FALSE.        DIFFERENT_MULTIPLE = .FALSE.

Legend:
Removed from v.1.3  
changed lines
  Added in v.1.5

  ViewVC Help
Powered by ViewVC 1.1.22