/[MITgcm]/MITgcm/pkg/cal/cal_readparms.F
ViewVC logotype

Contents of /MITgcm/pkg/cal/cal_readparms.F

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


Revision 1.3 - (show annotations) (download)
Thu Oct 9 04:19:19 2003 UTC (20 years, 8 months ago) by edhill
Branch: MAIN
CVS Tags: checkpoint51k_post, checkpoint51o_pre, checkpoint51l_post, checkpoint52, checkpoint51t_post, checkpoint51n_post, checkpoint51s_post, checkpoint51n_pre, checkpoint52b_pre, checkpoint51l_pre, checkpoint51q_post, checkpoint52b_post, checkpoint51r_post, checkpoint51i_post, checkpoint52a_pre, checkpoint51o_post, checkpoint52a_post, ecco_c52_e35, checkpoint51m_post, checkpoint51p_post, checkpoint51u_post
Branch point for: branch-nonh, tg2-branch, checkpoint51n_branch
Changes since 1.2: +3 -1 lines
 o first check-in for the "branch-genmake2" merge
 o verification suite as run on shelley (gcc 3.2.2):

Wed Oct  8 23:42:29 EDT 2003
                T           S           U           V
G D M    c        m  s        m  s        m  s        m  s
E p a R  g  m  m  e  .  m  m  e  .  m  m  e  .  m  m  e  .
N n k u  2  i  a  a  d  i  a  a  d  i  a  a  d  i  a  a  d
2 d e n  d  n  x  n  .  n  x  n  .  n  x  n  .  n  x  n  .

OPTFILE=NONE

Y Y Y Y 13 16 16 16  0 16 16 16 16 16 16 16 16 13 12  0  0 pass  adjustment.128x64x1
Y Y Y Y 16 16 16 16  0 16 16 16 16 16 16  0  0 16 16  0  0 pass  adjustment.cs-32x32x1
Y Y Y Y 16 16 16 16  0 16 16 16 16 16 16 22  0 16 16 22  0 pass  adjust_nlfs.cs-32x32x1
Y Y Y Y -- 13 13 16 16 13 13 13 13 16 16 16 16 16 16 16 16 N/O   advect_cs
Y Y Y Y -- 22 16 16 16 16 16 16 13 16 16 16 16 16 16 16 16 N/O   advect_xy
Y Y Y Y -- 13 16 13 16 16 16 16 16 16 16 22 16 16 16 16 16 N/O   advect_xz
Y Y Y Y 16 16 16 16 16 16 16 16 16 16 16 16 16 16 16 16 16 pass  aim.5l_cs
Y Y Y Y 14 16 16 16 16 16 16 16 16 13 16 16 16 16 16 13 16 pass  aim.5l_Equatorial_Channel
Y Y Y Y 16 16 16 16 16 16 16 16 16 16 16 13 16 16 13 13 16 pass  aim.5l_LatLon
Y Y Y Y 13 16 16 16 16 16 16 16 16 16 13 12 13 13 16 13 16 pass  exp0
Y Y Y Y 14 16 16 16 16 16 16 16 22 16 16 16 13 16 16 22 16 pass  exp1
Y Y Y Y 13 13 16 13 16 16 16 16 16 13 13 16 16 13 13 13 13 pass  exp2
Y Y Y Y 16 16 16 16 16 16 16 16 22 16 16 16 16 16 16 16 16 pass  exp4
Y Y Y Y 16 16 16 16 16 16 16 16 16 16 16 22 16 16 16 22 16 pass  exp5
Y Y Y Y 16 16 16 16 16 16 16 16 16 16 16 16 16 16 16 16 16 pass  front_relax
Y Y Y Y 14 16 16 13 13 16 16 13 13 16 13 13 16 12 13 13 16 pass  global_ocean.90x40x15
Y Y Y Y 10 16 16 13 13 16 13 16 16 13 13 13 13 16 16 13 16 FAIL  global_ocean.cs32x15
Y Y Y Y  6 11 12 13 13 12 13 16 13  9  9  9  9 10  9  9 11 FAIL  global_ocean_pressure
Y Y Y Y 14 16 16 13 16 16 16 13 13 13 13 13 16 12 16 13 16 pass  global_with_exf
Y Y Y Y 14 16 16 16 16 16 16 16 16 11 13 22 13 16 16  9 16 pass  hs94.128x64x5
Y Y Y Y 13 16 16 16 16 16 16 16 16 11 16 16 16 13 16 22 13 pass  hs94.1x64x5
Y Y Y Y 14 16 16 16 16 16 16 16 16 13 16 13 13 16 16 22 13 pass  hs94.cs-32x32x5
Y Y Y Y 10 10 16 13 13 16 16 16 22 16 13 13 13 13 13 22 13 FAIL  ideal_2D_oce
Y Y Y Y  8 16 16 16 16 16 16 16 16 13 13  8 16 16 16 16 16 FAIL  internal_wave
Y Y Y Y 14 16 16 16 16 16 16 16 16 13 13 22 13 13 13 22 16 pass  inverted_barometer
Y Y Y Y 12 16 16 16 16 16 16 16 16 16 13 12 13 13 13 13 13 FAIL  lab_sea
Y Y Y Y 11 16 16 16 16 16 16 16 13 13 13 12 13 16 13 12 13 FAIL  natl_box
Y Y Y Y 16 16 16 16 16 16 16 16 22 16 16 16 16 16 16 16 16 pass  plume_on_slope
Y Y Y Y 13 16 16 16 16 13 16 16 16 16 16 16 16 13 16 16 16 pass  solid-body.cs-32x32x1

