ERROR: Invalid thermo keyword in variable formula (../variable.cpp:2008)

I am attaching a part of my input script. I get the message that ERROR: Invalid thermo keyword in variable formula (…/variable.cpp:2008)

Kindly help me to point out my mistake.

variable N equal atoms
variable ko equal (2.0v_N)^(1/3)
variable k equal ko
3.1415926535898/lx
variable mx equal -1.0
variable my equal 1.0
variable mz equal 1.0
variable a atom cos(v_k*(v_mxx+v_myy+v_mz*z))
compute b all reduce sum v_a

thermo_style custom step temp press etotal ke c_b pe

I am attaching a part of my input script. I get the message that ERROR:
Invalid thermo keyword in variable formula (../variable.cpp:2008)

please run your input with "-echo screen" and you should see the
offending line immediately.

axel.