/[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.11 - (hide annotations) (download)
Wed Jan 12 23:39:39 2005 UTC (19 years, 4 months ago) by heimbach
Branch: MAIN
CVS Tags: checkpoint57d_post, checkpoint57c_pre, eckpoint57e_pre, checkpoint57c_post
Changes since 1.10: +7 -2 lines
o introduce z-scaling of
  * gradient (doZscalePack) and
  * control (doZscaleUnpack)

1 edhill 1.5 C
2 heimbach 1.11 C $Header: /u/gcmpack/MITgcm/pkg/ctrl/ctrl_readparms.F,v 1.10 2005/01/04 22:02:31 heimbach Exp $
3 heimbach 1.10 C $Name: $
4 heimbach 1.2
5 edhill 1.5 #include "AD_CONFIG.h"
6 heimbach 1.2 #include "CTRL_CPPOPTIONS.h"
7    
8    
9     subroutine ctrl_readparms( mythid )
10    
11     c ==================================================================
12     c SUBROUTINE ctrl_readparms
13     c ==================================================================
14     c
15     c o read ctrl parameters
16     c split from ctrl_init
17     c
18     c started: heimbach@mit.edu 12-Jun-2003
19     c
20     c ==================================================================
21     c SUBROUTINE ctrl_readparms
22     c ==================================================================
23    
24     implicit none
25    
26     c == global variables ==
27    
28     #include "EEPARAMS.h"
29     #include "SIZE.h"
30     #include "PARAMS.h"
31     #include "GRID.h"
32     #include "ctrl.h"
33    
34     #ifdef ALLOW_OBCS_CONTROL
35     # include "OBCS.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 heimbach 1.7 & xx_bottomdrag_file,
108 heimbach 1.10 & doInitXX,
109 heimbach 1.11 & doPackDiag,
110     & doZscaleUnpack,
111     & doZscalePack
112    
113 heimbach 1.2
114     namelist /ctrl_packnames/
115 heimbach 1.6 & yadmark, yctrlid, yctrlposunpack, yctrlpospack,
116 heimbach 1.2 & ctrlname, costname, scalname, maskname, metaname
117    
118     _BEGIN_MASTER( myThid )
119    
120     c-- Set default values.
121 heimbach 1.8 doInitXX = .TRUE.
122     #ifdef ALLOW_ADMTLM
123     doAdmTlm = .TRUE.
124     #else
125     doAdmTlm = .FALSE.
126     #endif
127 heimbach 1.10 doPackDiag = .FALSE.
128 heimbach 1.11 doZscaleUnpack = .FALSE.
129     doZscalePack = .FALSE.
130 heimbach 1.8
131 heimbach 1.2 xx_theta_file = ' '
132     xx_salt_file = ' '
133     xx_hfluxstartdate1 = 0
134     xx_hfluxstartdate2 = 0
135     xx_hfluxperiod = 0. _d 0
136     xx_hflux_file = ' '
137     xx_sfluxstartdate1 = 0
138     xx_sfluxstartdate2 = 0
139     xx_sfluxperiod = 0. _d 0
140     xx_sflux_file = ' '
141     xx_tauustartdate1 = 0
142     xx_tauustartdate2 = 0
143     xx_tauuperiod = 0. _d 0
144     xx_tauu_file = ' '
145     xx_tauvstartdate1 = 0
146     xx_tauvstartdate2 = 0
147     xx_tauvperiod = 0. _d 0
148     xx_tauv_file = ' '
149     xx_atempstartdate1 = 0
150     xx_atempstartdate2 = 0
151     xx_atempperiod = 0. _d 0
152     xx_atemp_file = ' '
153     xx_aqhstartdate1 = 0
154     xx_aqhstartdate2 = 0
155     xx_aqhperiod = 0. _d 0
156     xx_aqh_file = ' '
157     xx_uwindstartdate1 = 0
158     xx_uwindstartdate2 = 0
159     xx_uwindperiod = 0. _d 0
160     xx_uwind_file = ' '
161     xx_vwindstartdate1 = 0
162     xx_vwindstartdate2 = 0
163     xx_vwindperiod = 0. _d 0
164     xx_vwind_file = ' '
165     xx_obcsnstartdate1 = 0
166     xx_obcsnstartdate2 = 0
167     xx_obcsnperiod = 0. _d 0
168     xx_obcsn_file = ' '
169     xx_obcssstartdate1 = 0
170     xx_obcssstartdate2 = 0
171     xx_obcssperiod = 0. _d 0
172     xx_obcss_file = ' '
173     xx_obcswstartdate1 = 0
174     xx_obcswstartdate2 = 0
175     xx_obcswperiod = 0. _d 0
176     xx_obcsw_file = ' '
177     xx_obcsestartdate1 = 0
178     xx_obcsestartdate2 = 0
179     xx_obcseperiod = 0. _d 0
180     xx_obcse_file = ' '
181     xx_diffkr_file = ' '
182     xx_kapgm_file = ' '
183     xx_tr1_file = ' '
184     xx_sst_file = ' '
185     xx_sss_file = ' '
186     xx_hfacc_file = ' '
187     xx_efluxy_file = ' '
188     xx_efluxp_file = ' '
189     xx_bottomdrag_file = ' '
190    
191 heimbach 1.4 #ifdef ALLOW_TANGENTLINEAR_RUN
192     yadprefix = 'g_'
193     yadmark = 'g_'
194     #else
195     yadprefix = 'ad'
196 heimbach 1.2 yadmark = 'ad'
197     #endif
198     yctrlid = 'MIT_CE_000'
199 heimbach 1.6 yctrlposunpack = '.opt'
200     yctrlpospack = '.opt'
201 heimbach 1.2 ctrlname = ' '
202     costname = ' '
203     scalname = ' '
204     maskname = ' '
205     metaname = ' '
206    
207     c-- Check versions.
208    
209     open(unit=scrunit1,status='scratch')
210    
211     c-- Next, read the ecco data file.
212     open(unit = modeldataunit,file = 'data.ctrl',
213     & status = 'old', iostat = errio)
214     if ( errio .lt. 0 ) then
215     stop ' stopped in ctrl_readparms'
216     endif
217    
218     do while ( .true. )
219     read(modeldataunit, fmt='(a)', end=1001) record
220     il = max(ilnblnk(record),1)
221     if ( record(1:1) .ne. commentcharacter )
222     & write(unit=scrunit1, fmt='(a)') record(:il)
223     enddo
224     1001 continue
225     close( modeldataunit )
226    
227     rewind( scrunit1 )
228     read(unit = scrunit1, nml = ctrl_nml)
229     read(unit = scrunit1, nml = ctrl_packnames)
230     close( scrunit1 )
231    
232     _END_MASTER( myThid )
233    
234     _BARRIER
235    
236     return
237     end
238    

  ViewVC Help
Powered by ViewVC 1.1.22