1 C $Header: /u/u3/gcmpack/MITgcm/pkg/cal/cal_readparms.F,v 1.2.4.2 2003/10/07 20:46:37 adcroft Exp $
2 C $Name: $
3
4 #include "CAL_OPTIONS.h"
5
6 subroutine cal_readparms( mythid )
7
8 c ==================================================================
9 c SUBROUTINE cal_readparms
10 c ==================================================================
11 c
12 c o This routine initialises the calendar according to the user
13 c specifications in "data.calendar".
14 c
15 c started: Christian Eckert eckert@mit.edu 30-Jun-1999
16 c
17 c changed: Christian Eckert eckert@mit.edu 29-Dec-1999
18 c
19 c - restructured the original version in order to have a
20 c better interface to the MITgcmUV.
21 c
22 c Christian Eckert eckert@mit.edu 10-Jan-2000
23 c
24 c - Modified namelist input. The data file is first copied
25 c to scrunit1 with the comment lines being left out.
26 c After this, scrunit1 is used to read the namelist data.
27 c
28 c Christian Eckert eckert@mit.edu 19-Jan-2000
29 c
30 c - Changed the role of the routine arguments. Chris Hill
31 c proposed to make the calendar less "invasive". The tool
32 c now assumes that the MITgcmUV already provides an ade-
33 c quate set of time stepping parameters. The calendar
34 c only associates a date with the given starttime of the
35 c numerical model. startdate corresponds to zero start-
36 c time. So, given niter0 or startdate .ne. zero the actual
37 c startdate of the current integration is shifted by the
38 c time interval correponding to niter0, startdate respec-
39 c tively.
40 c
41 c Christian Eckert eckert@mit.edu 03-Feb-2000
42 c
43 c - Introduced new routine and function names, cal_<NAME>,
44 c for verion 0.1.3.
45 c
46 c ==================================================================
47 c SUBROUTINE cal_readparms
48 c ==================================================================
49
50 implicit none
51
52 c == global variables ==
53
54 #include "SIZE.h"
55 #include "EEPARAMS.h"
56 #include "PARAMS.h"
57
58 c == routine arguments ==
59
60 c modstart - start time of the model integration
61 c modend - end time of the model integration
62 c moditerini - initial iteration number of the model
63 c moditerend - last iteration number of the model
64 c modstep - timestep of the numerical model
65 c modintsteps - number of timesteps that are to be performed.
66 c mythid - number of this instance of the subrotuine.
67
68 _RL modstart
69 _RL modend
70 _RL modstep
71 integer moditerini
72 integer moditerend
73 integer modintsteps
74 integer mythid
75
76 c == local variables ==
77
78 integer errio
79 integer ierr
80 integer il
81 integer enddate_1
82 integer enddate_2
83
84 c Variables related to the calendar tool.
85 character*(9) TheCalendar
86 integer startdate_1
87 integer startdate_2
88
89 character*(max_len_prec) record
90
91 c == external ==
92
93 integer ilnblnk
94 external ilnblnk
95
96 c == end of interface ==
97
98 c Calendar parameters
99 c (version 0.1.3 >> START << )
100
101 namelist /CAL_NML/
102 & TheCalendar,
103 & startDate_1,startDate_2
104
105 c (version 0.1.3 >> END << )
106
107
108 _BEGIN_MASTER(myThid)
109
110 #ifndef ALLOW_CAL_NENDITER
111 print *, 'WARNING: ALLOW_CAL_NENDITER must be defined in CPP file'
112 STOP 'undef ALLOW_CAL_NENDITER no longer supported by cal package'
113 #endif
114
115 c Initialise the calendar's parameters
116 TheCalendar = ' '
117 startdate_1 = 0
118 startdate_2 = 0
119 enddate_1 = 0
120 enddate_2 = 0
121
122 open(unit=scrunit1,status='scratch')
123
124 c Next, read the calendar data file.
125 open(unit = modeldataunit,file = 'data.cal',
126 & status = 'old', iostat = errio)
127 if ( errio .lt. 0 ) then
128 ierr = 1
129 call cal_PrintError( ierr, mythid )
130 stop ' stopped in cal_readparms.'
131 endif
132
133 do while ( .true. )
134 read(modeldataunit, fmt='(a)', end=1001) record
135 il = max(ilnblnk(record),1)
136 if ( record(1:1) .ne. commentcharacter )
137 & write(unit=scrunit1, fmt='(a)') record(:il)
138 enddo
139 1001 continue
140
141 close( modeldataunit )
142
143 rewind( scrunit1 )
144 read(unit = scrunit1, nml = cal_nml)
145 close( scrunit1 )
146
147
148 c Check consistency of the date specifications with the MITgcmUV's
149 c startTime, endTime, and nTimeSteps, then set all the calendar
150 c parameters.
151
152 modstart = startTime
153 modend = endTime
154 modstep = deltaTclock
155 moditerini = nIter0
156 moditerend = nEndIter
157 modintsteps = nTimeSteps
158
159 call cal_Set(
160 I modstart,
161 I modend,
162 I modstep,
163 I TheCalendar,
164 I startdate_1,
165 I startdate_2,
166 I enddate_1,
167 I enddate_2,
168 I moditerini,
169 I moditerend,
170 I modintsteps,
171 I mythid
172 & )
173
174 call cal_Summary( mythid )
175
176 _END_MASTER(myThid)
177
178 c Everyone else must wait for the parameters to be loaded
179 _BARRIER
180
181 return
182 end

  ViewVC Help
Powered by ViewVC 1.1.22