Hello Ngoc Anh,
I suggest you to do exactly what is done for one of the O2 variable (e.g. O2, OL or NH4) in the sources/waqtel directory, in particular in DECLARATIONS_WAQTEL module. For example, IND_O2 is known by every subroutine using USE DECLARATIONS_WAQTEL ONLY... IND_O2
In the standard release of TELEMAC, the number of tracers is hard coded in this DECLARATIONS_WAQTEL module, = 3, see:
INTEGER, PARAMETER :: NWAQ_OXYGN = 3
INTEGER RANK_OXYGN(NWAQ_OXYGN)
3 should be replaced by 4 in your case.
Hope this helps,
Chi-Tuan