Deviated process AR(1)

I was trying to write the deviation of process g_{mt} from its steady-state g_m as the ar(1) process. How will I write if I sat g_{mt} as a variable?.

Sorry, but I don’t understand the question. Please provide more details and context.

So, let us say, \tilde{g_{mt}}=g_{mt} - g_{m}. now the deviation rate \tilde{g_{mt}} follows a simple ar(1) process. \tilde{g_{mt}}=\rho_m \tilde{g_{mt-1}} + \epsilon_t.
When writing the code for the dynare. I set g_{mt} as variable and \epsilon_t as the shock. But as described earlier, the deviation rate follows an ar(1) process, not the g_{mt}, how to express that deviation \tilde{g_{mt}} follows an ar(1) process?.

In this case, simply implement

as an equation in your model. \tilde{g_{mt}} is a variable.

But the question is how will i tell the system about the ss value of g_{mt}? will i just write down \tilde{g_{mt}}=g_{mt}-g_{m} and give the value of g_{m} gained by manual calculation? or the dynare will calculate it by themselves?.

Yes, simply append the definition that
\tilde g_{mt}=g_{mt}-g_m