/[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.2 - (show annotations) (download)
Fri Nov 15 04:03:25 2002 UTC (21 years, 5 months ago) by heimbach
Branch: MAIN
CVS Tags: checkpoint51k_post, checkpoint47e_post, checkpoint52l_pre, hrcube4, hrcube5, checkpoint47c_post, checkpoint50c_post, checkpoint52d_pre, checkpoint48e_post, checkpoint50c_pre, checkpoint52j_pre, checkpoint51o_pre, checkpoint54d_post, checkpoint54e_post, checkpoint51l_post, checkpoint48i_post, checkpoint50d_pre, checkpoint52k_post, checkpoint54, checkpoint51, checkpoint50, checkpoint53, checkpoint52, checkpoint50d_post, checkpoint52f_post, checkpoint50b_pre, checkpoint51f_post, checkpoint48b_post, checkpoint51d_post, checkpoint48c_pre, checkpoint47d_pre, checkpoint51t_post, checkpoint51n_post, checkpoint52i_pre, hrcube_1, hrcube_2, hrcube_3, checkpoint51s_post, checkpoint47a_post, checkpoint48d_pre, checkpoint51j_post, checkpoint47i_post, checkpoint52e_pre, checkpoint52e_post, checkpoint51n_pre, checkpoint47d_post, checkpoint53d_post, checkpoint48d_post, checkpoint48f_post, checkpoint52b_pre, checkpoint54b_post, checkpoint51l_pre, checkpoint52m_post, checkpoint48h_post, checkpoint51q_post, checkpoint51b_pre, checkpoint47g_post, checkpoint52b_post, checkpoint52c_post, checkpoint51h_pre, checkpoint48a_post, checkpoint50f_post, checkpoint50a_post, checkpoint50f_pre, checkpoint52f_pre, checkpoint47j_post, checkpoint54a_pre, checkpoint53c_post, branch-exfmods-tag, branchpoint-genmake2, checkpoint54a_post, checkpoint51r_post, checkpoint48c_post, checkpoint51i_post, checkpoint51b_post, checkpoint51c_post, checkpoint53a_post, checkpoint47b_post, checkpoint52d_post, checkpoint53g_post, checkpoint50g_post, checkpoint52a_pre, checkpoint50h_post, checkpoint52i_post, checkpoint50e_pre, checkpoint50i_post, checkpoint51i_pre, checkpoint52h_pre, checkpoint53f_post, checkpoint52j_post, checkpoint47f_post, checkpoint50e_post, branch-netcdf, checkpoint52l_post, checkpoint52n_post, checkpoint53b_pre, checkpoint51e_post, checkpoint47, checkpoint48, checkpoint49, checkpoint51o_post, checkpoint51f_pre, checkpoint48g_post, checkpoint53b_post, checkpoint47h_post, checkpoint52a_post, checkpoint51g_post, ecco_c52_e35, checkpoint50b_post, checkpoint51m_post, checkpoint53d_pre, checkpoint54c_post, checkpoint51a_post, checkpoint51p_post, checkpoint51u_post
Branch point for: branch-exfmods-curt, branch-genmake2, branch-nonh, tg2-branch, netcdf-sm0, checkpoint51n_branch
Changes since 1.1: +87 -0 lines
o Incorporating QNVS line search routines into MITgcm
  (this is separate code, not compiled with MITgcm,
  and therefore not under pkg)
  - lsopt/
  - optim/

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

  ViewVC Help
Powered by ViewVC 1.1.22