/[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.8 - (show annotations) (download)
Thu Sep 1 05:26:43 2005 UTC (18 years, 10 months ago) by heimbach
Branch: MAIN
CVS Tags: checkpoint57s_post, checkpoint58b_post, checkpoint57y_post, checkpoint57r_post, checkpoint58, checkpoint58a_post, checkpoint57z_post, checkpoint57t_post, checkpoint57v_post, checkpoint57y_pre, checkpint57u_post, checkpoint57w_post, checkpoint57x_post
Changes since 1.7: +2 -3 lines
Moving startDate_1, startDate_2 to COMMON block

1 C $Header: /u/gcmpack/MITgcm/pkg/cal/cal_readparms.F,v 1.7 2005/05/29 17:49:39 heimbach 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 #include "cal.h"
58
59 c == routine arguments ==
60
61 c modstart - start time of the model integration
62 c modend - end time of the model integration
63 c moditerini - initial iteration number of the model
64 c moditerend - last iteration number of the model
65 c modstep - timestep of the numerical model
66 c modintsteps - number of timesteps that are to be performed.
67 c mythid - number of this instance of the subrotuine.
68
69 _RL modstart
70 _RL modend
71 _RL modstep
72 integer moditerini
73 integer moditerend
74 integer modintsteps
75 integer mythid
76
77 c == local variables ==
78
79 integer errio
80 integer ierr
81 integer il
82 integer enddate_1
83 integer enddate_2
84
85 c Variables related to the calendar tool.
86 character*(9) TheCalendar
87 integer iUnit
88
89 character*(max_len_mbuf) msgbuf
90 character*(max_len_prec) record
91
92 c == external ==
93
94 integer ilnblnk
95 external ilnblnk
96
97 c == end of interface ==
98
99 c Calendar parameters
100 c (version 0.1.3 >> START << )
101
102 namelist /CAL_NML/
103 & TheCalendar,
104 & startDate_1,startDate_2
105
106 c (version 0.1.3 >> END << )
107
108
109 _BEGIN_MASTER(myThid)
110
111 c Initialise the calendar parameters
112 TheCalendar = ' '
113 startdate_1 = 0
114 startdate_2 = 0
115 enddate_1 = 0
116 enddate_2 = 0
117
118 c Next, read the calendar data file.
119 WRITE(msgBuf,'(A)') 'CAL_READPARMS: opening data.cal'
120 CALL PRINT_MESSAGE( msgBuf, standardMessageUnit,
121 & SQUEEZE_RIGHT , 1)
122
123 CALL OPEN_COPY_DATA_FILE(
124 I 'data.cal', 'CAL_READPARMS',
125 O iUnit,
126 I myThid )
127
128 READ(unit = iUnit, nml = cal_nml)
129
130 WRITE(msgBuf,'(A)')
131 & 'CAL_READPARMS: finished reading data.cal'
132 CALL PRINT_MESSAGE( msgBuf, standardMessageUnit,
133 & SQUEEZE_RIGHT , 1)
134
135 CLOSE( iUnit )
136
137 c Check consistency of the date specifications with the MITgcm
138 c startTime, endTime, and nTimeSteps, then set all the calendar
139 c parameters.
140
141 modstart = startTime
142 modend = endTime
143 modstep = deltaTclock
144 moditerini = nIter0
145 moditerend = nEndIter
146 modintsteps = nTimeSteps
147
148 call cal_Set(
149 I modstart,
150 I modend,
151 I modstep,
152 I TheCalendar,
153 I startdate_1,
154 I startdate_2,
155 I enddate_1,
156 I enddate_2,
157 I moditerini,
158 I moditerend,
159 I modintsteps,
160 I mythid
161 & )
162
163 call cal_Summary( mythid )
164
165 _END_MASTER(myThid)
166
167 c Everyone else must wait for the parameters to be loaded
168 _BARRIER
169
170 return
171 end

  ViewVC Help
Powered by ViewVC 1.1.22