Hello Sidharth,
Sorry for the delay, I forgot to answer and finally I had to check deeper what you described.
Your idea was good to implement in TRISOU subroutine. I think you did not get any effect because you added the horizontal acceleration at a wrong location.
Indeed, the sequence with GRADSX or Y is only done if ACTIVE_TEMP_SAL.OR.ACTIVE_SED is true, which may not be your case (LAW OF DENSITY = 0 without sediment, or = 5, or no tracer ?).
You should do the loop e.g. at the end of TRISOU subroutine with something like (I have not tested, there may be mistake(s)):
IF(SCV1%TYPR.EQ.'0') THEN
SCV1%TYPR='Q'
SCV2%TYPR='Q'
DO IPLAN=1,NPLAN
DO I=1,NPOIN2
I3D=(IPLAN-1)*NPOIN2+I
CV1(I3D) = ACCELERATION_X(I)
CV2(I3D) = ACCELERATION_Y(I)
ENDDO
ENDDO
ELSE
DO IPLAN=1,NPLAN
DO I=1,NPOIN2
I3D=(IPLAN-1)*NPOIN2+I
CV1(I3D) = CV1(I3D) + ACCELERATION_X(I)
CV2(I3D) = CV1(I3D) + ACCELERATION_Y(I)
ENDDO
ENDDO
ENDIF
if ACCELERATION_X and ACCELERATION_Y are constant over the vertical or if it varies in 3D:
IF(SCV1%TYPR.EQ.'0') THEN
SCV1%TYPR='Q'
SCV2%TYPR='Q'
CALL OV('X=Y ', X=CV1, Y=ACCELERATION_X, DIM1=NPOIN3)
CALL OV('X=Y ', X=CV2, Y=ACCELERATION_Y, DIM1=NPOIN3)
ELSE
CALL OV('X=X+Y ', X=CV1, Y=ACCELERATION_X, DIM1=NPOIN3)
CALL OV('X=X+Y ', X=CV2, Y=ACCELERATION_Y, DIM1=NPOIN3)
ENDIF
Hope this helps,
Chi-Tuan