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

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

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

revision 1.1 by heimbach, Fri Jul 13 13:40:17 2001 UTC revision 1.2 by heimbach, Mon May 23 19:28:45 2005 UTC
# Line 37  c     == local variables == Line 37  c     == local variables ==
37    
38        integer errio        integer errio
39        integer il        integer il
40          integer iUnit
41    
42        character*(max_len_prec) record        character*(max_len_prec) record
43          character*(max_len_mbuf) msgbuf
44    
45  c     == external ==  c     == external ==
46    
# Line 70  c--     Set default values. Line 72  c--     Set default values.
72          eps           =  -1.e-6          eps           =  -1.e-6
73          nupdate       =   0          nupdate       =   0
74    
75  c--     Check versions.          WRITE(msgBuf,'(A)') 'OPTIM_READPARMS: opening data.optim'
76            CALL PRINT_MESSAGE( msgBuf, standardMessageUnit,
77         &                    SQUEEZE_RIGHT , 1)
78    
79            CALL OPEN_COPY_DATA_FILE(
80         I                          'data.optim', 'OPTIM_READPARMS',
81         O                          iUnit,
82         I                          myThid )
83    
84            READ(unit = iUnit, nml = optim)
85    
86            WRITE(msgBuf,'(A)')
87         &       'OPTIM_READPARMS: finished reading data.optim'
88            CALL PRINT_MESSAGE( msgBuf, standardMessageUnit,
89         &                  SQUEEZE_RIGHT , 1)
90    
91          open(unit=scrunit1,status='scratch')          CLOSE( iUnit )
   
 c--     Next, read the forcing data file.  
         open(unit = modeldataunit,file = 'data.optim',  
      &       status = 'old', iostat = errio)  
         if ( errio .lt. 0 ) then  
           stop ' stopped in optim_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 = optim)  
         close( scrunit1 )  
92    
93        _END_MASTER( mythid )        _END_MASTER( mythid )
94    

Legend:
Removed from v.1.1  
changed lines
  Added in v.1.2

  ViewVC Help
Powered by ViewVC 1.1.22