1 |
adcroft |
1.1 |
C $Header: $ |
2 |
|
|
C $Name: $ |
3 |
|
|
|
4 |
|
|
#include "MDSIO_OPTIONS.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 OUT: |
11 |
|
|
C MDS_RECLEN integer - appropriate length of record in bytes or words |
12 |
|
|
C |
13 |
|
|
C Created: 03/29/99 eckert@mit.edu + adcroft@mit.edu |
14 |
|
|
|
15 |
|
|
implicit none |
16 |
|
|
C Arguments |
17 |
|
|
integer filePrec |
18 |
|
|
integer nnn |
19 |
|
|
integer mythid |
20 |
|
|
C Global variables |
21 |
|
|
#include "SIZE.h" |
22 |
|
|
#include "EEPARAMS.h" |
23 |
|
|
#include "PARAMS.h" |
24 |
|
|
C Local |
25 |
|
|
character*(max_len_mbuf) msgbuf |
26 |
|
|
C ------------------------------------------------------------------ |
27 |
|
|
|
28 |
|
|
if (filePrec .EQ. precFloat32) then |
29 |
|
|
MDS_RECLEN=nnn*WORDLENGTH |
30 |
|
|
elseif (filePrec .EQ. precFloat64) then |
31 |
|
|
MDS_RECLEN=nnn*WORDLENGTH*2 |
32 |
|
|
else |
33 |
|
|
write(msgbuf,'(a,i2.2)') |
34 |
|
|
& ' MDS_RECLEN: filePrec = ',filePrec |
35 |
|
|
call print_message( msgbuf, standardmessageunit, |
36 |
|
|
& SQUEEZE_RIGHT , mythid) |
37 |
|
|
write(msgbuf,'(a)') |
38 |
|
|
& ' MDS_RECLEN: illegal value for filePrec' |
39 |
|
|
call print_error( msgbuf, mythid ) |
40 |
|
|
stop 'ABNORMAL END: S/R MDS_RECLEN' |
41 |
|
|
endif |
42 |
|
|
|
43 |
|
|
C ------------------------------------------------------------------ |
44 |
|
|
return |
45 |
|
|
end |