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

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

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

revision 1.6 by mlosch, Mon Jun 4 12:23:34 2012 UTC revision 1.8 by mlosch, Mon May 9 09:37:17 2016 UTC
# Line 1  Line 1 
1  C $Header$  C $Header$
2  C $Name$  C $Name$
3    
4  c     Include ECCO_CPPOPTIONS because the ecco_ctrl,cost files  C     ECCO_CPPOPTIONS used to affect maxcvars and defined ALLOW_OBCS?_CONTROL
5  c     have headers with options for OBCS masks.  C#include "ECCO_CPPOPTIONS.h"
6  #include "ECCO_CPPOPTIONS.h"  C     now:
7    C     CTRL_OPTIONS affects maxcvars and may define ALLOW_OBCS?_CONTROL
8    #include "CTRL_OPTIONS.h"
9    
10        subroutine optim_sub(        subroutine optim_sub(
11       I                 nn, ff       I                 nn, ff
# Line 35  c     == global variables == Line 37  c     == global variables ==
37  #include "EEPARAMS.h"  #include "EEPARAMS.h"
38  #include "SIZE.h"  #include "SIZE.h"
39    
40    #if (defined (ALLOW_GENARR2D_CONTROL) || defined (ALLOW_GENARR3D_CONTROL) || defined (ALLOW_GENTIM2D_CONTROL))
41    # include "CTRL_SIZE.h"
42    #endif
43  #include "ctrl.h"  #include "ctrl.h"
44  #include "optim.h"  #include "optim.h"
45  #include "m1qn3_common.h"  #include "m1qn3_common.h"
# Line 56  c     == local variables == Line 61  c     == local variables ==
61        _RL   xx(nmax)        _RL   xx(nmax)
62        _RL   adxx(nmax)        _RL   adxx(nmax)
63  #endif  #endif
64          _RL  xxmean
65    
66  CML      logical coldStart  CML      logical coldStart
67  c     formal parameters of m1qn3  c     formal parameters of m1qn3
# Line 209  c     the reverse communication mode and Line 215  c     the reverse communication mode and
215        print *, ' OPTIM_SUB: nsim    = ', nsim        print *, ' OPTIM_SUB: nsim    = ', nsim
216        print *, ' OPTIM_SUB: reverse = ', reverse        print *, ' OPTIM_SUB: reverse = ', reverse
217    
218    c     compute min/max/mean/std of output vector see if it is within
219    c     reasonable bounds (prior to scaling)
220          xxmean = sum(xx)/dble(nn)
221          print *
222          print *,' OPTIM_SUB: mean(xx) =', xxmean
223          print *,' OPTIM_SUB:  max(xx) =', maxval(xx)
224          print *,' OPTIM_SUB:  min(xx) =', minval(xx)
225          print *,' OPTIM_SUB:  std(xx) =',sum((xx-xxmean)**2)/dble(nn)
226          print *
227  c     write state of m1qn3 into pickup file for warm restart  c     write state of m1qn3 into pickup file for warm restart
228        call optim_store_m1qn3(ndz,iz,dz,niter,nsim,epsg,df1,        call optim_store_m1qn3(ndz,iz,dz,niter,nsim,epsg,df1,
229       I     optimcycle,       I     optimcycle,
230       I     .true.)       I     .true.)
231  c     write model control vector  c     write model control vector
232        print *,' OPTIMS_SUB: writing ', nn,' sized control to file ',        print *,' OPTIM_SUB: writing ', nn,' sized control to file ',
233       &     ctrlname       &     ctrlname
234  c     give the cost function a funny value to make sure that nobody  c     give the cost function a funny value to make sure that nobody
235  c     mistakes it for the real one  c     mistakes it for the real one

Legend:
Removed from v.1.6  
changed lines
  Added in v.1.8

  ViewVC Help
Powered by ViewVC 1.1.22