Dear all,

I am working with NEMO 3.6 on a regional configuration of the Mediterranean Sea. At the Atlantic boundaries of my domain, I use open boundary conditions with flather scheme for 2D dynamics, which allows me to prescribe tidal forcing.

To validate the simulated tide, I run one year of simulation, starting from a simulation that ran without tidal forcing, and use a tide ramp to progressively add the forcing (`ln_tide_ramp=T`

). After one month of spin-up, I output instantaneous SSH at hourly frequency over 11 months and use it to extract the simulated tides amplitude and phase (with Utide Python module).

I have noticed that the simulated M2 harmonic depicts an amplitude bias which respect to the FES2014 fields, that I used at the open boundaries to force the simulation. After some investigations I have found this bias is related to the nodal correction factor that is applied to the input data at L.537 in `tide_init_elevation`

routine (bdy_tides.F90). Indeed, when I comment the multiplication by `ftide(itide)`

in the source code, the bias is almost completely removed (illustrated in the picture below). I encounter a similar problem with the corrections applied to phase (L.538), but I could not solve it by commenting `+v0tide(itide)+utide(itide)`

.

I was wondering if anyone has already experienced a similar problem, or has any idea of what could be done to solve it.

Thank you in advance.

Best regards,

Nicolas Gonzalez

Could it be a mismatch between U-tide and what is done in NEMO in relation to the nodal corrections? For a month-long simulation, U-tide may only apply a constant nodal value versus a daily update in NEMO (although I don’t expect the nodal correction to vary that much over a month) or U-tide may apply even none, or date mismatch?

Thank very much for this answer, there was indeed a mismatch between NEMO and Utide nodal corrections, which was disabled for the latter. Now that I have activated Utide nodal corrections, amplitude and phase bias are gone.

To compare to NEMO harmonic analysis module, I have launched a simulation with `key_diaharm`

using the same configuration as before. It seems that there is a constant phase bias (with respect to FES2014) in the harmonics returned by NEMO. The M2 phase bias is illustrated on the figure below.

Do you know if there are common mistakes to avoid with the `diaharm`

module that could generate such a bias?

Thank you again for your time.

Best regards,

Nicolas Gonzalez

Sorry Nicolas, I don’t identify any particular weakness in diaharm (although the 3.6 version I have may be a Mercator extension–hope we are talking about the same thing). I see nodal corrections present there as well. I guess a common mistake would be to have too many constituents for the analysis length used (although M2 should be less sensitive than some others semi-diurnal or diurnal). Maybe also make sure that you are correctly interpreting the z1/z2 (the diaharm output) in terms of the phase calculation.

Thank you for taking the time to dive into this. The version of `diaharm`

I am using is exactly this one. I have tried to perform the analysis for a simulation using only M2 tidal forcing (2 months of simulation) and the result remain the same.

I see in the user manual that phase should be interpreted as **arctan2(z2,z1)**, could you confirm this please ?

User manual (P.153):

Best regards,

Nicolas

After running couple new experiments with the harmonic analysis of NEMO I noticed that the phase bias I mentioned in my previous questions is somehow related to the model time step. Actually, the bias is approximately equal to the model time step. Could it help to explain the problem I encounter?

Thank you in advance for your time.

Best regards,

Nicolas

Hi Nicolas,

Having a quick look at diaharm routine, it seems that the right time stamp line 186 could not be right. We do use values at “now” time step in the harmonic analysis (`sshn`

, `un_b`

, `vn_b`

), and as far as I understand nodal corrections, the corresponding time value, `ztime`

should rather be:

```
ztime = (kt-nit000) * rdt
```

instead of

```
ztime = (kt-nit000+1) * rdt
```

Hence, that’s a one time step shift in the past. Could you try this ?

Jérôme

Hi Jerôme,

Thank you very much for your answer.

I have made the modification and now the phase bias is gone. So, it seems there is indeed an issue at line 186 in `diaharm`

routine. I think the problem is still present in the 4.0.7 NEMO release.

Should I open a ticket to report this issue?

Thank you again for your help.

Best regards,

Nicolas.

Good. Yes, please raise a ticket.

Have you sorted out the conventions of harmonic outputs ? i.e. complex conjugate or not ? I haven’t looked at this yet, but I have always been used to compute the phase as `atan2(-z2, z1)`

, i.e. assuming a complex conjugate.

Yes, by comparing with tidal gauge observations I have also found that the phase should be computed as “atan2(-z2,z1)”. From what I understand of the code, for NEMO3.6, the complex formulation is chosen at L360-361 in diaharm routine.

Nicolas

OK: documentation’s wrong.