/[MITgcm]/MITgcm/pkg/ecco/ecco_readparms.F
ViewVC logotype

Diff of /MITgcm/pkg/ecco/ecco_readparms.F

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

revision 1.15 by heimbach, Fri Oct 14 19:54:49 2005 UTC revision 1.48 by gforget, Sat Apr 17 20:40:47 2010 UTC
# Line 1  Line 1 
1  C $Header$  C $Header$
2    C $Name$
3    
4  #include "COST_CPPOPTIONS.h"  #include "COST_CPPOPTIONS.h"
5    
# Line 34  c     == local variables == Line 35  c     == local variables ==
35  C     msgBuf      - Informational/error meesage buffer  C     msgBuf      - Informational/error meesage buffer
36  C     iUnit       - Work variable for IO unit number  C     iUnit       - Work variable for IO unit number
37        CHARACTER*(MAX_LEN_MBUF) msgBuf        CHARACTER*(MAX_LEN_MBUF) msgBuf
38        INTEGER iUnit        INTEGER k, iUnit, num_file, num_var
39    
40  c     == end of interface ==  c     == end of interface ==
41    
42  c--   Read the namelist input.  c--   Read the namelist input.
43        namelist /ecco_cost_nml/        namelist /ecco_cost_nml/
44       &                   data_errfile,       &                   data_errfile,
45       &                   tbarfile, sbarfile, psbarfile,       &                   tbarfile, sbarfile,sstbarfile,
46         &                   psbarfile, bpbarfile,
47       &                   ubarfile, vbarfile, wbarfile,       &                   ubarfile, vbarfile, wbarfile,
48       &                   tauxbarfile, tauybarfile,       &                   tauxbarfile, tauybarfile,
49       &                   hfluxbarfile, sfluxbarfile,       &                   hfluxmeanbarfile, sfluxmeanbarfile,
50       &                   using_topex,       &                   costTranspDataFile,  topexmeanfile,
51         &                   using_topex, using_ers, using_gfo,
52       &                   topexstartdate1, topexstartdate2,       &                   topexstartdate1, topexstartdate2,
53       &                   topexperiod, topexfile, topexmeanfile,       &                   topexperiod, topexfile, tpTimeMaskFile,
54       &                   using_ers,       &                   topexintercept, topexslope, ersTimeMaskFile,
55       &                   ersstartdate1, ersstartdate2,       &                   ersstartdate1, ersstartdate2, gfoTimeMaskFile,
56       &                   ersperiod, ersfile,       &                   ersperiod, ersfile,
57       &                   scatstartdate1, scatstartdate2,       &                   ersintercept, ersslope,
58         &                   gfostartdate1, gfostartdate2,
59         &                   gfoperiod, gfofile,
60         &                   gfointercept, gfoslope,
61         &                   scatstartdate1, scatstartdate2,
62       &                   scatperiod, scatxdatfile, scatydatfile,       &                   scatperiod, scatxdatfile, scatydatfile,
63       &                   scatx_errfile, scaty_errfile,       &                   scatx_errfile, scaty_errfile,
64       &                   ssh_errfile,       &                   ssh_errfile,
65         &                   sshv4cost_errfile, sshv4cost_errfactor,
66         &                   tp_errfile, ers_errfile, gfo_errfile,
67       &                   tmistartdate1, tmistartdate2, tmidatfile,       &                   tmistartdate1, tmistartdate2, tmidatfile,
68       &                   sststartdate1, sststartdate2, sstdatfile,       &                   sststartdate1, sststartdate2, sstdatfile,
69       &                   sssstartdate1, sssstartdate2, sssdatfile,       &                   sssstartdate1, sssstartdate2, sssdatfile,
70       &                   tdatfile, sdatfile,       &                   bpstartdate1, bpstartdate2, bpdatfile,
71       &                   ctdtfile, ctdsfile,       &                   tdatfile, sdatfile, ctdtfile, ctdsfile,
72       &                   ctdtclimfile, ctdsclimfile,       &                   ctdtclimfile, ctdsclimfile, xbtfile,
      &                   xbtfile,  
