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

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

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

revision 1.1 by jmc, Tue Aug 23 13:21:08 2005 UTC revision 1.3 by jmc, Fri Jan 9 22:51:13 2009 UTC
# Line 3  C $Name$ Line 3  C $Name$
3    
4  #include "CPP_EEOPTIONS.h"  #include "CPP_EEOPTIONS.h"
5    
6        integer function MDS_RECLEN( filePrec, nnn, mythid )        INTEGER FUNCTION MDS_RECLEN( filePrec, nnn, myThid )
7  C IN:  C IN:
8  C   filePrec    integer - precision of file in bits  C   filePrec    integer :: precision of file in bits
9  C   nnn         integer - number of elements in record  C   nnn         integer :: number of elements in record
10    C   myThid      integer :: my thread id number
11  C OUT:  C OUT:
12  C   MDS_RECLEN  integer - appropriate length of record in bytes or words  C   MDS_RECLEN  integer :: appropriate length of record in bytes or words
13  C  C
14  C Created: 03/29/99 eckert@mit.edu + adcroft@mit.edu  C Created: 03/29/99 eckert@mit.edu + adcroft@mit.edu
15    
16        implicit none        IMPLICIT NONE
17    
18  C Global variables  C Global variables
19  #include "SIZE.h"  #include "SIZE.h"
20  #include "EEPARAMS.h"  #include "EEPARAMS.h"
 #include "PARAMS.h"  
21  C  C
22  C Arguments  C Arguments
23        integer filePrec        INTEGER filePrec
24        integer nnn        INTEGER nnn
25        integer mythid        INTEGER myThid
26  C  C
27  C Local  C Local
28        character*(max_len_mbuf) msgbuf        CHARACTER*(MAX_LEN_MBUF) msgBuf
29  C     ------------------------------------------------------------------  C     ------------------------------------------------------------------
30    
31        if (filePrec .EQ. precFloat32) then        IF (filePrec .EQ. precFloat32) THEN
32         MDS_RECLEN=nnn*WORDLENGTH         MDS_RECLEN = nnn*WORDLENGTH
33        elseif (filePrec .EQ. precFloat64) then        ELSEIF (filePrec .EQ. precFloat64) THEN
34         MDS_RECLEN=nnn*WORDLENGTH*2         MDS_RECLEN = nnn*WORDLENGTH*2
35        else        ELSE
36         write(msgbuf,'(a,i2.2)')         WRITE(msgBuf,'(A,I2.2)')
37       &   ' MDS_RECLEN: filePrec = ',filePrec       &   ' MDS_RECLEN: filePrec = ',filePrec
38         call print_message( msgbuf, standardmessageunit,         CALL PRINT_ERROR( msgBuf, myThid )
39       &                     SQUEEZE_RIGHT , mythid)         WRITE(msgBuf,'(A)')
        write(msgbuf,'(a)')  
40       &   ' MDS_RECLEN: illegal value for filePrec'       &   ' MDS_RECLEN: illegal value for filePrec'
41         call print_error( msgbuf, mythid )         CALL PRINT_ERROR( msgBuf, myThid )
42         stop 'ABNORMAL END: S/R MDS_RECLEN'         STOP 'ABNORMAL END: S/R MDS_RECLEN'
43        endif        ENDIF
44    
45  C     ------------------------------------------------------------------  C     ------------------------------------------------------------------
46        return        RETURN
47        end        END

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

  ViewVC Help
Powered by ViewVC 1.1.22