[Mitgcm-support] adjoint of KPP fixed for ecco-branch

mitgcm-support at dev.mitgcm.org mitgcm-support at dev.mitgcm.org
Wed Jul 9 15:40:56 EDT 2003


Hey Dimitris,

before the week ends, good news.
I fixed the KPP problem in the latest ecco_c50_e28.

It was related to some key computations
(or rather non-computations) which had escaped my attention.
Basically, my philosophy is to re-compute keys within
a subroutine rather than passing them trhough common blocks
(ikey is in a common block).
The reason is that this gets easily forgotten when the
code gets re-arranged, or keys get changed in S/R calls,
but the original value is needed in the calling routine,
the adjoint code gets easily brokenm and it's obsucre why
(this has happended before).
Instead, re-computing the key in the S/R makes it clear
how the key is (or was) supposed to look like.

To make a long story longer, the problem occured in kpp_calc.
I had changed the keys in thermodynamics from ikey to itdkey,
so ikey wasn't defined anymore, but used in kpp_calc.

I'll check in the code later today.

Cheers
-Patrick

-- 
_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/
Patrick Heimbach ... Massachusetts Institute of Technology
FON: +1/617/253-5259 .................. EAPS, Room 54-1518
FAX: +1/617/253-4464 ............. 77 Massachusetts Avenue
mailto:heimbach at mit.edu ............... Cambridge MA 02139
http://www.mit.edu/~heimbach/ ..................... U.S.A.




More information about the MITgcm-support mailing list