Judge directs Trump to comply with order to unfreeze federal grants