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

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

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


Revision 1.2 - (show annotations) (download)
Sun Jul 20 12:25:25 2008 UTC (15 years, 11 months ago) by jmc
Branch: MAIN
CVS Tags: checkpoint61f, checkpoint61g, checkpoint61d, checkpoint61e, checkpoint61b, checkpoint61c, checkpoint61a
Changes since 1.1: +21 -22 lines
PARAMS.h no longer needed

1 C $Header: /u/gcmpack/MITgcm/eesupp/src/mds_reclen.F,v 1.1 2005/08/23 13:21:08 jmc Exp $
2 C $Name: $
3
4 #include "CPP_EEOPTIONS.h"
5
6 INTEGER FUNCTION MDS_RECLEN( filePrec, nnn, myThid )
7 C IN:
8 C filePrec integer - precision of file in bits
9 C nnn integer - number of elements in record
10 C myThid integer - my thread id number
11 C OUT:
12 C MDS_RECLEN integer - appropriate length of record in bytes or words
13 C
14 C Created: 03/29/99 eckert@mit.edu + adcroft@mit.edu
15
16 IMPLICIT NONE
17
18 C Global variables
19 #include "SIZE.h"
20 #include "EEPARAMS.h"
21 C
22 C Arguments
23 INTEGER filePrec
24 INTEGER nnn
25 INTEGER myThid
26 C
27 C Local
28 CHARACTER*(MAX_LEN_MBUF) msgBuf
29 C ------------------------------------------------------------------
30
31 IF (filePrec .EQ. precFloat32) THEN
32 MDS_RECLEN = nnn*WORDLENGTH
33 ELSEIF (filePrec .EQ. precFloat64) THEN
34 MDS_RECLEN = nnn*WORDLENGTH*2
35 ELSE
36 WRITE(msgBuf,'(A,I2.2)')
37 & ' MDS_RECLEN: filePrec = ',filePrec
38 CALL PRINT_ERROR( msgBuf, myThid )
39 WRITE(msgBuf,'(A)')
40 & ' MDS_RECLEN: illegal value for filePrec'
41 CALL PRINT_ERROR( msgBuf, myThid )
42 STOP 'ABNORMAL END: S/R MDS_RECLEN'
43 ENDIF
44
45 C ------------------------------------------------------------------
46 RETURN
47 END

  ViewVC Help
Powered by ViewVC 1.1.22