[MITgcm-support] How to write a cost function with time-averaged SSH?

Patrick Heimbach heimbach at mit.edu
Tue Oct 21 21:38:26 EDT 2014


Hi Joe,

you can still use the verification/global_ocean.90x40x15/
because it has both a setup using TAF (code_ad/) and one using OpenAD (code_oad/).

If testreport works for you, all you have to do, assuming you’ve installed OpenAD, is (from verification/ directory):
./testreport -oad -t global_ocean.90x40x15

The compile steps in more detail are:

cd verification/global_ocean.90x40x15/build/
../../../tools/genmake -oad -mods -mods ../code_oad/
make adAll

That compiles the model. To execute, we then do (from build):
cd ../run
ln -s ../build/mitgcmuv_ad .
ln -s ../input_oad/* .
./prepare_run
./mitgcmuv_ad >! output_oadm.txt

You don’t have to worry about most of the files you mention in your email below, unless you’re embarking on some heavy-weight code changes. I suggest you start from a working verification (such as the one above) and then adjust/adapt code to your needs.

Sorry this stuff isn’t well documented yet, lack of (wo)man power. But at least it’s available, tested, and seems to work.

Cheers
p.

On Oct 16, 2014, at 4:44 PM, Joe Robsion <robsionjoe at yahoo.com> wrote:

> Hi Patrick,
> 
> Thanks a lot for the suggestion. I gave it a try and came out my own cost function today. Now, I'm a little confused about my next step. I guess I should use the OpenAD to produce the adjoint codes. I ran into several files "cb2mFiles", "dontCompile", "dontTransform","findAndDiff.bash","code_ad_diff.list", and "code_ad_extra.list". It's not clear to me what these files are used for, and how to define the content of these files. It seems that all the files are different among the examples in /verification/ directory. I googled these files and checked the MITgcm manual, but find no useful information. 
> 
> Could you give me some instruction about these files? Thanks a lot.
> 
> Best regards,
> Joe
> 
> _______________________________________________
> MITgcm-support mailing list
> MITgcm-support at mitgcm.org
> http://mitgcm.org/mailman/listinfo/mitgcm-support


---
Patrick Heimbach | heimbach at mit.edu | http://www.mit.edu/~heimbach
MIT | EAPS 54-1420 | 77 Massachusetts Ave | Cambridge MA 02139 USA
FON +1-617-253-5259 | FAX +1-617-253-4464 | SKYPE patrick.heimbach

-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 1588 bytes
Desc: not available
URL: <http://mitgcm.org/pipermail/mitgcm-support/attachments/20141022/c1be6280/attachment.p7s>


More information about the MITgcm-support mailing list