/[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.11 - (show annotations) (download)
Thu Dec 22 19:02:13 2011 UTC (12 years, 9 months ago) by jmc
Branch: MAIN
CVS Tags: checkpoint63h, checkpoint63i, checkpoint63j, checkpoint63k
Changes since 1.10: +1 -10 lines
remove un-used variables

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

  ViewVC Help
Powered by ViewVC 1.1.22