/[MITgcm]/MITgcm/optim/simul.F
ViewVC logotype

Contents of /MITgcm/optim/simul.F

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


Revision 1.5 - (show annotations) (download)
Tue Jun 2 14:49:13 2015 UTC (5 years, 1 month ago) by gforget
Branch: MAIN
CVS Tags: checkpoint65z, checkpoint65x, checkpoint65y, checkpoint65r, checkpoint65s, checkpoint65p, checkpoint65q, checkpoint65v, checkpoint65w, checkpoint65t, checkpoint65u, checkpoint65n, checkpoint65m, checkpoint66g, checkpoint66f, checkpoint66e, checkpoint66d, checkpoint66c, checkpoint66b, checkpoint66a, checkpoint66o, checkpoint66n, checkpoint66m, checkpoint66l, checkpoint66k, checkpoint66j, checkpoint66i, checkpoint66h, checkpoint65o, HEAD
Changes since 1.4: +0 -2 lines
- remove un-necessary option files includes

1
2 subroutine simul(
3 I indic,
4 I nn,
5 I xx,
6 O objf,
7 O adxx
8 & )
9
10 c ==================================================================
11 c SUBROUTINE simul
12 c ==================================================================
13 c
14 c o This routine is called by the large-scale optimization lsopt.
15 c
16 c Input : indic - Parameter (not used here).
17 c nn - Number of control variables.
18 c xx - Array of control variables.
19 c
20 c Output : objf - Value of objective function.
21 c adxx - Gradients of objective function with respect
22 c to the control variables.
23 c
24 c
25 c started: Christian Eckert eckert@mit.edu 15-Feb-2000
26 c
27 c changed: Christian Eckert eckert@mit.edu 10-Mar-2000
28 c
29 c - Added ECCO layout.
30 c
31 c changed: Patrick Heimbach heimbach@mit.edu 19-Jun-2000
32 c - finished, revised and debugged
33 c
34 c ==================================================================
35 c SUBROUTINE simul
36 c ==================================================================
37
38 implicit none
39
40 c == global variables ==
41
42 #include "EEPARAMS.h"
43 #include "SIZE.h"
44 #include "ctrl.h"
45
46 c == routine arguments ==
47
48 integer indic
49 integer nn
50 _RL xx(nn)
51 _RL objf
52 _RL adxx(nn)
53
54 c == local variables ==
55
56 integer i
57 _RL adobjf
58
59 logical lheaderonly
60
61 c == end of interface ==
62
63 print *, 'pathei-lsopt in simul'
64
65 c-- Call the combined modified forward model and the adjoint model.
66 do i = 1,nn
67 adxx(i) = 0.
68 enddo
69
70 adobjf = 1.
71 c
72 lheaderonly = .false.
73
74 print *, 'pathei-lsopt vor optim_readdata'
75
76 call optim_readdata( nn, ctrlname, lheaderonly, objf, xx )
77 call optim_readdata( nn, costname, lheaderonly, objf, adxx )
78
79 indic = indic
80
81 cph(
82 print *, ' leaving simul with nn, objf = ', nn, objf
83 print *, ' leaving simul with xx, adxx = ', xx(1), adxx(1)
84 do i=1,nn
85 c if (xx(i).EQ.'NaN') then
86 c print *, 'pathei - out: i = ', i
87 c end if
88 end do
89 cph)
90
91 return
92 end

  ViewVC Help
Powered by ViewVC 1.1.22