/[MITgcm]/MITgcm_contrib/mlosch/optim_m1qn3/optim_readparms.F
ViewVC logotype

Diff of /MITgcm_contrib/mlosch/optim_m1qn3/optim_readparms.F

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

revision 1.1 by mlosch, Thu Apr 26 11:10:06 2012 UTC revision 1.7 by mlosch, Wed May 9 18:33:38 2012 UTC
# Line 41  c     == local variables == Line 41  c     == local variables ==
41        _RL            ff        _RL            ff
42        _RL            dfminFrac        _RL            dfminFrac
43    
44  #if defined (DYNAMIC)  #ifdef DYNAMIC
45        _RL            vv(nn)        _RL            vv(nn)
 #elif defined (USE_POINTER) || (MAX_INDEPEND == 0)  
       _RL            vv  
       pointer (pvv,vv(1))  
46  #else  #else
47        integer nmax        integer nmax
48        parameter( nmax = MAX_INDEPEND )        parameter( nmax = MAX_INDEPEND )
# Line 70  c     == end of interface == Line 67  c     == end of interface ==
67       &                      epsf, epsx, epsg,       &                      epsf, epsx, epsg,
68       &                      nupdate, eps       &                      nupdate, eps
69    
70          namelist /M1QN3/
71         &     coldStart
72    
73  c--   Preset the optimization parameters.  c--   Preset the optimization parameters.
74        optimcycle =  0        optimcycle =  0
75        nvars      =  0        nvars      =  0
# Line 85  c--   Preset the optimization parameters Line 85  c--   Preset the optimization parameters
85        ff         = 0.        ff         = 0.
86  cdfer      expId      = 'MIT_CE_000'  cdfer      expId      = 'MIT_CE_000'
87        yctrlid    = 'MIT_CE_000'        yctrlid    = 'MIT_CE_000'
88          coldStart  = .false.
89    
90        modeldataunit = 14        modeldataunit = 14
91        scrunit1      = 11        scrunit1      = 11
# Line 95  c--   Read control parameters from file. Line 96  c--   Read control parameters from file.
96        open(unit = modeldataunit,file = 'data.ctrl',        open(unit = modeldataunit,file = 'data.ctrl',
97       &     status = 'old', iostat = errio)       &     status = 'old', iostat = errio)
98        if ( errio .lt. 0 ) then        if ( errio .lt. 0 ) then
99         stop ' stopped in optim_numbmod while opening data.ctrl'         stop ' stopped in optim_readparms while opening data.ctrl'
100        endif        endif
101    
102        do while ( .true. )        do while ( .true. )
# Line 118  c--   Read optimization parameters from Line 119  c--   Read optimization parameters from
119        open(unit = modeldataunit,file = 'data.optim',        open(unit = modeldataunit,file = 'data.optim',
120       &     status = 'old', iostat = errio)       &     status = 'old', iostat = errio)
121        if ( errio .lt. 0 ) then        if ( errio .lt. 0 ) then
122         stop ' stopped in optim_numbmod while opening data.optim'         stop ' stopped in optim_readparms while opening data.optim'
123        endif        endif
124    
125        do while ( .true. )        do while ( .true. )
# Line 132  c--   Read optimization parameters from Line 133  c--   Read optimization parameters from
133    
134        rewind( scrunit1 )        rewind( scrunit1 )
135        read(unit = scrunit1, nml = optim)        read(unit = scrunit1, nml = optim)
136          read(unit = scrunit1, nml = m1qn3)
137        close( scrunit1 )        close( scrunit1 )
138        print*, ' OPTIM_READPARMS: Minimization options have been read.'        print*, ' OPTIM_READPARMS: Minimization options have been read.'
139    
# Line 158  c     otherwise we (ab-)use the file ctr Line 160  c     otherwise we (ab-)use the file ctr
160          fmin = ff          fmin = ff
161         endif         endif
162        endif        endif
163        if ( fmin.le.0.0 .and. optimcycle.eq.0 ) then        if ( optimcycle.eq.0 ) then
164         print*, ' OPTIM_READPARMS: fmin = ', fmin, ' should be > 0'         if ( fmin.le.0.0 ) then
165         stop 'S/R OPTIM_READPARMS: ABNORMAL END'          print '(A,E12.6,A)', ' OPTIM_READPARMS: fmin = ', fmin,
166         &       ' should be > 0'
167            stop 'S/R OPTIM_READPARMS: ABNORMAL END'
168           endif
169           if ( fmin.gt.ff ) then
170            print '(A,E12.6,A,E12.6)', ' OPTIM_READPARMS: fmin = ', fmin,
171         &       ' should be < ff = ', ff
172            stop 'S/R OPTIM_READPARMS: ABNORMAL END'
173           endif
174        endif        endif
175    
176  c--   Do some final printout.  c--   Do some final printout.

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

  ViewVC Help
Powered by ViewVC 1.1.22