/[MITgcm]/MITgcm_contrib/heimbach/OpenAD/code_shallow_openad/mds_reclen.F
ViewVC logotype

Annotation of /MITgcm_contrib/heimbach/OpenAD/code_shallow_openad/mds_reclen.F

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


Revision 1.1 - (hide annotations) (download)
Tue Dec 13 15:15:30 2005 UTC (20 years, 10 months ago) by heimbach
Branch: MAIN
Adding new setups.

1 heimbach 1.1 C $Header: /u/gcmpack/MITgcm/verification/OpenAD/code_ad/mds_reclen.F,v 1.1 2005/12/04 06:39:18 utke 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 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     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_message( msgbuf, standardmessageunit,
39     & SQUEEZE_RIGHT , mythid)
40     write(msgbuf,'(a)')
41     & ' MDS_RECLEN: illegal value for filePrec'
42     call print_error( msgbuf, mythid )
43     stop 'ABNORMAL END: S/R MDS_RECLEN'
44     endif
45    
46     C ------------------------------------------------------------------
47     return
48     end
49    
50     subroutine ad_s_MDS_RECLEN( filePrec, nnn, mythid, reclen )
51     C IN:
52     C filePrec integer - precision of file in bits
53     C nnn integer - number of elements in record
54     C OUT:
55     C MDS_RECLEN integer - appropriate length of record in bytes or words
56     C
57     C Created: 03/29/99 eckert@mit.edu + adcroft@mit.edu
58    
59     implicit none
60    
61     C Global variables
62     #include "SIZE.h"
63     #include "EEPARAMS.h"
64     #include "PARAMS.h"
65     C
66     C Arguments
67     integer filePrec
68     integer nnn
69     integer mythid
70     integer reclen
71     C
72     C Local
73     character*(max_len_mbuf) msgbuf
74     C ------------------------------------------------------------------
75    
76     if (filePrec .EQ. precFloat32) then
77     reclen=nnn*WORDLENGTH
78     elseif (filePrec .EQ. precFloat64) then
79     reclen=nnn*WORDLENGTH*2
80     else
81     write(msgbuf,'(a,i2.2)')
82     & ' MDS_RECLEN: filePrec = ',filePrec
83     call print_message( msgbuf, standardmessageunit,
84     & SQUEEZE_RIGHT , mythid)
85     write(msgbuf,'(a)')
86     & ' MDS_RECLEN: illegal value for filePrec'
87     call print_error( msgbuf, mythid )
88     stop 'ABNORMAL END: S/R MDS_RECLEN'
89     endif
90    
91     C ------------------------------------------------------------------
92     return
93     end

  ViewVC Help
Powered by ViewVC 1.1.22