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.
#1242 (Advection schemes cause trd_trc to be called when key not set) – NEMO

Opened 10 years ago

Closed 10 years ago

Last modified 2 years ago

#1242 closed Defect (fixed)

Advection schemes cause trd_trc to be called when key not set

Reported by: timgraham Owned by: timgraham
Priority: low Milestone:
Component: OCE Version: v3.4
Severity: Keywords: OPA TRD advection v3.4
Cc:

Description

When running with passive tracers (using my_trc) and key_trdtra but not key_trdtrc the advection scheme (I'm using tvd but all others are the same) calls trd_mod when it is handling the passive tracers. trd_mod then calls trd_mod_trc resulting in the following print statements in the output files.

trd_mod_trc_trp : You should not have seen this print! error?

This is due to the variable l_trd being set within the initial if statement:

      IF( kt == kit000 )  THEN
         IF(lwp) WRITE(numout,*)
         IF(lwp) WRITE(numout,*) 'tra_adv_tvd : TVD advection scheme on ', cdtype
         IF(lwp) WRITE(numout,*) '~~~~~~~~~~~'
         !
         l_trd = .FALSE.
         IF( ( cdtype == 'TRA' .AND. l_trdtra ) .OR. ( cdtype == 'TRC' .AND. l_trdtrc ) ) l_trd = .TRUE.
      ENDIF

I propose fixing this by moving the last two lines outside of the IF block so that l_trd is updated each time the advection scheme is called. i.e.

      IF( kt == kit000 )  THEN
         IF(lwp) WRITE(numout,*)
         IF(lwp) WRITE(numout,*) 'tra_adv_tvd : TVD advection scheme on ', cdtype
         IF(lwp) WRITE(numout,*) '~~~~~~~~~~~'
      ENDIF
      !
      l_trd = .FALSE.
      IF( ( cdtype == 'TRA' .AND. l_trdtra ) .OR. ( cdtype == 'TRC' .AND. l_trdtrc ) ) l_trd = .TRUE.

Unless I hear otherwise I intend to implement this change on Monday (17th Feb).

Commit History (1)

ChangesetAuthorTimeChangeLog
4500timgraham2014-02-18T16:26:08+01:00

Modified advection schemes as in #1242 to prevent trdtrd being called when key_trdtra is set but key_trdtrc is not set.

Change History (8)

comment:1 Changed 10 years ago by timgraham

Code changes added to dev_v3_4_STABLE_2012 at revision 4500

comment:2 Changed 10 years ago by timgraham

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

comment:3 Changed 8 years ago by nicolasmartin

  • Keywords advection added; adv removed

comment:4 Changed 8 years ago by nicolasmartin

  • Keywords nemo_v3_4* added

comment:5 Changed 8 years ago by nicolasmartin

  • Keywords TRD added; trd_mod trd_mod_trc removed

comment:6 Changed 7 years ago by nemo

  • Keywords release-3.4* added; nemo_v3_4* removed

comment:7 Changed 7 years ago by nemo

  • Keywords release-3.4* removed

comment:8 Changed 2 years ago by nemo

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