Opened 5 years ago

Closed 5 years ago

Last modified 3 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: release-3.4
Severity: Keywords: TAM
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 (5)

comment:1 Changed 5 years ago by bouttier

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

comment:2 Changed 4 years ago by nicolasmartin

  • Keywords TAM added

comment:3 Changed 4 years ago by nicolasmartin

  • Keywords nemo_v3_4* added

comment:4 Changed 3 years ago by nemo

  • Keywords release-3.4* added; nemo_v3_4* removed

comment:5 Changed 3 years ago by nemo

  • Keywords release-3.4* removed
Note: See TracTickets for help on using tickets.