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

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

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


Revision 1.1 - (show annotations) (download)
Thu May 21 18:30:08 1998 UTC (25 years, 11 months ago) by cnh
Branch: MAIN
CVS Tags: checkpoint11, checkpoint10, checkpoint13, checkpoint15, checkpoint14, checkpoint5, checkpoint4, checkpoint7, checkpoint6, checkpoint3, checkpoint2, checkpoint9, checkpoint8, checkpoint12, checkpoint16, branch-point-rdot
Branch point for: checkpoint7-4degree-ref, branch-rdot
Added support for binary IO of model fields for restart and/or
postprocessing

1 C $Header: /home/ubuntu/mnt/e9_copy/MITgcm/eesupp/src/different_multiple.F,v 1.1 1998/05/21 18:30:08 cnh Exp $
2 #include "CPP_EEOPTIONS.h"
3
4 CStartofinterface
5 LOGICAL FUNCTION DIFFERENT_MULTIPLE( freq, val1, val2 )
6 C /==========================================================\
7 C | LOGICAL FUNCTION DIFFERENT_MULTIPLE |
8 C | o Checks two numbers multiple of a third number. |
9 C |==========================================================|
10 C | This routine is used for diagnostic and other periodic |
11 C | operations. It is very sensitive to arithmetic precision.|
12 C | For IEEE conforming arithmetic is works well but for |
13 C | cases where short cut arithmetic is used it may not work|
14 C | as expected. To overcome this issue compile this routine |
15 C | separately with no optimisation. |
16 C \==========================================================/
17 IMPLICIT NONE
18 C Returns TRUE if val1 and val2 are different multiples of freq.
19 REAL freq, val1, val2
20 CEndofinterface
21 DIFFERENT_MULTIPLE = .FALSE.
22 IF ( freq .EQ. 0. ) THEN
23 DIFFERENT_MULTIPLE = .FALSE.
24 ELSE
25 DIFFERENT_MULTIPLE = INT(val1/freq) .NE. INT(val2/freq)
26 ENDIF
27 END
28
29

  ViewVC Help
Powered by ViewVC 1.1.22