Back to home page

MITgcm

 
 

    


File indexing completed on 2024-03-19 05:10:16 UTC

view on githubraw file Latest commit 720a211d on 2024-03-18 17:10:23 UTC
8f7d13d0c9 Jean*0001 #include "ECCO_OPTIONS.h"
b4daa24319 Shre*0002 #ifdef ALLOW_TAPENADE
                0003 # ifdef ALLOW_CTRL
                0004 #  include "CTRL_OPTIONS.h"
                0005 # endif
                0006 #endif
bf759c6109 Gael*0007 
720a211d38 Ou W*0008       subroutine ecco_cost_driver( myTime, myIter, myThid )
bf759c6109 Gael*0009 
                0010 c     ==================================================================
                0011 c     SUBROUTINE ecco_cost_driver
                0012 c     ==================================================================
                0013 c
                0014 c     o Compute all ecco cost function contributions.
                0015 c
                0016 c     ==================================================================
                0017 c     SUBROUTINE ecco_cost_driver
                0018 c     ==================================================================
                0019 
                0020       implicit none
                0021 
                0022 c     == global variables ==
                0023 
                0024 #include "EEPARAMS.h"
                0025 #include "SIZE.h"
                0026 #include "PARAMS.h"
b4daa24319 Shre*0027 #ifdef ALLOW_TAPENADE
                0028 # include "CTRL_SIZE.h"
4d72283393 Mart*0029 # include "CTRL.h"
b4daa24319 Shre*0030 # include "CTRL_GENARR.h"
                0031 # include "ECCO_SIZE.h"
                0032 # include "ECCO.h"
                0033 #endif
db1c083aaf Gael*0034 
ac03b700cb Gael*0035 c     == routine arguments ==
                0036       _RL     myTime
720a211d38 Ou W*0037       integer myIter
                0038       integer myThid
ac03b700cb Gael*0039 
6b47d550f4 Mart*0040 #ifdef ALLOW_OBCS_COST_CONTRIBUTION
720a211d38 Ou W*0041 # ifdef ALLOW_DEBUG
6b47d550f4 Mart*0042       IF (debugMode) CALL DEBUG_CALL('cost_obcs',myThid)
720a211d38 Ou W*0043 # endif
6b47d550f4 Mart*0044       call timer_start('cost_obcs          [ECCO SPIN-DOWN]', myThid)
720a211d38 Ou W*0045       call cost_obcs( myTime, myIter, myThid )
6b47d550f4 Mart*0046       call timer_stop ('cost_obcs          [ECCO SPIN-DOWN]', myThid)
720a211d38 Ou W*0047 #endif /* ALLOW_OBCS_COST_CONTRIBUTION */
6b47d550f4 Mart*0048 
bf759c6109 Gael*0049 c--   Compute user defined cost function contributions (elaborate)
5c1da54d9d Gael*0050       call timer_start('cost_gencost_all    [ECCO SPIN-DOWN]', myThid)
                0051       call cost_gencost_all( myIter, myTime, myThid )
                0052       call timer_stop ('cost_gencost_all    [ECCO SPIN-DOWN]', myThid)
bf759c6109 Gael*0053 
ad939407d8 Gael*0054 #ifdef ALLOW_CTRL
58023ceed9 Gael*0055       IF (useCTRL) THEN
720a211d38 Ou W*0056 # ifdef ALLOW_DEBUG
ad939407d8 Gael*0057       IF (debugMode) CALL DEBUG_CALL('ctrl_cost_driver',myThid)
720a211d38 Ou W*0058 # endif
                0059        call timer_start('ctrl_cost_driver [ECCO SPIN-DOWN]', myThid)
                0060        call ctrl_cost_driver( myThid )
                0061        call timer_stop ('ctrl_cost_driver [ECCO SPIN-DOWN]', myThid)
58023ceed9 Gael*0062       ENDIF
720a211d38 Ou W*0063 #endif /* ALLOW_CTRL */
28e42a683a Gael*0064 
6b47d550f4 Mart*0065       RETURN
                0066       END