1 |
heimbach |
1.1 |
|
2 |
|
|
|
3 |
|
|
subroutine optim_initmod( |
4 |
|
|
I nn |
5 |
|
|
& ) |
6 |
|
|
|
7 |
|
|
c ================================================================== |
8 |
|
|
c SUBROUTINE optim_initmod |
9 |
|
|
c ================================================================== |
10 |
|
|
c |
11 |
|
|
c o Optim_Initmod is called before the optimization. It sets a first guess |
12 |
|
|
c of the parameter vector. It may also contain the initialization |
13 |
|
|
c of the model. |
14 |
|
|
c |
15 |
|
|
c started: Christian Eckert eckert@mit.edu 15-Feb-2000 |
16 |
|
|
c |
17 |
|
|
c changed: Christian Eckert eckert@mit.edu 10-Mar-2000 |
18 |
|
|
c |
19 |
|
|
c - Added ECCO layout. |
20 |
|
|
c |
21 |
|
|
c changed: Patrick Heimbach heimbach@mit.edu 19-Jun-2000 |
22 |
|
|
c - finished, revised and debugged |
23 |
|
|
c |
24 |
|
|
c ================================================================== |
25 |
|
|
c SUBROUTINE optim_initmod |
26 |
|
|
c ================================================================== |
27 |
|
|
|
28 |
|
|
IMPLICIT NONE |
29 |
|
|
|
30 |
|
|
c == global variables == |
31 |
|
|
|
32 |
|
|
#include "EEPARAMS.h" |
33 |
|
|
#include "SIZE.h" |
34 |
|
|
|
35 |
|
|
#include "ctrl.h" |
36 |
|
|
#include "optim.h" |
37 |
|
|
|
38 |
|
|
c == routine arguments == |
39 |
|
|
|
40 |
|
|
integer nn |
41 |
|
|
! _RL xx(nn) |
42 |
|
|
|
43 |
|
|
c == local variables == |
44 |
|
|
|
45 |
|
|
character*(80) fname |
46 |
|
|
|
47 |
|
|
c == end of interface == |
48 |
|
|
|
49 |
|
|
c-- Generate file name for the scaling of the control vector |
50 |
|
|
c-- contributions. |
51 |
|
|
write(fname(1:80),'(80a)') ' ' |
52 |
|
|
write(fname(1:80),'(4a,i10.10,a)') |
53 |
|
|
& scalname(1:9),'_',yctrlid,'.',optimcycle,'.data' |
54 |
|
|
|
55 |
|
|
c-- Read the scaling for the control vector. |
56 |
|
|
|
57 |
|
|
c --> Presently not implemented, since the control vector and the |
58 |
|
|
c gradient of the cost function can already be non-dimensionalized |
59 |
|
|
c by *ecco_ControlPack* and *ecco_ControlUnPack*. |
60 |
|
|
c |
61 |
|
|
c To do this set: |
62 |
|
|
c |
63 |
|
|
c #define USE_NONDIMENSIONAL_CONTROL_IO |
64 |
|
|
c |
65 |
|
|
c in CPP_OPTIONS.h. The subroutine *ecco_ControlPack* will then |
66 |
|
|
c non-dimensionalize its output and *ecco_ControlUnPack* will |
67 |
|
|
c dimensionalize its input. |
68 |
|
|
|
69 |
|
|
return |
70 |
|
|
end |