1 |
heimbach |
1.9 |
C $Header: /u/gcmpack/MITgcm/pkg/grdchk/grdchk_readparms.F,v 1.8 2004/03/23 19:42:53 heimbach Exp $ |
2 |
heimbach |
1.2 |
|
3 |
|
|
#include "CPP_OPTIONS.h" |
4 |
|
|
|
5 |
|
|
|
6 |
heimbach |
1.5 |
subroutine grdchk_readparms( mythid ) |
7 |
heimbach |
1.2 |
|
8 |
|
|
c ================================================================== |
9 |
|
|
c SUBROUTINE grdchk_readparms |
10 |
|
|
c ================================================================== |
11 |
|
|
c |
12 |
|
|
c o Initialize the ECCO gradient check. |
13 |
|
|
c |
14 |
|
|
c started: Christian Eckert eckert@mit.edu 03-Mar-2000 |
15 |
|
|
c continued: heimbach@mit.edu: 13-Jun-2001 |
16 |
|
|
c |
17 |
|
|
c ================================================================== |
18 |
|
|
c SUBROUTINE grdchk_readparms |
19 |
|
|
c ================================================================== |
20 |
|
|
|
21 |
|
|
implicit none |
22 |
|
|
|
23 |
|
|
c == global variables == |
24 |
|
|
|
25 |
|
|
#include "EEPARAMS.h" |
26 |
|
|
#include "SIZE.h" |
27 |
|
|
|
28 |
|
|
#include "ctrl.h" |
29 |
|
|
#include "grdchk.h" |
30 |
|
|
|
31 |
|
|
c == routine arguments == |
32 |
|
|
|
33 |
|
|
integer mythid |
34 |
|
|
|
35 |
heimbach |
1.7 |
#ifdef ALLOW_GRDCHK |
36 |
heimbach |
1.2 |
c == local variables == |
37 |
|
|
|
38 |
|
|
integer i,j,k |
39 |
|
|
integer bi,bj |
40 |
|
|
integer itlo,ithi |
41 |
|
|
integer jtlo,jthi |
42 |
|
|
integer jmin,jmax |
43 |
|
|
integer imin,imax |
44 |
|
|
|
45 |
|
|
integer errio |
46 |
|
|
integer il |
47 |
heimbach |
1.9 |
integer iUnit |
48 |
heimbach |
1.2 |
|
49 |
heimbach |
1.9 |
character*(max_len_mbuf) msgbuf |
50 |
heimbach |
1.2 |
character*(max_len_prec) record |
51 |
|
|
|
52 |
|
|
c == external == |
53 |
|
|
|
54 |
|
|
integer ilnblnk |
55 |
|
|
external ilnblnk |
56 |
|
|
|
57 |
|
|
c == end of interface == |
58 |
|
|
|
59 |
|
|
c-- Optimization parameters. |
60 |
|
|
namelist /grdchk_nml/ |
61 |
|
|
& grdchk_eps, |
62 |
|
|
& nbeg, |
63 |
|
|
& nstep, |
64 |
|
|
& nend, |
65 |
heimbach |
1.3 |
& grdchkvarindex, |
66 |
heimbach |
1.5 |
& useCentralDiff, |
67 |
heimbach |
1.8 |
& grdchkwhichproc, |
68 |
|
|
& iGloPos, |
69 |
|
|
& jGloPos, |
70 |
|
|
& kGloPos, |
71 |
|
|
& obcsglo, |
72 |
|
|
& recglo |
73 |
heimbach |
1.2 |
|
74 |
|
|
jtlo = mybylo(mythid) |
75 |
|
|
jthi = mybyhi(mythid) |
76 |
|
|
itlo = mybxlo(mythid) |
77 |
|
|
ithi = mybxhi(mythid) |
78 |
|
|
jmin = 1-oly |
79 |
|
|
jmax = sny+oly |
80 |
|
|
imin = 1-olx |
81 |
|
|
imax = snx+olx |
82 |
|
|
|
83 |
|
|
_BEGIN_MASTER( mythid ) |
84 |
|
|
|
85 |
|
|
c-- Set default values. |
86 |
heimbach |
1.5 |
grdchk_eps = 1. _d 0 |
87 |
heimbach |
1.8 |
nbeg = 0 |
88 |
|
|
nend = 0 |
89 |
|
|
nstep = 0 |
90 |
heimbach |
1.5 |
useCentralDiff = .TRUE. |
91 |
|
|
grdchkwhichproc = 0 |
92 |
heimbach |
1.8 |
iGloPos = 0 |
93 |
|
|
jGloPos = 0 |
94 |
|
|
kGloPos = 1 |
95 |
|
|
obcsglo = 1 |
96 |
|
|
recglo = 1 |
97 |
heimbach |
1.2 |
|
98 |
|
|
|
99 |
heimbach |
1.9 |
c Next, read the calendar data file. |
100 |
|
|
WRITE(msgBuf,'(A)') 'GRDCHK_READPARMS: opening data.grdchk' |
101 |
|
|
CALL PRINT_MESSAGE( msgBuf, standardMessageUnit, |
102 |
|
|
& SQUEEZE_RIGHT , 1) |
103 |
|
|
|
104 |
|
|
CALL OPEN_COPY_DATA_FILE( |
105 |
|
|
I 'data.grdchk', 'GRDCHK_READPARMS', |
106 |
|
|
O iUnit, |
107 |
|
|
I myThid ) |
108 |
|
|
|
109 |
|
|
READ(unit = iUnit, nml = grdchk_nml) |
110 |
|
|
|
111 |
|
|
WRITE(msgBuf,'(A)') |
112 |
|
|
& 'GRDCHK_READPARMS: finished reading data.grdchk' |
113 |
|
|
CALL PRINT_MESSAGE( msgBuf, standardMessageUnit, |
114 |
|
|
& SQUEEZE_RIGHT , 1) |
115 |
heimbach |
1.2 |
|
116 |
heimbach |
1.9 |
CLOSE( iUnit ) |
117 |
heimbach |
1.2 |
|
118 |
|
|
c-- Summarize the gradient check's setup. |
119 |
|
|
call grdchk_Summary( mythid ) |
120 |
|
|
_END_MASTER( mythid ) |
121 |
|
|
|
122 |
|
|
_BARRIER |
123 |
|
|
|
124 |
heimbach |
1.7 |
#endif /* ALLOW_GRDCHK */ |
125 |
heimbach |
1.2 |
|
126 |
|
|
end |
127 |
|
|
|
128 |
|
|
|