From 641308641c218b889941c13423ea908d5bf3abf4 Mon Sep 17 00:00:00 2001 From: Anton Steketee <79179784+anton-seaice@users.noreply.github.com> Date: Fri, 23 Aug 2024 13:37:06 +1000 Subject: [PATCH] allow for default cice initial conditions (#25) --- payu_config/setup_scripts/setup_cice_restarts.sh | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/payu_config/setup_scripts/setup_cice_restarts.sh b/payu_config/setup_scripts/setup_cice_restarts.sh index c1e7367..8d8b7e1 100755 --- a/payu_config/setup_scripts/setup_cice_restarts.sh +++ b/payu_config/setup_scripts/setup_cice_restarts.sh @@ -1,12 +1,12 @@ #!/bin/bash # patch for https://github.com/open-mpi/ompi/issues/12141 -if ! [ -f work/access-om3.cice.r.* ]; then +if [ -f work/access-om3.cice.r.* ] ; then + # change restart symlink to hardlink + RESTART=$(echo work/access-om3.cice.r.*) + ln -f $(readlink $RESTART) $RESTART +elif [ -f work/INPUT/iced.1900-01-01-10800.nc ]; then # no restart files yet, use initial conditions IC=$(readlink work/INPUT/iced.1900-01-01-10800.nc) rm work/INPUT/iced.1900-01-01-10800.nc cp $IC work/INPUT/iced.1900-01-01-10800.nc -else - # change restart symlink to hardlink - RESTART=$(echo work/access-om3.cice.r.*) - ln -f $(readlink $RESTART) $RESTART fi