1 |
C $Header: $ |
2 |
C $Name: $ |
3 |
|
4 |
#include "CPP_EEOPTIONS.h" |
5 |
|
6 |
subroutine oad_s_MDS_RECLEN( filePrec, nnn, myThid, reclen ) |
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 |
|
17 |
C Global variables |
18 |
#include "SIZE.h" |
19 |
#include "EEPARAMS.h" |
20 |
#include "PARAMS.h" |
21 |
C |
22 |
C Arguments |
23 |
integer filePrec |
24 |
integer nnn |
25 |
integer myThid |
26 |
integer reclen |
27 |
C |
28 |
C Local |
29 |
character*(max_len_mbuf) msgbuf |
30 |
C ------------------------------------------------------------------ |
31 |
|
32 |
if (filePrec .EQ. precFloat32) then |
33 |
reclen=nnn*WORDLENGTH |
34 |
elseif (filePrec .EQ. precFloat64) then |
35 |
reclen=nnn*WORDLENGTH*2 |
36 |
else |
37 |
write(msgbuf,'(a,i2.2)') |
38 |
& ' MDS_RECLEN: filePrec = ',filePrec |
39 |
call print_message( msgbuf, standardmessageunit, |
40 |
& SQUEEZE_RIGHT , myThid) |
41 |
write(msgbuf,'(a)') |
42 |
& ' MDS_RECLEN: illegal value for filePrec' |
43 |
call print_error( msgbuf, myThid ) |
44 |
stop 'ABNORMAL END: S/R MDS_RECLEN' |
45 |
endif |
46 |
|
47 |
C ------------------------------------------------------------------ |
48 |
return |
49 |
end |