# Possible issue with ln\_dyn\_trd (momentum trend diagnostics) affecting temperature and salinity fields

**URL:** <https://nemo-ocean.discourse.group/t/possible-issue-with-ln-dyn-trd-momentum-trend-diagnostics-affecting-temperature-and-salinity-fields/956>\
**Category:** v4.2.x\
**Tags:** TRD\
**Created:** [13 October 2025 12:42 UTC](https://nemo-ocean.discourse.group/t/possible-issue-with-ln-dyn-trd-momentum-trend-diagnostics-affecting-temperature-and-salinity-fields/956 "2025-10-13T12:42:32Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![luciag](https://avatars.discourse-cdn.com/v4/letter/l/82dd89/32.png) [@luciag](https://nemo-ocean.discourse.group/u/luciag)\
**Post date:** [13 October 2025 12:42 UTC](https://nemo-ocean.discourse.group/t/possible-issue-with-ln-dyn-trd-momentum-trend-diagnostics-affecting-temperature-and-salinity-fields/956/1 "2025-10-13T12:42:32Z")

</div>

Hello everyone,

I am running NEMO 4.2 and would like to compute the diagnostics for the momentum trend. To do this, I activated the flag `ln_dyn_trd` and added the fields I wanted to output in the XML file.

I noticed that the temperature and salinity fields differ from those obtained when `ln_dyn_trd` is deactivated. Trying to isolate the problem, I found that the computation of the vorticity term differs depending on whether the flag is active or not: the code (`DYN/dynvor.f90`) computes the total vorticity when the flag is deactivated, but computes separately the planetary vorticity and the metric term when it is activated. Forcing the code to compute directly the total vorticity also when `ln_dyn_trd = .true.` solved the issue: the temperature and salinity fields then match those from the run with `ln_dyn_trd = .false.`

Does anyone know if there is a bug in this part of the code in NEMO 4.2? Alternatively, could this be due to some numerical issue related to the sum of the planetary vorticity and the metric term?

Thanks.

All the best,

Lucia
