As discussed in Sections 33.2.4, care must be taken when formulating the form of momentum friction when employing spatially variable viscosities. This section discusses the numerical discretization of the formulation provided in Section 9.8. For the option velocity_horz_mix_var, viscosity may be specified a priori to be any function of latitude, longitude, and depth. Additionally, as discussed in Section 33.7, it may be specified through the Smagorinsky scheme. The option tracer_horz_mix_var allows for a similar specification of the horizontal tracer diffusivity.