Text this: Optimal control theory for a system of partial differential equations associated with stratified fluids