[MITgcm-support] using (zero-d) scalars as controls with state estimate/optimisation

Patrick Heimbach heimbach at mit.edu
Fri Feb 17 12:42:04 EST 2023


Dan,

Should not be a problem and has been done way back.

Main thing is to make sure you specify corresponding control variable both in the code and in the argument list of the AD tool. Probably easiest is to add that variable in ctrl.h.
And then of course also have somewhere to write the adjoint variable. Bottom line, don’t use the gentim, genarr array as controls.

Remember how we bypassed writing control variables to file initially when getting OpenAD to work. Very much the same steps (but easier) apply here.

p.

From: MITgcm-support <mitgcm-support-bounces at mitgcm.org> on behalf of Daniel Goldberg <Dan.Goldberg at ed.ac.uk>
Date: Friday, February 17, 2023 at 11:30 AM
To: MITgcm Support <mitgcm-support at mitgcm.org>
Subject: [MITgcm-support] using (zero-d) scalars as controls with state estimate/optimisation
Hello All

As in the subject, I am wondering if any MITgcm/adjoint users have ever used a (zero-dimensional) scalar (either static, or time dependent) as a control, and have any examples of doing so or any advice as to whether it is a good idea. As far as I know, it is only possible to use 2D and 3D static and time varying fields.

I know that it is possible to ensure that gradients of a genarr2d or gentim2d control are spatially constant e.g. by using a global sum of the control array and adding to a scalar -- but this does not reduce the size of the gradient passed to lsopt or m1qn3, so im not sure if the results would be similar to a case where we simply consider the gradient of a scalar. So Im not sure if this is a suitable replacement. Apologies if what Im saying is unclear.

Many thanks
Dan

--
Daniel Goldberg, PhD (he/him)
Reader in Glaciology
School of Geosciences, University of Edinburgh
Geography Building, Drummond Street, Edinburgh EH8 9XP


em: dan.goldberg at ed.ac.uk<mailto:dan.goldberg at ed.ac.uk>
web: https://www.geos.ed.ac.uk/homes/dgoldber
The University of Edinburgh is a charitable body, registered in Scotland, with registration number SC005336. Is e buidheann carthannais a th’ ann an Oilthigh Dhùn Èideann, clàraichte an Alba, àireamh clàraidh SC005336.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.mitgcm.org/pipermail/mitgcm-support/attachments/20230217/bde748d7/attachment-0001.html>


More information about the MITgcm-support mailing list