73       &                   argotstartdate1, argotstartdate2, argotfile,       &                   argotstartdate1, argotstartdate2, argotfile,
74       &                   argosstartdate1, argosstartdate2, argosfile,       &                   argosstartdate1, argosstartdate2, argosfile,
75       &                   udriftfile, vdriftfile,       &                   udriftfile, vdriftfile,
# Line 69  c--   Read the namelist input. Line 77  c--   Read the namelist input.
77       &                   curmtrufile,curmtrvfile,       &                   curmtrufile,curmtrvfile,
78       &                   salterrfile, temperrfile, velerrfile,       &                   salterrfile, temperrfile, velerrfile,
79       &                   salt0errfile, temp0errfile, vel0errfile,       &                   salt0errfile, temp0errfile, vel0errfile,
80         &                   ssterrfile, ssserrfile, bperrfile,
81       &                   hflux_errfile, sflux_errfile,       &                   hflux_errfile, sflux_errfile,
82       &                   tauu_errfile, tauv_errfile,       &                   tauu_errfile, tauv_errfile,
83       &                   atemp_errfile, aqh_errfile,       &                   atemp_errfile, aqh_errfile,
84       &                   precip_errfile, swflux_errfile, swdown_errfile,       &                   precip_errfile, swflux_errfile, swdown_errfile,
85         &                   lwflux_errfile, lwdown_errfile, evap_errfile,
86         &                   snowprecip_errfile, apressure_errfile,
87       &                   uwind_errfile, vwind_errfile,       &                   uwind_errfile, vwind_errfile,
88       &                   geoid_errfile, geoid_covariancefile,       &                   geoid_errfile, geoid_covariancefile,
89         &                   bottomdrag_errfile,edtau_errfile,
90         &                   kapgm_errfile,kapredi_errfile,diffkr_errfile,
91         &                   usercost_datafile, usercost_errfile,
92       &                   mult_hflux, mult_sflux, mult_tauu, mult_tauv,       &                   mult_hflux, mult_sflux, mult_tauu, mult_tauv,
93       &                   mult_atemp, mult_aqh,       &                   mult_hfluxmm, mult_sfluxmm,
94         &                   mult_atemp, mult_aqh,
95       &                   mult_precip, mult_swflux, mult_swdown,       &                   mult_precip, mult_swflux, mult_swdown,
96         &                   mult_lwflux, mult_lwdown, mult_evap,
97         &                   mult_snowprecip, mult_apressure,
98       &                   mult_uwind, mult_vwind,       &                   mult_uwind, mult_vwind,
99       &                   mult_hmean, mult_h, mult_temp, mult_salt,       &                   mult_hmean, mult_h, mult_sshv4cost,
100       &                   mult_tmi, mult_sst, mult_sss,       &                   mult_tp, mult_ers, mult_gfo,
101       &                   mult_ctdt, mult_ctds,       &                   mult_temp, mult_salt,
102       &                   mult_ctdtclim, mult_ctdsclim,       &                   mult_tmi, mult_sst, mult_sss, mult_bp,
103         &                   mult_ctdt, mult_ctds,
104         &                   mult_ctdtclim, mult_ctdsclim,
105       &                   mult_xbt, mult_drift,       &                   mult_xbt, mult_drift,
106       &                   mult_argot, mult_argos,       &                   mult_argot, mult_argos,
107       &                   mult_scatx, mult_scaty,       &                   mult_scatx, mult_scaty,
# Line 91  c--   Read the namelist input. Line 110  c--   Read the namelist input.
110       &                   mult_obcsn, mult_obcss,       &                   mult_obcsn, mult_obcss,
111       &                   mult_obcsw, mult_obcse, mult_obcsvol,       &                   mult_obcsw, mult_obcse, mult_obcsvol,
112       &                   mult_curmtr, mult_ageos,       &                   mult_curmtr, mult_ageos,
113       &                   mult_kapgm, mult_diffkr,       &                   mult_kapgm, mult_kapredi, mult_diffkr,
114         &                   mult_edtau, mult_bottomdrag,
115         &                   mult_usercost, mult_transp,
116         &                   mult_smooth_ic, mult_smooth_bc,
117       &                   whflux0, wsflux0, wtau0,       &                   whflux0, wsflux0, wtau0,
118       &                   watemp0, waqh0,       &                   wbottomdrag0,
119         &                   watemp0, waqh0,
120       &                   wprecip0, wswflux0, wswdown0, wwind0,       &                   wprecip0, wswflux0, wswdown0, wwind0,
121       &                   wmean_hflux, wmean_sflux, wmean_tau,       &                   wsnowprecip0, wlwflux0, wlwdown0, wevap0,
122       &                   wmean_atemp, wmean_aqh, wmean_precip,       &                   wapressure0, wdiffkr0, wkapgm0, wedtau0,
123         &                   wkapredi0, wmean_hflux, wmean_sflux, wmean_tau,
124         &                   wmean_atemp, wmean_aqh, wmean_precip,
125       &                   wmean_swflux, wmean_swdown, wmean_wind,       &                   wmean_swflux, wmean_swdown, wmean_wind,
126         &                   wmean_lwflux, wmean_lwdown, wmean_evap,
127         &                   wmean_snowprecip, wmean_apressure,
128       &                   cost_iprec, cost_yftype       &                   cost_iprec, cost_yftype
129    
130    #ifdef ALLOW_GENCOST_CONTRIBUTION
131          namelist /ecco_gencost_nml/
132         &         gencost_barfile,
133         &         gencost_datafile,
134         &         gencost_errfile,
135         &         gencost_mask,
136         &         gencost_spmin,
137         &         gencost_spmax,
138         &         gencost_spzero,
139         &         gencost_avgperiod,
140         &         mult_gencost
141    #endif
142    
143        _BEGIN_MASTER( myThid )        _BEGIN_MASTER( myThid )
144    
145  c--     Set default values.  c--     Set default values.
146          data_errfile          =    ' '          data_errfile          =    ' '
147          tbarfile              =    'tbar'          tbarfile              =    'tbar'
148          sbarfile              =    'sbar'          sbarfile              =    'sbar'
149            sstbarfile            =    'sstbar'
150          psbarfile             =    'psbar'          psbarfile             =    'psbar'
151            bpbarfile             =    'bpbar'
152          ubarfile              =    'ubar'          ubarfile              =    'ubar'
153          vbarfile              =    'vbar'          vbarfile              =    'vbar'
154          wbarfile              =    'wbar'          wbarfile              =    'wbar'
155          tauxbarfile           =    'tauxbar'          tauxbarfile           =    'tauxbar'
156          tauybarfile           =    'tauybar'          tauybarfile           =    'tauybar'
157          hfluxbarfile          =    'hfluxbar'          hfluxmeanbarfile      =    'hfluxmeanbar'
158          sfluxbarfile          =    'sfluxbar'          sfluxmeanbarfile      =    'sfluxmeanbar'
159            costTranspDataFile    =    ' '
160          using_topex           = .false.          using_topex           = .false.
161          topexstartdate1       =      0          topexstartdate1       =      0
162          topexstartdate2       =      0          topexstartdate2       =      0
163          topexperiod           =      0. _d 0          topexperiod           =      0. _d 0
164            topexintercept        =      0. _d 0
165            topexslope            =      0. _d 0
166          topexfile             =    ' '          topexfile             =    ' '
167          topexmeanfile         =    ' '          topexmeanfile         =    ' '
168          using_ers             = .false.          using_ers             = .false.
169          ersstartdate1         =      0          ersstartdate1         =      0
170          ersstartdate2         =      0          ersstartdate2         =      0
171          ersperiod             =      0. _d 0          ersperiod             =      0. _d 0
172            ersintercept          =      0. _d 0
173            ersslope              =      0. _d 0
174          ersfile               =    ' '          ersfile               =    ' '
175            using_gfo             = .false.
176            gfostartdate1         =      0
177            gfostartdate2         =      0
178            gfoperiod             =      0. _d 0
179            gfointercept          =      0. _d 0
180            gfoslope              =      0. _d 0
181            gfofile               =    ' '
182          scatstartdate1        =      0          scatstartdate1        =      0
183          scatstartdate2        =      0          scatstartdate2        =      0
184          scatperiod            =      0. _d 0          scatperiod            =      0. _d 0
185          scatxdatfile          =    ' '          scatxdatfile          =    ' '
186          scatydatfile          =    ' '          scatydatfile          =    ' '
187          ssh_errfile           =    ' '          ssh_errfile           =    ' '
188            tp_errfile            =    ' '
189            ers_errfile           =    ' '
190            gfo_errfile           =    ' '
191          scatx_errfile         =    ' '          scatx_errfile         =    ' '
192          scaty_errfile         =    ' '          scaty_errfile         =    ' '
193          tmistartdate1         =      0          tmistartdate1         =      0
# Line 142  c--     Set default values. Line 199  c--     Set default values.
199          sssstartdate1         =      0          sssstartdate1         =      0
200          sssstartdate2         =      0          sssstartdate2         =      0
201          sssdatfile            =    ' '          sssdatfile            =    ' '
202            bpstartdate1          =      0
203            bpstartdate2          =      0
204            bpdatfile             =    ' '
205          tdatfile              =    ' '          tdatfile              =    ' '
206          sdatfile              =    ' '          sdatfile              =    ' '
207          ctdtfile              =    ' '          ctdtfile              =    ' '
# Line 164  c--     Set default values. Line 224  c--     Set default values.
224          salterrfile           =    ' '          salterrfile           =    ' '
225          temperrfile           =    ' '          temperrfile           =    ' '
226          velerrfile            =    ' '          velerrfile            =    ' '
227            salt0errfile          =    ' '
228            temp0errfile          =    ' '
229            vel0errfile           =    ' '
230            ssterrfile            =    ' '
231            ssserrfile            =    ' '
232            bperrfile             =    ' '
233          hflux_errfile         =    ' '          hflux_errfile         =    ' '
234          sflux_errfile         =    ' '          sflux_errfile         =    ' '
235          tauu_errfile          =    ' '          tauu_errfile          =    ' '
# Line 173  c--     Set default values. Line 239  c--     Set default values.
239          precip_errfile        =    ' '          precip_errfile        =    ' '
240          swflux_errfile        =    ' '          swflux_errfile        =    ' '
241          swdown_errfile        =    ' '          swdown_errfile        =    ' '
242            lwflux_errfile        =    ' '
243            lwdown_errfile        =    ' '
244            evap_errfile          =    ' '
245            snowprecip_errfile    =    ' '
246            apressure_errfile     =    ' '
247          uwind_errfile         =    ' '          uwind_errfile         =    ' '
248          vwind_errfile         =    ' '          vwind_errfile         =    ' '
249          geoid_errfile         =    ' '          geoid_errfile         =    ' '
250          geoid_covariancefile  =    ' '          geoid_covariancefile  =    ' '
251            bottomdrag_errfile    =    ' '
252            edtau_errfile         =    ' '
253            kapgm_errfile         =    ' '
254            kapredi_errfile       =    ' '
255            diffkr_errfile        =    ' '
256            do k=1,NUSERCOST
257             usercost_datafile(k)  =    ' '
258             usercost_errfile(k)   =    ' '
259            enddo
260            do k=1,NSSHV4COST
261             sshv4cost_errfile(k) =    ' '
262             sshv4cost_errfactor(k)=     1. _d 0
263            enddo
264            tpTimeMaskFile        =    ' '
265            ersTimeMaskFile       =    ' '
266            gfoTimeMaskFile       =    ' '
267    
268          mult_hflux            =      0. _d 0          mult_hflux            =      0. _d 0
269          mult_sflux            =      0. _d 0          mult_sflux            =      0. _d 0
270            mult_hfluxmm          =      0. _d 0
271            mult_sfluxmm          =      0. _d 0
272          mult_tauu             =      0. _d 0          mult_tauu             =      0. _d 0
273          mult_tauv             =      0. _d 0          mult_tauv             =      0. _d 0
274          mult_atemp            =      0. _d 0          mult_atemp            =      0. _d 0
# Line 186  c--     Set default values. Line 276  c--     Set default values.
276          mult_precip           =      0. _d 0          mult_precip           =      0. _d 0
277          mult_swflux           =      0. _d 0          mult_swflux           =      0. _d 0
278          mult_swdown           =      0. _d 0          mult_swdown           =      0. _d 0
279            mult_lwflux           =      0. _d 0
280            mult_lwdown           =      0. _d 0
281            mult_evap             =      0. _d 0
282            mult_snowprecip       =      0. _d 0
283            mult_apressure        =      0. _d 0
284          mult_uwind            =      0. _d 0          mult_uwind            =      0. _d 0
285          mult_vwind            =      0. _d 0          mult_vwind            =      0. _d 0
286          mult_hmean            =      0. _d 0          mult_hmean            =      0. _d 0
287          mult_h                =      0. _d 0          mult_h                =      1. _d 0
288            mult_tp               =      0. _d 0
289            mult_ers              =      0. _d 0
290            mult_gfo              =      0. _d 0
291          mult_temp             =      0. _d 0          mult_temp             =      0. _d 0
292          mult_salt             =      0. _d 0          mult_salt             =      0. _d 0
293          mult_temp0            =      0. _d 0          mult_temp0            =      0. _d 0
# Line 197  c--     Set default values. Line 295  c--     Set default values.
295          mult_tmi              =      0. _d 0          mult_tmi              =      0. _d 0
296          mult_sst              =      0. _d 0          mult_sst              =      0. _d 0
297          mult_sss              =      0. _d 0          mult_sss              =      0. _d 0
298            mult_bp               =      0. _d 0
299          mult_ctdt             =      0. _d 0          mult_ctdt             =      0. _d 0
300          mult_ctds             =      0. _d 0          mult_ctds             =      0. _d 0
301          mult_ctdtclim         =      0. _d 0          mult_ctdtclim         =      0. _d 0
# Line 218  c--     Set default values. Line 317  c--     Set default values.
317          mult_ageos            =      0. _d 0          mult_ageos            =      0. _d 0
318          mult_curmtr           =      0. _d 0          mult_curmtr           =      0. _d 0
319          mult_kapgm            =      0. _d 0          mult_kapgm            =      0. _d 0
320            mult_kapredi            =      0. _d 0
321          mult_diffkr           =      0. _d 0          mult_diffkr           =      0. _d 0
322            mult_edtau            =      0. _d 0
323            mult_bottomdrag       =      0. _d 0
324            do k=1,NUSERCOST
325            mult_usercost(k)       =      0. _d 0
326            enddo
327            do k=1,NSSHV4COST
328            mult_sshv4cost(k)       =      0. _d 0
329            enddo
330            mult_smooth_ic        =      0. _d 0
331            mult_smooth_bc        =      0. _d 0
332            mult_transp           =      0. _d 0
333          watemp0               =      0. _d 0          watemp0               =      0. _d 0
334          waqh0                 =      0. _d 0          waqh0                 =      0. _d 0
335          wprecip0              =      0. _d 0          wprecip0              =      0. _d 0
336          wswflux0              =      0. _d 0          wswflux0              =      0. _d 0
337          wswdown0              =      0. _d 0          wswdown0              =      0. _d 0
338            wlwflux0              =      0. _d 0
339            wlwdown0              =      0. _d 0
340            wevap0                =      0. _d 0
341            wsnowprecip0          =      0. _d 0
342            wapressure0           =      0. _d 0
343          wwind0                =      0. _d 0          wwind0                =      0. _d 0
344            wdiffkr0              =      1. _d 0
345            wkapgm0               =      1. _d 0
346            wkapredi0               =      1. _d 0
347            wedtau0               =      1. _d 0
348          whflux0               =      0. _d 0          whflux0               =      0. _d 0
349          wsflux0               =      0. _d 0          wsflux0               =      0. _d 0
350          wtau0                 =      0. _d 0          wtau0                 =      0. _d 0
351            wbottomdrag0          =      1. _d 0
352          wmean_atemp           =      0. _d 0          wmean_atemp           =      0. _d 0
353          wmean_aqh             =      0. _d 0          wmean_aqh             =      0. _d 0
354          wmean_precip          =      0. _d 0          wmean_precip          =      0. _d 0
355          wmean_swflux          =      0. _d 0          wmean_swflux          =      0. _d 0
356          wmean_swdown          =      0. _d 0          wmean_swdown          =      0. _d 0
357            wmean_lwflux          =      0. _d 0
358            wmean_lwdown          =      0. _d 0
359            wmean_evap            =      0. _d 0
360            wmean_snowprecip      =      0. _d 0
361            wmean_apressure       =      0. _d 0
362          wmean_wind            =      0. _d 0          wmean_wind            =      0. _d 0
363          wmean_hflux           =      0. _d 0          wmean_hflux           =      0. _d 0
364          wmean_sflux           =      0. _d 0          wmean_sflux           =      0. _d 0
365          wmean_tau             =      0. _d 0          wmean_tau             =      0. _d 0
366            cost_iprec  = precFloat32
367            cost_yftype = 'RL'
368    
369  c--     Next, read the cost data file.  c--     Next, read the cost data file.
370          WRITE(msgBuf,'(A)') 'ECCO_READPARMS: opening data.ecco'          WRITE(msgBuf,'(A)') 'ECCO_READPARMS: opening data.ecco'
# Line 250  c--     Next, read the cost data file. Line 378  c--     Next, read the cost data file.
378    
379          READ(  iUnit, nml = ecco_cost_nml )          READ(  iUnit, nml = ecco_cost_nml )
380    
381          WRITE(msgBuf,'(A)') 'ECCO_READPARMS: finished reading data.ecco'          WRITE(msgBuf,'(A)')
382         &       'ECCO_READPARMS: finished reading #1: ecco_cost_nml'
383          CALL PRINT_MESSAGE( msgBuf, standardMessageUnit,          CALL PRINT_MESSAGE( msgBuf, standardMessageUnit,
384       &                  SQUEEZE_RIGHT , 1)       &       SQUEEZE_RIGHT , 1)
385    
386          CLOSE( iUnit )  C--   Check parameters:
387            IF ( cost_yftype.NE.'RL' ) THEN
388              STOP 'ABNORMAL END: S/R ECCO_READPARMS: invalid cost_yftype'
389            ENDIF
390    
391  #ifdef ALLOW_CAL  #ifdef ALLOW_CAL
392  c--     Get the complete dates of the ...  c--     Get the complete dates of the ...
393  c--     ... SST data.  c--     ... SST data.
394          call cal_FullDate( sststartdate1,   sststartdate2,          WRITE(msgBuf,'(A)') 'ECCO_READPARMS: start assigning cost dates'
395       &                     sststartdate,    mythid )          CALL PRINT_MESSAGE( msgBuf, standardMessageUnit,
396         &                  SQUEEZE_RIGHT , 1)
397    c--     ... SST data.
398            if ( sstdatfile .ne. ' ' )
399         &   call cal_FullDate( sststartdate1,   sststartdate2,
400         &                      sststartdate,    mythid )
401  c--     ... TMI data.  c--     ... TMI data.
402          call cal_FullDate( tmistartdate1,   tmistartdate2,          if ( tmidatfile .ne. ' ' )
403       &                     tmistartdate,    mythid )       &   call cal_FullDate( tmistartdate1,   tmistartdate2,
404         &                      tmistartdate,    mythid )
405  c--     ... SSS data.  c--     ... SSS data.
406          call cal_FullDate( sssstartdate1,   sssstartdate2,          if ( sssdatfile .ne. ' ' )
407       &                     sssstartdate,    mythid )           &   call cal_FullDate( sssstartdate1,   sssstartdate2,
408         &                      sssstartdate,    mythid )
409    c--     ... BP data.
410            if ( bpdatfile .ne. ' ' )
411         &   call cal_FullDate( bpstartdate1,   bpstartdate2,
412         &                      bpstartdate,    mythid )
413  c--     ... T/P data.  c--     ... T/P data.
414          call cal_FullDate( topexstartdate1, topexstartdate2,          if ( topexfile .ne. ' ' )
415         &  call cal_FullDate( topexstartdate1, topexstartdate2,
416       &                     topexstartdate,  mythid )       &                     topexstartdate,  mythid )
417  c--     ... ERS data.  c--     ... ERS data.
418          call cal_FullDate( ersstartdate1,   ersstartdate2,          if ( ersfile .ne. ' ' )
419       &                     ersstartdate,    mythid )       &   call cal_FullDate( ersstartdate1,   ersstartdate2,
420         &                      ersstartdate,    mythid )
421    c--     ... GFO data.
422            if ( gfofile .ne. ' ' )
423         &   call cal_FullDate( gfostartdate1,   gfostartdate2,
424         &                      gfostartdate,    mythid )
425  c--     ... SCAT data.  c--     ... SCAT data.
426          call cal_FullDate( scatstartdate1,   scatstartdate2,          if ( scatxdatfile .ne. ' ' )
427       &                     scatxstartdate,    mythid )       &   call cal_FullDate( scatstartdate1,   scatstartdate2,
428          call cal_FullDate( scatstartdate1,   scatstartdate2,         &                      scatxstartdate,    mythid )
429       &                     scatystartdate,    mythid )          if ( scatydatfile .ne. ' ' )
430         &   call cal_FullDate( scatstartdate1,   scatstartdate2,
431         &                      scatystartdate,    mythid )
432    
433            WRITE(msgBuf,'(A)') 'ECCO_READPARMS: end assigning cost dates'
434            CALL PRINT_MESSAGE( msgBuf, standardMessageUnit,
435         &                  SQUEEZE_RIGHT , 1)
436  #endif  #endif
437    
438        _END_MASTER( mythid )        _END_MASTER( myThid )
439    
440    #ifdef ALLOW_GENCOST_CONTRIBUTION
441    
442          _BEGIN_MASTER( myThid )
443    
444    c--   Set default values.
445          do k=1,NGENCOST
446             gencost_avgperiod(k)  = '     '
447             gencost_datafile(k)   = ' '
448             gencost_errfile(k)    = ' '
449             gencost_mask(k)       = 'c'
450             write(gencost_barfile(k)(1:8),'(a,i2.2)')
451         &        'genbar', k
452    cph         gencost_barfile(k)    = ' '
453             gencost_spmin         = 0. _d 0
454             gencost_spmax         = 0. _d 0
455             gencost_spzero        = 9876. _d 0
456             mult_gencost(k)      = 0. _d 0
457          enddo
458    
459          READ(  iUnit, nml = ecco_gencost_nml )
460    
461          WRITE(msgBuf,'(A)')
462         &     'ECCO_READPARMS: finished reading #2: ecco_gencost_nml'
463          CALL PRINT_MESSAGE( msgBuf, standardMessageUnit,
464         &     SQUEEZE_RIGHT , 1)
465    
466    C--   Check parameters:
467    
468          do k=1,NGENCOST
469    
470             if ( gencost_avgperiod(k) .NE. 'day  ' .AND.
471         &        gencost_avgperiod(k) .NE. 'DAY  ' .AND.
472         &        gencost_avgperiod(k) .NE. 'month' .AND.
473         &        gencost_avgperiod(k) .NE. 'MONTH' .AND.
474         &        gencost_avgperiod(k) .NE. 'year ' .AND.
475         &        gencost_avgperiod(k) .NE. 'YEAR ' ) then
476                STOP
477         &           'ECCO_READPARMS: gencost_avgperiod not properly set'
478             end if
479    
480          if ( gencost_datafile(k) .ne. ' ' ) then
481    
482             if ( gencost_spmin(k) .EQ. 0. _d 0 .AND.
483         &        gencost_spmax(k) .EQ. 0. _d 0 ) then
484                STOP
485         &       'ECCO_READPARMS: gencost_spmin, gencost_spmax not set'
486             endif
487    
488             if ( gencost_spzero(k) .EQ. 9876. _d 0 ) then
489                STOP
490         &       'ECCO_READPARMS: gencost_spzero not set'
491             endif
492    
493          endif
494    
495          end do
496    
497          _END_MASTER( myThid )
498    
499    #endif /* ALLOW_GENCOST_CONTRIBUTION */
500    
501          _BEGIN_MASTER( myThid )
502    
503          CLOSE( iUnit )
504    
505          _END_MASTER( myThid )
506    
507          WRITE(msgBuf,'(A)')
508         &     'ECCO_READPARMS: done'
509          CALL PRINT_MESSAGE( msgBuf, standardMessageUnit,
510         &     SQUEEZE_RIGHT , 1)
511    
512        _BARRIER        _BARRIER
513    

Legend:
Removed from v.1.15  
changed lines
  Added in v.1.48

  ViewVC Help
Powered by ViewVC 1.1.22