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

Opened 10 years ago

Closed 10 years ago

#1243 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.6
Severity: Keywords:
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
4499timgraham2014-02-18T16:14:31+01:00

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

Change History (3)

comment:1 Changed 10 years ago by timgraham

  • Owner changed from NEMO team to timgraham

comment:2 Changed 10 years ago by timgraham

Code committed to dev_MERGE_2013 branch in revision 4499

comment:3 Changed 10 years ago by timgraham

  • Resolution set to fixed
  • Status changed from new to closed
Note: See TracTickets for help on using tickets.