[MITgcm-support] easier ways to implement cost function

Dani Jones dcjones.work at gmail.com
Wed Mar 8 08:32:39 EST 2023


Hi Mario,

Have you had a look at the "boxmean" options in the ecco package? There are
tools in the ecco package for setting up generic cost function terms that
can be switched on and off at runtime. It generally makes the process of
defining the cost function much easier:

https://mitgcm.readthedocs.io/en/latest/ocean_state_est/ocean_state_est.html#generic-integral-function

Specifically, have a look at this table:

https://mitgcm.readthedocs.io/en/latest/ocean_state_est/ocean_state_est.html#genint-ecco-barfile

I'm not sure if it will be helpful or not, but here is the setup that I
have used for a few adjoint studies, using the generic integral approach:

https://github.com/DanJonesOcean/ECCO_v4_r2_config

Thanks,
Dani

--
*Dr Dan(i) Jones* • UKRI Future Leaders Fellow
Polar Oceans Team <https://www.bas.ac.uk/team/science-teams/oceans/> • BAS
AI Lab <https://www.bas.ac.uk/project/ai> • British Antarctic Survey
<https://www.bas.ac.uk/>
Website <http://www.danjonesocean.com/> • Twitter
<https://twitter.com/DanJonesOcean> • they/them


On Wed, Mar 8, 2023 at 1:18 PM mario wrk <wrkmario at gmail.com> wrote:

> Dear MITgcm community,
> Hi, May I ask a very general question, what is the easiest way to
> implement a cost function for adjoint study? As I find available cost
> functions in ecco package, can it be easier if I just call a cost function
> in pkg/ecco?
>
> I was modifying the legacy code of my group, then I realized, even if I
> just want to change one variable, for example, Zonal Velocity  to
> Temperature in the COST FUNCTION, I have to modify some other associated
> files (I did try and might not find all of them). Then I got TAF ERROR:
> code of function tbar not seen and no flow information set, cannot generate
> derivative common block variable to tbar
>
> Best,
> Mario
> _______________________________________________
> MITgcm-support mailing list
> MITgcm-support at mitgcm.org
> http://mailman.mitgcm.org/mailman/listinfo/mitgcm-support
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.mitgcm.org/pipermail/mitgcm-support/attachments/20230308/6365a373/attachment.html>


More information about the MITgcm-support mailing list