--- MITgcm/eesupp/src/different_multiple.F 2001/02/04 14:38:42 1.4 +++ MITgcm/eesupp/src/different_multiple.F 2001/09/21 03:54:34 1.5 @@ -1,25 +1,41 @@ -C $Header: /home/ubuntu/mnt/e9_copy/MITgcm/eesupp/src/different_multiple.F,v 1.4 2001/02/04 14:38:42 cnh Exp $ +C $Header: /home/ubuntu/mnt/e9_copy/MITgcm/eesupp/src/different_multiple.F,v 1.5 2001/09/21 03:54:34 cnh Exp $ C $Name: $ #include "CPP_EEOPTIONS.h" -CStartofinterface +CBOP +C !ROUTINE: DIFFERENT_MULTIPLE + +C !INTERFACE: 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 \==========================================================/ IMPLICIT NONE -C Returns TRUE if val1 and val2 are different multiples of freq. + +C !DESCRIPTION: +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 it 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 *==========================================================* + +C !INPUT PARAMETERS: +C == Routine arguments == +C val1, val2 :: Two times that are checked +C freq :: Frequency by which times are divided. _RL freq, val1, val2 -CEndofinterface + +C !LOCAL VARIABLES: +C == Local variables == +C f :: Temp. for holding freq +C v1, v2, v3, v4 :: Temp. for holding time +C d1, d2, d3 :: Temp. for hold difference +C step :: Temp. for hold difference used as increment _RL f, v1, v2, v3, v4, d1, d2, d3, step +CEOP C o Do easy cases first. DIFFERENT_MULTIPLE = .FALSE.