Skip to content
Merged
Show file tree
Hide file tree
Changes from 4 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
run_utils/py_run_utils/uv.lock
experiments/*
!experiments/archive.sh
!experiments/exp.EXCLAIM_COUPLED.run
!experiments/inputs.sh
!experiments/namelists.sh
Expand Down
16 changes: 16 additions & 0 deletions experiments/archive.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
#!/bin/bash

# ============================================================================
#SBATCH --account=cwp07
#SBATCH --partition=xfer
#SBATCH --job-name=ARCHIVE
#SBATCH --output=LOG.ARCHIVE.%j
#SBATCH --error=LOG.ARCHIVE.%j
#SBATCH --time=01:00:00
#SBATCH --nodes=1


mkdir -p ${ARCHIVE_DIR}

# rclone command
rclone move --include "/${EXPNAME}*/${chunk_start_date}_${chunk_end_date}/**" --include "${EXPNAME}_restart_*_${chunk_start_date//[-:]}.nc" ./ ${ARCHIVE_DIR}/
20 changes: 17 additions & 3 deletions experiments/exp.EXCLAIM_COUPLED.run
Original file line number Diff line number Diff line change
Expand Up @@ -117,15 +117,15 @@ fi
lrestart=${lrestart:-.false.}
export checkpoint_interval=${checkpoint_interval:-${restart_interval}}

chunk_start_date=${chunk_start_date:-${start_date}}
chunk_end_date=$(date_cycle "${chunk_start_date}" "${restart_interval}" "${end_date}")
export chunk_start_date=${chunk_start_date:-${start_date}}
export chunk_end_date=$(date_cycle "${chunk_start_date}" "${restart_interval}" "${end_date}")

start_year=${start_date:0:4}
chunk_start_year=${chunk_start_date:0:4}
chunk_end_year=${chunk_end_date:0:4}

if [ "${chunk_start_year}" != "${chunk_end_year}" ]; then
echo "ERROR: chunk ends in the different year than it starts"
echo "ERROR: chunk ends in a different year (${chunk_start_date}) than it starts (${chunk_end_date})"
exit 1
fi

Expand All @@ -141,6 +141,11 @@ export control_year=${control_year:-2020} # use 1850 for picontrol
ssp="370"
initialiseOcean="fromClimatology" # ocean is setup from climatology, atmosphere + hdext cold-started from scratch

# Archiving
# ---------
export ARCHIVE=${ARCHIVE:-"fasle"}
export ARCHIVE_DIR=${ARCHIVE_DIR:-"/capstor/store1/cscs/userlab/cwp07/${USER}/${EXPNAME}"}

# namelist files
# --------------
atm_model_name="atmo"
Expand Down Expand Up @@ -277,6 +282,9 @@ if [ "${activate_output}" == "true" ]; then
done
fi

# Check that file intervals are not greater than the restart interval
[ "${ARCHIVE}" == "true" ] && check_file_interval "${atm_namelist}" "${oce_namelist}" "${restart_interval}" || exit

# ============================================================================
# Executables
ln -sf ${icon_cpu} icon_cpu
Expand All @@ -291,12 +299,18 @@ ldd ${icon_gpu}

# Run environment
# ---------------
deactivate # deactivate py_run_utils environment
# # which gets activated by `source ../run_utils/run_tools.sh`
set_environment

# MPI run
# -------
run_model

# Archive
# -------
archive_output

# Restart
# -------
restart_model
Loading