[Mitgcm-support] patrick: ecco_readparms.F

mitgcm-support at dev.mitgcm.org mitgcm-support at dev.mitgcm.org
Wed Jul 9 15:38:36 EDT 2003


hi patrick:

is there any reason for the block 

C--   Initialise the cost function.
      call cost_readparms( mythid )
      call cost_init( myThid )
      _BARRIER

to be inside #ifdef ECCO_OPTIMIZATION in ecco_readparms? 

often i like to run the forward model with a cost function evaluation
but no adjoint run. to do this, i move the aforementioned block outside
the ECCO_OPTIMIZATION area to a new #ifdef ALLOW_COST block. It seems to
run fine in my first tests.

my subroutine looks like: 

#ifdef ALLOW_COST
CGG   I like to run the model with cost function evaluation, but no
adjoint model run.
C--   Initialise the cost function.
      call cost_readparms( mythid )
      call cost_init( myThid )
      _BARRIER
#endif

#ifdef ALLOW_ECCO_OPTIMIZATION
c--   Initialise the optimization-related parts of the ECCO State
c--   Estimation package.
      CALL optim_init( myThid )
      _BARRIER

C--   Initialise the control vector.
      CALL ctrl_init( myThid )
      _BARRIER

#ifdef ALLOW_GRADIENT_CHECK
C--   Initialise gradient check parameters
      if (useGrdchk) call grdchk_readparms( myThid )
#endif

#endif /* ALLOW_ECCO_OPTIMIZATION */

#ifdef ALLOW_ECCO_DIAGNOSTICS_RUN
c--   Initialise the ECCO diagnostics package.
      CALL diagnos_init( myThid )
      _BARRIER
#else
c--   Diagnostics not enabled.
#endif

-Jake 




More information about the MITgcm-support mailing list