-
Notifications
You must be signed in to change notification settings - Fork 237
/
ecco_cost_driver.F
66 lines (56 loc) · 1.88 KB
/
ecco_cost_driver.F
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
#include "ECCO_OPTIONS.h"
#ifdef ALLOW_TAPENADE
# ifdef ALLOW_CTRL
# include "CTRL_OPTIONS.h"
# endif
#endif
subroutine ecco_cost_driver( myTime, myIter, myThid )
c ==================================================================
c SUBROUTINE ecco_cost_driver
c ==================================================================
c
c o Compute all ecco cost function contributions.
c
c ==================================================================
c SUBROUTINE ecco_cost_driver
c ==================================================================
implicit none
c == global variables ==
#include "EEPARAMS.h"
#include "SIZE.h"
#include "PARAMS.h"
#ifdef ALLOW_TAPENADE
# include "CTRL_SIZE.h"
# include "CTRL.h"
# include "CTRL_GENARR.h"
# include "ECCO_SIZE.h"
# include "ECCO.h"
#endif
c == routine arguments ==
_RL myTime
integer myIter
integer myThid
#ifdef ALLOW_OBCS_COST_CONTRIBUTION
# ifdef ALLOW_DEBUG
IF (debugMode) CALL DEBUG_CALL('cost_obcs',myThid)
# endif
call timer_start('cost_obcs [ECCO SPIN-DOWN]', myThid)
call cost_obcs( myTime, myIter, myThid )
call timer_stop ('cost_obcs [ECCO SPIN-DOWN]', myThid)
#endif /* ALLOW_OBCS_COST_CONTRIBUTION */
c-- Compute user defined cost function contributions (elaborate)
call timer_start('cost_gencost_all [ECCO SPIN-DOWN]', myThid)
call cost_gencost_all( myIter, myTime, myThid )
call timer_stop ('cost_gencost_all [ECCO SPIN-DOWN]', myThid)
#ifdef ALLOW_CTRL
IF (useCTRL) THEN
# ifdef ALLOW_DEBUG
IF (debugMode) CALL DEBUG_CALL('ctrl_cost_driver',myThid)
# endif
call timer_start('ctrl_cost_driver [ECCO SPIN-DOWN]', myThid)
call ctrl_cost_driver( myThid )
call timer_stop ('ctrl_cost_driver [ECCO SPIN-DOWN]', myThid)
ENDIF
#endif /* ALLOW_CTRL */
RETURN
END