/[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.9 - (show annotations) (download)
Mon Mar 20 15:14:27 2006 UTC (18 years, 2 months ago) by jmc
Branch: MAIN
CVS Tags: checkpoint62v, checkpoint62u, checkpoint62t, checkpoint62c, checkpoint59, checkpoint58f_post, checkpoint58d_post, checkpoint62s, checkpoint62r, checkpoint62q, checkpoint62p, checkpoint62a, checkpoint62g, checkpoint62f, checkpoint62e, checkpoint62d, checkpoint62k, checkpoint62j, checkpoint62i, checkpoint62h, checkpoint62o, checkpoint62n, checkpoint62m, checkpoint62l, checkpoint62w, checkpoint62z, checkpoint62y, checkpoint62x, checkpoint58y_post, checkpoint58t_post, checkpoint58m_post, checkpoint60, checkpoint61, checkpoint62, checkpoint63, checkpoint58w_post, checkpoint58o_post, checkpoint58p_post, checkpoint58q_post, checkpoint58e_post, checkpoint63a, checkpoint63b, checkpoint63c, checkpoint58r_post, checkpoint58n_post, checkpoint59q, checkpoint59p, checkpoint59r, checkpoint59e, checkpoint59d, checkpoint59g, checkpoint59f, checkpoint59a, checkpoint59c, checkpoint59b, checkpoint59m, checkpoint59l, checkpoint59o, checkpoint59n, checkpoint59i, checkpoint59h, checkpoint59k, checkpoint58k_post, checkpoint62b, checkpoint58v_post, checkpoint58l_post, checkpoint61f, checkpoint58g_post, checkpoint58x_post, checkpoint61n, checkpoint59j, checkpoint58h_post, checkpoint58j_post, checkpoint61q, checkpoint61e, checkpoint58i_post, checkpoint58c_post, checkpoint58u_post, checkpoint58s_post, checkpoint61g, checkpoint61d, checkpoint61b, checkpoint61c, checkpoint61a, checkpoint61o, checkpoint61l, checkpoint61m, checkpoint61j, checkpoint61k, checkpoint61h, checkpoint61i, checkpoint61v, checkpoint61w, checkpoint61t, checkpoint61u, checkpoint61r, checkpoint61s, checkpoint61p, checkpoint61z, checkpoint61x, checkpoint61y
Changes since 1.8: +4 -2 lines
move calendarDumps from "data" to "data.cal" and clean-up the code
 with a simple call to pkg/cal S/R: CAL_TIME2WRITE
 (the former piece of code started to spread over newly checked-in S/R)

1 C $Header: /u/gcmpack/MITgcm/pkg/cal/cal_readparms.F,v 1.8 2005/09/01 05:26:43 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 & calendarDumps
106
107 c (version 0.1.3 >> END << )
108
109
110 _BEGIN_MASTER(myThid)
111
112 c Initialise the calendar parameters
113 TheCalendar = ' '
114 startdate_1 = 0
115 startdate_2 = 0
116 enddate_1 = 0
117 enddate_2 = 0
118 calendarDumps = .FALSE.
119
120 c Next, read the calendar data file.
121 WRITE(msgBuf,'(A)') 'CAL_READPARMS: opening data.cal'
122 CALL PRINT_MESSAGE( msgBuf, standardMessageUnit,
123 & SQUEEZE_RIGHT , 1)
124
125 CALL OPEN_COPY_DATA_FILE(
126 I 'data.cal', 'CAL_READPARMS',
127 O iUnit,
128 I myThid )
129
130 READ(unit = iUnit, nml = cal_nml)
131
132 WRITE(msgBuf,'(A)')
133 & 'CAL_READPARMS: finished reading data.cal'
134 CALL PRINT_MESSAGE( msgBuf, standardMessageUnit,
135 & SQUEEZE_RIGHT , 1)
136
137 CLOSE( iUnit )
138
139 c Check consistency of the date specifications with the MITgcm
140 c startTime, endTime, and nTimeSteps, then set all the calendar
141 c parameters.
142
143 modstart = startTime
144 modend = endTime
145 modstep = deltaTclock
146 moditerini = nIter0
147 moditerend = nEndIter
148 modintsteps = nTimeSteps
149
150 call cal_Set(
151 I modstart,
152 I modend,
153 I modstep,
154 I TheCalendar,
155 I startdate_1,
156 I startdate_2,
157 I enddate_1,
158 I enddate_2,
159 I moditerini,
160 I moditerend,
161 I modintsteps,
162 I mythid
163 & )
164
165 call cal_Summary( mythid )
166
167 _END_MASTER(myThid)
168
169 c Everyone else must wait for the parameters to be loaded
170 _BARRIER
171
172 return
173 end

  ViewVC Help
Powered by ViewVC 1.1.22