[Mitgcm-support] Re: patrick: ecco_readparms.F
mitgcm-support at dev.mitgcm.org
mitgcm-support at dev.mitgcm.org
Wed Jul 9 15:48:52 EDT 2003
Purely historical:
At the time of creation, forward stuff was meant
to be kept separate from anything having to do with
adjointing which at the time was synonymous to use
the ECCO environment.
Changing as you did should be fine, provided you make
sure that such a flag doesn't show up at another
"relevant" place.
Patrick
Geoffrey GEBBIE wrote:
>
> 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
--
_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/
Patrick Heimbach ........................ FON: +1/617/253-5259
Massachusetts Institute of Technology ... FAX: +1/617/253-4464
EAPS, Room 54-1518 ...........................................
77 Massachusetts Avenue .............. mailto:heimbach at mit.edu
Cambridge MA 02139, U.S.A. ..... http://www.mit.edu/~heimbach/
More information about the MITgcm-support
mailing list