I cannot reproduce your problem. I added a passive tracer to the DAMEE_4 application and set T_PASSIVE and ANA_PASSIVE and everything
is working fine. In checkvars.F we have:
DO i=1,Nvar
get_var(i)=.FALSE.
have_var(i)=.FALSE.
END DO
...
# if defined T_PASSIVE
# if defined ANA_PASSIVE
IF (nrrec(ng).ne.0) THEN
DO itrc=1,NPT
get_var(idTvar(inert(itrc)))=.TRUE.
END DO
END IF
# else
DO itrc=1,NPT
get_var(idTvar(inert(itrc)))=.TRUE.
END DO
# endif
# endif
This implies that ROMS expects to see the passive tracer variable in INIname NetCDF file only during restart. There is not need to recompile and turn off ANA_PASSIVE. A restart file should have such field when you are restarting (nrrec(ng).ne.0). We do exactly the same thing biology and sediment applications.