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

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

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

revision 1.14 by heimbach, Thu Apr 7 23:38:43 2005 UTC revision 1.15 by heimbach, Mon May 23 19:28:45 2005 UTC
# Line 45  c     == local variables == Line 45  c     == local variables ==
45        integer i,j,k        integer i,j,k
46        integer ntmp        integer ntmp
47        integer ivarindex        integer ivarindex
48          integer iUnit
49        integer iobcs        integer iobcs
50        integer il        integer il
51        integer errio        integer errio
# Line 214  c--     Set default values. Line 214  c--     Set default values.
214          maskname            = ' '          maskname            = ' '
215          metaname            = ' '          metaname            = ' '
216    
217  c--     Check versions.  c--     Next, read the cost data file.
218            WRITE(msgBuf,'(A)') 'CTRL_READPARMS: opening data.ctrl'
219          open(unit=scrunit1,status='scratch')          CALL PRINT_MESSAGE( msgBuf, standardMessageUnit,
220         &                    SQUEEZE_RIGHT , 1)
221    
222            CALL OPEN_COPY_DATA_FILE(
223         I                          'data.ctrl', 'CTRL_READPARMS',
224         O                          iUnit,
225         I                          myThid )
226    
227            READ(unit = iUnit, nml = ctrl_nml)
228            READ(unit = iUnit, nml = ctrl_packnames)
229    
230            WRITE(msgBuf,'(A)')
231         &       'CTRL_READPARMS: finished reading data.ctrl'
232            CALL PRINT_MESSAGE( msgBuf, standardMessageUnit,
233         &                  SQUEEZE_RIGHT , 1)
234    
235  c--     Next, read the ecco data file.          CLOSE( iUnit )
         open(unit = modeldataunit,file = 'data.ctrl',  
      &       status = 'old', iostat = errio)  
         if ( errio .lt. 0 ) then  
           stop ' stopped in ctrl_readparms'  
         endif  
   
         do while ( .true. )  
           read(modeldataunit, fmt='(a)', end=1001) record  
           il = max(ilnblnk(record),1)  
           if ( record(1:1) .ne. commentcharacter )  
      &        write(unit=scrunit1, fmt='(a)') record(:il)  
         enddo  
  1001   continue  
         close( modeldataunit )  
   
         rewind( scrunit1 )  
         read(unit = scrunit1, nml = ctrl_nml)  
         read(unit = scrunit1, nml = ctrl_packnames)  
         close( scrunit1 )  
236    
237        _END_MASTER( myThid )        _END_MASTER( myThid )
238    

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

  ViewVC Help
Powered by ViewVC 1.1.22