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

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

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


Revision 1.7 - (hide annotations) (download)
Sun May 29 17:49:39 2005 UTC (18 years, 11 months ago) by heimbach
Branch: MAIN
CVS Tags: checkpoint57m_post, checkpoint57i_post, checkpoint57n_post, checkpoint57l_post, checkpoint57p_post, checkpoint57q_post, checkpoint57j_post, checkpoint57o_post, checkpoint57k_post
Changes since 1.6: +1 -3 lines
Remove obsolete OPEN to scrunit1

1 heimbach 1.7 C $Header: /u/gcmpack/MITgcm/pkg/cal/cal_readparms.F,v 1.6 2005/05/23 19:28:44 heimbach Exp $
2 edhill 1.3 C $Name: $
3 heimbach 1.2
4 edhill 1.3 #include "CAL_OPTIONS.h"
5 heimbach 1.2
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 heimbach 1.6 integer iUnit
89 heimbach 1.2
90 heimbach 1.6 character*(max_len_mbuf) msgbuf
91 heimbach 1.2 character*(max_len_prec) record
92    
93     c == external ==
94    
95     integer ilnblnk
96     external ilnblnk
97    
98     c == end of interface ==
99    
100     c Calendar parameters
101     c (version 0.1.3 >> START << )
102    
103     namelist /CAL_NML/
104     & TheCalendar,
105     & startDate_1,startDate_2
106    
107     c (version 0.1.3 >> END << )
108    
109    
110     _BEGIN_MASTER(myThid)
111    
112 edhill 1.5 c Initialise the calendar parameters
113 heimbach 1.2 TheCalendar = ' '
114     startdate_1 = 0
115     startdate_2 = 0
116     enddate_1 = 0
117     enddate_2 = 0
118    
119     c Next, read the calendar data file.
120 heimbach 1.6 WRITE(msgBuf,'(A)') 'CAL_READPARMS: opening data.cal'
121     CALL PRINT_MESSAGE( msgBuf, standardMessageUnit,
122     & SQUEEZE_RIGHT , 1)
123    
124     CALL OPEN_COPY_DATA_FILE(
125     I 'data.cal', 'CAL_READPARMS',
126     O iUnit,
127     I myThid )
128    
129     READ(unit = iUnit, nml = cal_nml)
130    
131     WRITE(msgBuf,'(A)')
132     & 'CAL_READPARMS: finished reading data.cal'
133     CALL PRINT_MESSAGE( msgBuf, standardMessageUnit,
134     & SQUEEZE_RIGHT , 1)
135 heimbach 1.2
136 heimbach 1.6 CLOSE( iUnit )
137 heimbach 1.2
138 edhill 1.5 c Check consistency of the date specifications with the MITgcm
139 heimbach 1.2 c startTime, endTime, and nTimeSteps, then set all the calendar
140     c parameters.
141    
142     modstart = startTime
143     modend = endTime
144     modstep = deltaTclock
145     moditerini = nIter0
146     moditerend = nEndIter
147     modintsteps = nTimeSteps
148    
149     call cal_Set(
150     I modstart,
151     I modend,
152     I modstep,
153     I TheCalendar,
154     I startdate_1,
155     I startdate_2,
156     I enddate_1,
157     I enddate_2,
158     I moditerini,
159     I moditerend,
160     I modintsteps,
161     I mythid
162     & )
163    
164     call cal_Summary( mythid )
165    
166     _END_MASTER(myThid)
167    
168     c Everyone else must wait for the parameters to be loaded
169     _BARRIER
170    
171     return
172     end

  ViewVC Help
Powered by ViewVC 1.1.22