An implicit wetting and drying approach for non-hydrostatic baroclinic flows in high aspect ratio domains