Issues with time dependent elements in NGSpice depending on the OS or version

Hi all!

I am having the following issue when utilizing the variable TIME with NGSPICE:
When I run the simulation using my old computer (Ubuntu 16 and NGSpice v 32) it works perfectly. Instead, when I ran the same code using Windows 11 and NGSpice v 43, I got nonsense.

As an example, the code I post below utilizes two transmission lines coupled to a time-dependent capacitor. This simple code is enough to see the type of analysis I am trying to make.

See in the link a plot comparing the output of the two respective runs:
https://ibb.co/GR674v0

I hope you can help me understand better the origin of the problem, and hopefully, how to fix it.
Many thanks!
Lucas

*==============================================================
*==============================================================
CODE
*==============================================================
*==============================================================
.title TD Dimer
*==============================================================
*-------------------------------------------------------------

  • Parameters…
    *--------------------------------------------------------------
    .param Ck0 = 96.08436682642376pF
    .param Ck1 = 86.47593014378138pF
    .param wm = 251.32741228718345kHz

.param freq=215kHz
.param T=1/freq
.param step_time = T/500.
.param end_time = T*100

  • Specify some initial node voltages
    .ic v(v1)=0 v(v2)=0 $ ic: initial conditions
    *==============================================================
    *--------------------------------------------------------------
  • TIME MODULATED CAPACITOR
    *--------------------------------------------------------------
  • ASCII SCHEME
  •  v1    v2
    

*====o----||----o==== Transmission Line

  •     k(t)
    

*--------------------------------------------------------------

*--------------------------------------------------------------

  • leads (50 Ohm with sources)
    *Transmission line 1
    Vs1 0 vs1 SIN(0V 1V 215kHz 0s 0Hz)
    RZ0_1 vs1 v1 50Ohm

*Transmission line 2
Vs2 vs2 0 SIN(0V 0V 215kHz 0s 0Hz)
RZ0_2 vs2 v2 50Ohm

*--------------------------------------------------------------

  • Time modulated capacitor
    Ck v1 v2 {Ck0 + Ck1 * cos(wm * TIME)}
    *--------------------------------------------------------------

*-------------------------------------------------------------

  • Transient analysis specs and control
    *-------------------------------------------------------------
    .TRAN {step_time} {end_time} UIC

.control

run                              $ run the file
linearize                        $ resample all points on steps
plot v(v2)                     $ plot the oscillator voltage vector
set wr_singlescale                      $ only print out one time scale
wrdata nodes_v1_v2.dat v(v1),v(v2)            $ write 

.endc

.END