Coupled boundary layers for the primitive equations of atmosphere