New URL for NEMO forge!   http://forge.nemo-ocean.eu

Since March 2022 along with NEMO 4.2 release, the code development moved to a self-hosted GitLab.
This present forge is now archived and remained online for history.
#1483 (Erroneous adjoint code in subroutine 'tra_ldf_iso_adj' of module 'traldf_iso_tam') – NEMO

Opened 9 years ago

Closed 9 years ago

Last modified 2 years ago

#1483 closed Bug (fixed)

Erroneous adjoint code in subroutine 'tra_ldf_iso_adj' of module 'traldf_iso_tam'

Reported by: sam Owned by: nemo
Priority: high Milestone:
Component: TAM Version: v3.4
Severity: Keywords: TAM v3.4
Cc:

Description

As pointed out in ticket #1482, the test of the tangent-linear and adjoint subroutines of module 'traldf_iso_tam' fails after fixing the computation of the lateral diffusion coefficients or by selecting non-zero additional horizontal tracer diffusion.

Analysis of the relevant code revealed that the adjoint subroutine lacks the setting to zero of variables 'aditad' and 'adjtad' at the end of the loop over the tracer index, which would be required for it to correspond to its tangent-linear counterpart. At the end of the innermost body of the final nested loop structure (loop over the tracer index and the three spatial indices), both 'zditad(ij,jj,jk) and 'zditad(ij,jj,jk)' could be set to zero in order to make the loop correspond to the respective section of the tangent-linear counterpart of the subroutine. Further, at the end of the body of the outermost level of this loop (loop over the tracer index), the two lines 140 and 141 of the tangent-linear code should be mirrored in the adjoint code.

Commit History (1)

ChangesetAuthorTimeChangeLog
5151pabouttier2015-03-18T11:47:26+01:00

Fixing defects in traldf_tam routines; See Ticket #1482 an #1483

Change History (6)

comment:1 Changed 9 years ago by bouttier

  • Resolution set to fixed
  • Status changed from new to closed

comment:2 Changed 8 years ago by nicolasmartin

  • Keywords TAM added

comment:3 Changed 8 years ago by nicolasmartin

  • Keywords nemo_v3_4* added

comment:4 Changed 6 years ago by nemo

  • Keywords release-3.4* added; nemo_v3_4* removed

comment:5 Changed 6 years ago by nemo

  • Keywords release-3.4* removed

comment:6 Changed 2 years ago by nemo

  • Keywords v3.4 added
Note: See TracTickets for help on using tickets.