/[MITgcm]/MITgcm/pkg/grdchk/grdchk_readparms.F
ViewVC logotype

Contents of /MITgcm/pkg/grdchk/grdchk_readparms.F

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


Revision 1.8 - (show annotations) (download)
Tue Mar 23 19:42:53 2004 UTC (20 years, 2 months ago) by heimbach
Branch: MAIN
CVS Tags: checkpoint57g_pre, checkpoint57b_post, checkpoint57g_post, checkpoint56b_post, checkpoint54d_post, checkpoint54e_post, checkpoint57d_post, checkpoint55, checkpoint54, checkpoint57, checkpoint56, checkpoint53, checkpoint54f_post, checkpoint55i_post, checkpoint55c_post, checkpoint57f_post, checkpoint53d_post, checkpoint57a_post, checkpoint57h_pre, checkpoint54b_post, checkpoint57h_post, checkpoint52m_post, checkpoint55g_post, checkpoint57c_post, checkpoint55d_post, checkpoint54a_pre, checkpoint53c_post, checkpoint55d_pre, checkpoint57c_pre, checkpoint55j_post, checkpoint54a_post, checkpoint55h_post, checkpoint57e_post, checkpoint55b_post, checkpoint53a_post, checkpoint55f_post, checkpoint53g_post, eckpoint57e_pre, checkpoint56a_post, checkpoint53f_post, checkpoint57h_done, checkpoint57f_pre, checkpoint52n_post, checkpoint53b_pre, checkpoint56c_post, checkpoint57a_pre, checkpoint55a_post, checkpoint53b_post, checkpoint53d_pre, checkpoint55e_post, checkpoint54c_post
Changes since 1.7: +15 -5 lines
Added functionality to grdchk:
pick global i,j,k position (or nearest wet) where to perform check.

1 C $Header: /u/gcmpack/MITgcm/pkg/grdchk/grdchk_readparms.F,v 1.7 2003/10/27 22:32:55 heimbach Exp $
2
3 #include "CPP_OPTIONS.h"
4
5
6 subroutine grdchk_readparms( mythid )
7
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 #ifdef ALLOW_GRDCHK
36 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
48 character*(max_len_prec) record
49
50 c == external ==
51
52 integer ilnblnk
53 external ilnblnk
54
55 c == end of interface ==
56
57 c-- Optimization parameters.
58 namelist /grdchk_nml/
59 & grdchk_eps,
60 & nbeg,
61 & nstep,
62 & nend,
63 & grdchkvarindex,
64 & useCentralDiff,
65 & grdchkwhichproc,
66 & iGloPos,
67 & jGloPos,
68 & kGloPos,
69 & obcsglo,
70 & recglo
71
72 jtlo = mybylo(mythid)
73 jthi = mybyhi(mythid)
74 itlo = mybxlo(mythid)
75 ithi = mybxhi(mythid)
76 jmin = 1-oly
77 jmax = sny+oly
78 imin = 1-olx
79 imax = snx+olx
80
81 _BEGIN_MASTER( mythid )
82
83 c-- Set default values.
84 grdchk_eps = 1. _d 0
85 nbeg = 0
86 nend = 0
87 nstep = 0
88 useCentralDiff = .TRUE.
89 grdchkwhichproc = 0
90 iGloPos = 0
91 jGloPos = 0
92 kGloPos = 1
93 obcsglo = 1
94 recglo = 1
95
96 c-- Check versions.
97
98 open(unit=scrunit1,status='scratch')
99
100 c-- Next, read the forcing data file.
101 open(unit = modeldataunit,file = 'data.grdchk',
102 & status = 'old', iostat = errio)
103 if ( errio .lt. 0 ) then
104 stop ' ... stopped in grdchk_readparms.'
105 endif
106
107 do while ( .true. )
108 read(modeldataunit, fmt='(a)', end=1001) record
109 il = max(ilnblnk(record),1)
110 if ( record(1:1) .ne. commentcharacter )
111 & write(unit=scrunit1, fmt='(a)') record(:il)
112 enddo
113 1001 continue
114
115 close( modeldataunit )
116
117 rewind( scrunit1 )
118 read(unit = scrunit1, nml = grdchk_nml)
119 close( scrunit1 )
120
121 c-- Summarize the gradient check's setup.
122 call grdchk_Summary( mythid )
123 _END_MASTER( mythid )
124
125 _BARRIER
126
127 #endif /* ALLOW_GRDCHK */
128
129 end
130
131

  ViewVC Help
Powered by ViewVC 1.1.22