/[MITgcm]/MITgcm/pkg/ctrl/ctrl_readparms.F
ViewVC logotype

Annotation of /MITgcm/pkg/ctrl/ctrl_readparms.F

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


Revision 1.4 - (hide annotations) (download)
Thu Oct 2 21:34:45 2003 UTC (20 years, 8 months ago) by heimbach
Branch: MAIN
CVS Tags: checkpoint51k_post, checkpoint51l_post, checkpoint51j_post, checkpoint51i_post, checkpoint51h_pre, checkpoint51l_pre, checkpoint51g_post, checkpoint51i_pre, checkpoint51m_post
Branch point for: tg2-branch
Changes since 1.3: +6 -4 lines
Bringing cost/ ctrl/ up to date.

1 heimbach 1.4 C $Header: /u/gcmpack/MITgcm/pkg/ctrl/ctrl_readparms.F,v 1.3 2003/06/24 16:07:07 heimbach Exp $
2 heimbach 1.2
3     #include "CTRL_CPPOPTIONS.h"
4    
5    
6     subroutine ctrl_readparms( mythid )
7    
8     c ==================================================================
9     c SUBROUTINE ctrl_readparms
10     c ==================================================================
11     c
12     c o read ctrl parameters
13     c split from ctrl_init
14     c
15     c started: heimbach@mit.edu 12-Jun-2003
16     c
17     c ==================================================================
18     c SUBROUTINE ctrl_readparms
19     c ==================================================================
20    
21     implicit none
22    
23     c == global variables ==
24    
25     #include "EEPARAMS.h"
26     #include "SIZE.h"
27     #include "PARAMS.h"
28     #include "GRID.h"
29     #include "ctrl.h"
30    
31     #ifdef ALLOW_OBCS_CONTROL
32     # include "OBCS.h"
33     #endif
34     #ifdef ALLOW_ECCO_OPTIMIZATION
35     # include "optim.h"
36     #endif
37    
38     c == routine arguments ==
39    
40     integer mythid
41    
42     c == local variables ==
43    
44     integer bi,bj
45     integer i,j,k
46     integer ntmp
47     integer ivarindex
48    
49     integer iobcs
50     integer il
51     integer errio
52     integer startrec
53     integer endrec
54     integer difftime(4)
55     _RL diffsecs
56     _RL dummy
57    
58     character*(80) ymaskobcs
59     character*(max_len_prec) record
60     character*(max_len_mbuf) msgbuf
61    
62     integer nwetc3d
63    
64     c == external ==
65    
66     integer ilnblnk
67     external ilnblnk
68    
69     c == end of interface ==
70    
71     c-- Read the namelist input.
72     namelist /ctrl_nml/
73     & xx_theta_file,
74     & xx_salt_file,
75     & xx_hflux_file,
76     & xx_hfluxstartdate1, xx_hfluxstartdate2, xx_hfluxperiod,
77     & xx_sflux_file,
78     & xx_sfluxstartdate1, xx_sfluxstartdate2, xx_sfluxperiod,
79     & xx_tauu_file,
80     & xx_tauustartdate1, xx_tauustartdate2, xx_tauuperiod,
81     & xx_tauv_file,
82     & xx_tauvstartdate1, xx_tauvstartdate2, xx_tauvperiod,
83     & xx_atemp_file,
84     & xx_atempstartdate1, xx_atempstartdate2, xx_atempperiod,
85     & xx_aqh_file,
86     & xx_aqhstartdate1, xx_aqhstartdate2, xx_aqhperiod,
87     & xx_uwind_file,
88     & xx_uwindstartdate1, xx_uwindstartdate2, xx_uwindperiod,
89     & xx_vwind_file,
90     & xx_vwindstartdate1, xx_vwindstartdate2, xx_vwindperiod,
91     & xx_obcsn_file,
92     & xx_obcsnstartdate1, xx_obcsnstartdate2, xx_obcsnperiod,
93     & xx_obcss_file,
94     & xx_obcssstartdate1, xx_obcssstartdate2, xx_obcssperiod,
95     & xx_obcsw_file,
96     & xx_obcswstartdate1, xx_obcswstartdate2, xx_obcswperiod,
97     & xx_obcse_file,
98     & xx_obcsestartdate1, xx_obcsestartdate2, xx_obcseperiod,
99     & xx_diffkr_file,
100     & xx_kapgm_file,
101     & xx_tr1_file,
102     & xx_sst_file,
103     & xx_sss_file,
104     & xx_hfacc_file,
105     & xx_efluxy_file,
106     & xx_efluxp_file,
107     & xx_bottomdrag_file
108    
109     namelist /ctrl_packnames/
110     & yadmark, yctrlid,
111     & ctrlname, costname, scalname, maskname, metaname
112    
113     _BEGIN_MASTER( myThid )
114    
115     c-- Set default values.
116     xx_theta_file = ' '
117     xx_salt_file = ' '
118     xx_hfluxstartdate1 = 0
119     xx_hfluxstartdate2 = 0
120     xx_hfluxperiod = 0. _d 0
121     xx_hflux_file = ' '
122     xx_sfluxstartdate1 = 0
123     xx_sfluxstartdate2 = 0
124     xx_sfluxperiod = 0. _d 0
125     xx_sflux_file = ' '
126     xx_tauustartdate1 = 0
127     xx_tauustartdate2 = 0
128     xx_tauuperiod = 0. _d 0
129     xx_tauu_file = ' '
130     xx_tauvstartdate1 = 0
131     xx_tauvstartdate2 = 0
132     xx_tauvperiod = 0. _d 0
133     xx_tauv_file = ' '
134     xx_atempstartdate1 = 0
135     xx_atempstartdate2 = 0
136     xx_atempperiod = 0. _d 0
137     xx_atemp_file = ' '
138     xx_aqhstartdate1 = 0
139     xx_aqhstartdate2 = 0
140     xx_aqhperiod = 0. _d 0
141     xx_aqh_file = ' '
142     xx_uwindstartdate1 = 0
143     xx_uwindstartdate2 = 0
144     xx_uwindperiod = 0. _d 0
145     xx_uwind_file = ' '
146     xx_vwindstartdate1 = 0
147     xx_vwindstartdate2 = 0
148     xx_vwindperiod = 0. _d 0
149     xx_vwind_file = ' '
150     xx_obcsnstartdate1 = 0
151     xx_obcsnstartdate2 = 0
152     xx_obcsnperiod = 0. _d 0
153     xx_obcsn_file = ' '
154     xx_obcssstartdate1 = 0
155     xx_obcssstartdate2 = 0
156     xx_obcssperiod = 0. _d 0
157     xx_obcss_file = ' '
158     xx_obcswstartdate1 = 0
159     xx_obcswstartdate2 = 0
160     xx_obcswperiod = 0. _d 0
161     xx_obcsw_file = ' '
162     xx_obcsestartdate1 = 0
163     xx_obcsestartdate2 = 0
164     xx_obcseperiod = 0. _d 0
165     xx_obcse_file = ' '
166     xx_diffkr_file = ' '
167     xx_kapgm_file = ' '
168     xx_tr1_file = ' '
169     xx_sst_file = ' '
170     xx_sss_file = ' '
171     xx_hfacc_file = ' '
172     xx_efluxy_file = ' '
173     xx_efluxp_file = ' '
174     xx_bottomdrag_file = ' '
175    
176 heimbach 1.4 #ifdef ALLOW_TANGENTLINEAR_RUN
177     yadprefix = 'g_'
178     yadmark = 'g_'
179     #else
180     yadprefix = 'ad'
181 heimbach 1.2 yadmark = 'ad'
182     #endif
183     yctrlid = 'MIT_CE_000'
184     ctrlname = ' '
185     costname = ' '
186     scalname = ' '
187     maskname = ' '
188     metaname = ' '
189    
190     c-- Check versions.
191    
192     open(unit=scrunit1,status='scratch')
193    
194     c-- Next, read the ecco data file.
195     open(unit = modeldataunit,file = 'data.ctrl',
196     & status = 'old', iostat = errio)
197     if ( errio .lt. 0 ) then
198     stop ' stopped in ctrl_readparms'
199     endif
200    
201     do while ( .true. )
202     read(modeldataunit, fmt='(a)', end=1001) record
203     il = max(ilnblnk(record),1)
204     if ( record(1:1) .ne. commentcharacter )
205     & write(unit=scrunit1, fmt='(a)') record(:il)
206     enddo
207     1001 continue
208     close( modeldataunit )
209    
210     rewind( scrunit1 )
211     read(unit = scrunit1, nml = ctrl_nml)
212     read(unit = scrunit1, nml = ctrl_packnames)
213     close( scrunit1 )
214    
215     _END_MASTER( myThid )
216    
217     _BARRIER
218    
219     return
220     end
221    

  ViewVC Help
Powered by ViewVC 1.1.22