The error you posted sounds like a memory issue rather than a disk issue.
For this problem, that is 4586133840 bytes before taxes,6551619771 bytes after taxes.
This suggests that you need ~6.5 GB memory for this calculation, and probably more for overhead. How much memory is allocated to your job on Bridges-2?
As an aside, the scratch directory you are using on ocean is for short-term storage of files for your project but is not directly linked to the node that your job runs on. Once you resolve this memory error, you will likely see better performance if you set the PSI_SCRATCH variable to the node’s local scratch dirctory in your batch script. On Bridges-2, this directory is set to the environment variable $LOCAL once the job starts.