Skip to content

Commit

Permalink
add one store directive to avoid recomputing the routine in AD-mode
Browse files Browse the repository at this point in the history
  • Loading branch information
mjlosch committed Dec 7, 2023
1 parent 928b537 commit 134b5b4
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions pkg/shelfice/shelfice_thermodynamics.F
Original file line number Diff line number Diff line change
Expand Up @@ -710,6 +710,11 @@ SUBROUTINE SHELFICE_THERMODYNAMICS(
C end bi,bj loops
ENDDO
ENDDO
#ifdef ALLOW_AUTODIFF_TAMC
C Avoid recomputing most of the routine body in the AD-code
CADJ STORE shelfIceFreshWaterFlux
CADJ & = comlev1, key=ikey_dynamics, kind=isbyte
#endif

IF (SHELFICEMassStepping) THEN
CALL SHELFICE_STEP_ICEMASS( myTime, myIter, myThid )
Expand Down

0 comments on commit 134b5b4

Please sign in to comment.