anchor.diff:          ! Vector to hold the (coriolis force x time-step x 0.5), which arises
           ! in an inner loop. Use a vector so we can zero it for dry cells
           real(dp):: dt_half_coriolis(domain%nx(1)), dt_half_coriolis_jph(domain%nx(1))
  +
  +        ! Vector to hold the advection related metric terms in spherical coordinates.
  +        ! If placed on the RHS of the momentum equations they have the form
  +        ! (+ tan(lat)/R * uvh , -tan(lat)/R * uuh ) 
  +        real(dp):: dt_tanlat_uvh_on_radius_earth_iph_j(domain%nx(1)), dt_tanlat_uuh_on_radius_earth_i_jph(domain%nx(1))
   
           ! Vector to hold the semi_implicit_friction_multiplier
           real(dp):: friction_multiplier_UH(domain%nx(1)), friction_multiplier_VH(domain%nx(1))
  
positive.code:         uh_i_jp1_max_loop_index(xL:(xU-1)) = ZERO_dp
          dt_half_coriolis(xL:(xU-1)) = ZERO_dp
          dt_half_coriolis_jph(xL:(xU-1)) = ZERO_dp
  
          !
          ! Before starting the loop, get the value of VH at
  
negative.code:         real(dp):: fr_limit_uh, fr_limit_vh
          ! d(stage)/dy; depth_{i, j+1/2}, depth_{j, i+1/2, j}
          real(dp):: dw_j(domain%nx(1)), h_jph_vec(domain%nx(1)), h_iph_vec(domain%nx(1))
  
          ! Indicators for wet/dry state (taking values 0.0 or 1.0)
          real(dp) :: h_iph_wet_strict(domain%nx(1)), h_jph_wet_strict(domain%nx(1))
          real(dp) :: h_iph_wet(domain%nx(1)), h_jph_wet(domain%nx(1))
  
  