Skip to content

Commit

Permalink
Update regional_mom6/regional_mom6.py
Browse files Browse the repository at this point in the history
Co-authored-by: Angus Gibson <angus@agibson.me>
  • Loading branch information
ashjbarnes and angus-g authored Nov 22, 2023
1 parent c89c436 commit e1de0d8
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions regional_mom6/regional_mom6.py
Original file line number Diff line number Diff line change
Expand Up @@ -1247,10 +1247,14 @@ def setup_run_directory(self, rmom6_path, surface_forcing="era5", using_payu=Fal
)
shutil.copytree(rundir_src, self.mom_run_dir)
## Make symlinks between run and input directories
if not (self.mom_run_dir / "inputdir").exists():
os.symlink(str(self.mom_input_dir), str(self.mom_run_dir / "inputdir"))
if not (self.mom_input_dir / "rundir").exists():
os.symlink(str(self.mom_run_dir), str(self.mom_input_dir / "rundir"))
inputdir_in_rundir = self.mom_run_dir / "inputdir"
rundir_in_inputdir = self.mom_input_dir / "rundir"

inputdir_in_rundir.unlink(missing_ok=True)
inputdir_in_rundir.symlink_to(self.mom_input_dir)

rundir_in_inputdir.unlink(missing_ok=True)
rundir_in_inputdir.symlink_to(self.mom_run_dir)

## Get mask table information
ncpus = 10
Expand Down

0 comments on commit e1de0d8

Please sign in to comment.