The Ocean City Beach Patrol and Assateague State Park closed the ocean to swimming, wading and surfing Tuesday as tropical storm activity off the coast brings dangerous conditions to the resort town.