New URL for NEMO forge!

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.
#2277 (Problem in the trend routine for UBS+VVL option) – NEMO

Opened 5 years ago

Closed 3 years ago

#2277 closed Defect (fixed)

Problem in the trend routine for UBS+VVL option

Reported by: blaizotac Owned by: francesca
Priority: low Milestone:
Component: TRD Version: v4.0.*
Severity: minor Keywords:



For the release 3.6 (and 4.0)

In the file traadv_ubs.F90:
In the routine tra_adv_ubs for vertical advective trends, there are 5 arguments

CALL trd_tra( kt, cdtype, jn, jptra_zad, zltv)

But in the file trdtra.F90, the routine trd_tra uses 7 arguments

SUBROUTINE trd_tra( kt, ctype, ktra, ktrd, ptrd, pun, ptra )

The last 2 are written like optional

      REAL(wp), DIMENSION(jpi,jpj,jpk), INTENT(in), OPTIONAL ::   pun     ! now velocity 
      REAL(wp), DIMENSION(jpi,jpj,jpk), INTENT(in), OPTIONAL ::   ptra    ! now tracer variable

But they do not appear like that in the rest of the code ...

CASE( jptra_zad )   ;   CALL trd_tra_adv( ptrd, pun, ptra, 'Z', trdt  )
   SUBROUTINE trd_tra_adv( pf, pun, ptn, cdir, ptrd )
      REAL(wp), DIMENSION(jpi,jpj,jpk), INTENT(in   ) ::   pun     ! now velocity   in one direction
      REAL(wp), DIMENSION(jpi,jpj,jpk), INTENT(in   ) ::   ptn     ! now or before tracer


Is the following change correct?
Change routine tra_adv_ubs and add the 2 missing arguments ?

CALL trd_tra( kt, cdtype, jn, jptra_zad, zltv, pwn, ptn(:,:,:,jn))

Commit History (1)


r4.0-HEAD: fix trdtra when used with traadv_ubs, see #2277

Change History (6)

comment:1 Changed 5 years ago by clevy

  • Owner changed from systeam to francesca
  • Status changed from new to assigned

comment:2 Changed 4 years ago by jchanut

  • Component changed from TRA to TRD

comment:3 Changed 4 years ago by clevy

  • Version changed from v4.0 to v4.0.*

comment:4 Changed 3 years ago by smasson

The proposed solution is not the good one.
The vertical trend in tra_ubs is a specific case and is already computed before calling trd_tra. We must use only 5 aguments. In trd_tra we must then go directly to the "CASE DEFAULT" without recomputing the trend.
I changed trd_tra in order to test the presence of pun and directly go to the "CASE DEFAULT" when this argument is not present.

comment:5 Changed 3 years ago by smasson

In 13067:

Error: Failed to load processor CommitTicketReference
No macro or processor named 'CommitTicketReference' found

comment:6 Changed 3 years ago by smasson

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

fixed in [13067]

Note: See TracTickets for help on using tickets.