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 |
58 |
_RL xx(nmax) |
_RL xx(nmax) |
59 |
_RL adxx(nmax) |
_RL adxx(nmax) |
60 |
#endif |
#endif |
61 |
|
_RL xxmean |
62 |
|
|
63 |
CML logical coldStart |
CML logical coldStart |
64 |
c formal parameters of m1qn3 |
c formal parameters of m1qn3 |
212 |
print *, ' OPTIM_SUB: nsim = ', nsim |
print *, ' OPTIM_SUB: nsim = ', nsim |
213 |
print *, ' OPTIM_SUB: reverse = ', reverse |
print *, ' OPTIM_SUB: reverse = ', reverse |
214 |
|
|
215 |
|
c compute min/max/mean/std of output vector see if it is within |
216 |
|
c reasonable bounds (prior to scaling) |
217 |
|
xxmean = sum(xx)/dble(nn) |
218 |
|
print * |
219 |
|
print *,' OPTIM_SUB: mean(xx) =', xxmean |
220 |
|
print *,' OPTIM_SUB: max(xx) =', maxval(xx) |
221 |
|
print *,' OPTIM_SUB: min(xx) =', minval(xx) |
222 |
|
print *,' OPTIM_SUB: std(xx) =',sum((xx-xxmean)**2)/dble(nn) |
223 |
|
print * |
224 |
c write state of m1qn3 into pickup file for warm restart |
c write state of m1qn3 into pickup file for warm restart |
225 |
call optim_store_m1qn3(ndz,iz,dz,niter,nsim,epsg,df1, |
call optim_store_m1qn3(ndz,iz,dz,niter,nsim,epsg,df1, |
226 |
I optimcycle, |
I optimcycle, |
227 |
I .true.) |
I .true.) |
228 |
c write model control vector |
c write model control vector |
229 |
print *,' OPTIMS_SUB: writing ', nn,' sized control to file ', |
print *,' OPTIM_SUB: writing ', nn,' sized control to file ', |
230 |
& ctrlname |
& ctrlname |
231 |
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 |
232 |
c mistakes it for the real one |
c mistakes it for the real one |