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

Annotation of /MITgcm/optim/optim_main.F

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


Revision 1.2 - (hide annotations) (download)
Fri Nov 15 04:03:25 2002 UTC (21 years, 5 months ago) by heimbach
Branch: MAIN
CVS Tags: checkpoint51k_post, checkpoint62v, checkpoint47e_post, checkpoint57m_post, checkpoint52l_pre, checkpoint62u, hrcube4, hrcube5, checkpoint57g_pre, checkpoint47c_post, checkpoint62t, checkpoint50c_post, checkpoint57s_post, checkpoint58b_post, checkpoint57b_post, checkpoint52d_pre, checkpoint57g_post, checkpoint48e_post, checkpoint56b_post, checkpoint50c_pre, checkpoint57y_post, checkpoint52j_pre, checkpoint51o_pre, checkpoint65z, checkpoint65x, checkpoint65y, checkpoint54d_post, checkpoint65r, checkpoint65s, checkpoint65p, checkpoint65q, checkpoint65v, checkpoint65w, checkpoint65t, checkpoint65u, checkpoint65j, checkpoint65k, checkpoint65h, checkpoint65i, checkpoint65n, checkpoint54e_post, checkpoint65l, checkpoint65m, checkpoint65b, checkpoint65c, checkpoint65a, checkpoint65f, checkpoint65g, checkpoint65d, checkpoint65e, checkpoint62c, checkpoint51l_post, checkpoint48i_post, checkpoint57r_post, checkpoint57d_post, checkpoint57i_post, checkpoint50d_pre, checkpoint52k_post, checkpoint59, checkpoint58, checkpoint55, checkpoint54, checkpoint57, checkpoint56, checkpoint51, checkpoint50, checkpoint53, checkpoint52, checkpoint50d_post, checkpoint58f_post, checkpoint52f_post, checkpoint57n_post, checkpoint58d_post, checkpoint62s, checkpoint58a_post, checkpoint62r, checkpoint62q, checkpoint50b_pre, checkpoint62p, checkpoint57z_post, checkpoint54f_post, checkpoint51f_post, checkpoint62a, checkpoint62g, checkpoint62f, checkpoint62e, checkpoint62d, checkpoint62k, checkpoint62j, checkpoint62i, checkpoint62h, checkpoint62o, checkpoint62n, checkpoint62m, checkpoint62l, checkpoint62w, checkpoint62z, checkpoint62y, checkpoint62x, checkpoint58y_post, checkpoint48b_post, checkpoint51d_post, checkpoint48c_pre, checkpoint47d_pre, checkpoint51t_post, checkpoint58t_post, checkpoint51n_post, checkpoint55i_post, checkpoint58m_post, checkpoint57l_post, checkpoint52i_pre, hrcube_1, hrcube_2, hrcube_3, checkpoint51s_post, checkpoint47a_post, checkpoint57t_post, checkpoint55c_post, checkpoint48d_pre, checkpoint51j_post, checkpoint47i_post, checkpoint63g, checkpoint52e_pre, checkpoint57v_post, checkpoint57f_post, checkpoint52e_post, checkpoint51n_pre, checkpoint47d_post, checkpoint53d_post, checkpoint64, checkpoint65, checkpoint60, checkpoint61, checkpoint62, checkpoint63, checkpoint57a_post, checkpoint48d_post, checkpoint57h_pre, checkpoint66g, checkpoint66f, checkpoint66e, checkpoint66d, checkpoint66c, checkpoint66b, checkpoint66a, checkpoint66o, checkpoint66n, checkpoint66m, checkpoint66l, checkpoint66k, checkpoint66j, checkpoint66i, checkpoint66h, checkpoint48f_post, checkpoint52b_pre, checkpoint54b_post, checkpoint58w_post, checkpoint57h_post, checkpoint51l_pre, checkpoint52m_post, checkpoint57y_pre, checkpoint55g_post, checkpoint48h_post, checkpoint51q_post, checkpoint51b_pre, checkpoint47g_post, checkpoint52b_post, checkpoint52c_post, checkpoint51h_pre, checkpoint58o_post, checkpoint48a_post, checkpoint57c_post, checkpoint50f_post, checkpoint50a_post, checkpoint50f_pre, checkpoint58p_post, checkpoint58q_post, checkpoint52f_pre, checkpoint55d_post, checkpoint58e_post, checkpoint47j_post, checkpoint54a_pre, checkpoint63p, checkpoint63q, checkpoint63r, checkpoint63s, checkpoint63l, checkpoint63m, checkpoint63n, checkpoint63o, checkpoint63h, checkpoint63i, checkpoint63j, checkpoint63k, checkpoint63d, checkpoint63e, checkpoint63f, checkpoint53c_post, checkpoint63a, checkpoint63b, checkpoint63c, checkpoint55d_pre, checkpoint57c_pre, checkpoint58r_post, checkpoint55j_post, branch-exfmods-tag, branchpoint-genmake2, checkpoint54a_post, checkpoint55h_post, checkpoint58n_post, checkpoint51r_post, checkpoint48c_post, checkpoint51i_post, checkpoint57e_post, checkpoint55b_post, checkpoint51b_post, checkpoint51c_post, checkpoint53a_post, checkpoint65o, checkpoint47b_post, checkpoint59q, checkpoint59p, checkpoint59r, checkpoint59e, checkpoint59d, checkpoint59g, checkpoint59f, checkpoint59a, checkpoint55f_post, checkpoint59c, checkpoint59b, checkpoint59m, checkpoint59l, checkpoint59o, checkpoint59n, checkpoint59i, checkpoint59h, checkpoint59k, checkpoint52d_post, checkpoint53g_post, checkpoint57p_post, checkpint57u_post, checkpoint50g_post, checkpoint57q_post, eckpoint57e_pre, checkpoint58k_post, checkpoint52a_pre, checkpoint62b, checkpoint58v_post, checkpoint50h_post, checkpoint52i_post, checkpoint50e_pre, checkpoint50i_post, checkpoint51i_pre, checkpoint52h_pre, checkpoint56a_post, checkpoint64y, checkpoint64x, checkpoint58l_post, checkpoint64z, checkpoint53f_post, checkpoint64q, checkpoint64p, checkpoint64s, checkpoint64r, checkpoint64u, checkpoint64t, checkpoint64w, checkpoint64v, checkpoint64i, checkpoint64h, checkpoint64k, checkpoint64j, checkpoint64m, checkpoint64l, checkpoint64o, checkpoint64n, checkpoint64a, checkpoint64c, checkpoint64b, checkpoint64e, checkpoint64d, checkpoint64g, checkpoint64f, checkpoint57h_done, checkpoint52j_post, checkpoint47f_post, checkpoint50e_post, checkpoint57j_post, checkpoint57f_pre, checkpoint61f, checkpoint58g_post, branch-netcdf, checkpoint52l_post, checkpoint58x_post, checkpoint61n, checkpoint52n_post, checkpoint53b_pre, checkpoint59j, checkpoint58h_post, checkpoint56c_post, checkpoint58j_post, checkpoint51e_post, checkpoint57a_pre, checkpoint55a_post, checkpoint47, checkpoint48, checkpoint49, checkpoint57o_post, checkpoint51o_post, checkpoint61q, checkpoint57k_post, checkpoint51f_pre, checkpoint48g_post, checkpoint53b_post, checkpoint47h_post, checkpoint52a_post, checkpoint57w_post, checkpoint61e, checkpoint58i_post, checkpoint51g_post, ecco_c52_e35, checkpoint57x_post, checkpoint50b_post, checkpoint58c_post, checkpoint58u_post, checkpoint51m_post, checkpoint53d_pre, checkpoint58s_post, checkpoint55e_post, checkpoint61g, checkpoint61d, checkpoint54c_post, checkpoint61b, checkpoint61c, checkpoint61a, checkpoint51a_post, checkpoint61o, checkpoint61l, checkpoint61m, checkpoint61j, checkpoint61k, checkpoint61h, checkpoint61i, checkpoint61v, checkpoint61w, checkpoint61t, checkpoint61u, checkpoint61r, checkpoint61s, checkpoint61p, checkpoint51p_post, checkpoint61z, checkpoint61x, checkpoint61y, checkpoint51u_post, HEAD
Branch point for: branch-exfmods-curt, branch-genmake2, branch-nonh, tg2-branch, netcdf-sm0, checkpoint51n_branch
Changes since 1.1: +155 -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 heimbach 1.2
2     c ==================================================================
3     c
4     c prgopti.F: Routines for doing an off-line optimization after the
5     c ECCO forward and adjoint model have been run.
6     c
7     c main - Driver routine.
8     c opti - Mid-level routine to do the spin up and spin down.
9     c optimum - Routine that calls the minimization.
10     c
11     c Documentation:
12     c
13     c The collection of these routines originated mainly from Ralf
14     c Giering. Patrick Heimbach improved and corrected considerable
15     c parts of the original code. Christian Eckert contributed the
16     c interface to the ECCO release of the MITgcmUV in order to get
17     c the offline version going.
18     c
19     c How to use the off-line optimization.
20     c
21     c Doing an off-line optimization means that one alternately
22     c calls the adjoint model and the optimization routines.
23     c
24     c The adjoint model yields at iteration i the cost function
25     c value and the gradient of the cost function with respect to
26     c the control variables. The optimization routines then use
27     c this information to reduce the cost function and give a
28     c new estimate of the control variables which can then be used
29     c in the next cycle to yield a new cost function and the
30     c corresponding gradient.
31     c
32     c started: Ralf Giering (lsoptv1)
33     c
34     c Patrick Heimbach heimbach@mit.edu 28-Feb-2000
35     c
36     c - Corrected and restructured the original lsoptv1
37     c code.
38     c
39     c Christian Eckert eckert@mit.edu 15-Feb-2000
40     c
41     c - Off-line capability and some cosmetic changes
42     c of the optimization wrapper.
43     c
44     c changed:
45     c
46     c ==================================================================
47    
48    
49     program optim_main
50    
51     c ==================================================================
52     c PROGRAM optim_main
53     c ==================================================================
54     c
55     c o Driver routine for the ECCO optimization package.
56     c
57     c started: Christian Eckert eckert@mit.edu 15-Feb-2000
58     c
59     c changed: Christian Eckert eckert@mit.edu 10-Mar-2000
60     c
61     c - Added ECCO layout.
62     c
63     c ==================================================================
64     c SUBROUTINE
65     c ==================================================================
66    
67     implicit none
68    
69     c == global variables ==
70    
71     #include "blas1.h"
72    
73     c == routine arguments ==
74    
75     c == local variables ==
76    
77     integer nn
78    
79     c == end of interface ==
80    
81     c-- Headline.
82     print*
83     print*,' =================================================='
84     print*,' Large Scale Optimization with off-line capability.'
85     print*,' =================================================='
86     print*
87     print*,' Version 2.1.0'
88     print*
89    
90     c-- Get the number of control variables.
91     call optim_numbmod( nn )
92    
93     cph(
94     print *, 'pathei: vor optim_sub'
95     cph)
96     c-- Call the subroutine.
97     call optim_sub( nn )
98    
99     c-- Succesful termination.
100     print*
101     print*,' ======================================'
102     print*,' Large Scale Optimization run finished.'
103     print*,' ======================================'
104     print*
105    
106     end
107    
108     CStartOfInterface
109     INTEGER FUNCTION IFNBLNK( string )
110     C /==========================================================\
111     C | FUNCTION IFNBLNK |
112     C | o Find first non-blank in character string. |
113     C \==========================================================/
114     IMPLICIT NONE
115     C
116     CHARACTER*(*) string
117     CEndOfInterface
118     C
119     INTEGER L, LS
120     C
121     LS = LEN(string)
122     IFNBLNK = 0
123     DO 10 L = 1, LS
124     IF ( string(L:L) .EQ. ' ' ) GOTO 10
125     IFNBLNK = L
126     GOTO 11
127     10 CONTINUE
128     11 CONTINUE
129     C
130     RETURN
131     END
132    
133     CStartOfInterface
134     INTEGER FUNCTION ILNBLNK( string )
135     C /==========================================================\
136     C | FUNCTION ILNBLNK |
137     C | o Find last non-blank in character string. |
138     C \==========================================================/
139     IMPLICIT NONE
140     CHARACTER*(*) string
141     CEndOfInterface
142     INTEGER L, LS
143     C
144     LS = LEN(string)
145     ILNBLNK = LS
146     DO 10 L = LS, 1, -1
147     IF ( string(L:L) .EQ. ' ' ) GOTO 10
148     ILNBLNK = L
149     GOTO 11
150     10 CONTINUE
151     11 CONTINUE
152     C
153     RETURN
154     END
155    

  ViewVC Help
Powered by ViewVC 1.1.22