#!/bin/bash
#SBATCH --partition=cluster
#SBATCH --job-name=r1000
#SBATCH --nodes=1
#SBATCH --tasks-per-node=1
#SBATCH --cpus-per-task=1
#SBATCH --mem=1000
#SBATCH --qos=long
#SBATCH --time=30:00:00
#SBATCH --output=UVic_ramp1000.out
#SBATCH --error=UVic_ramp1000.err
#SBATCH --export=NONE
#SBATCH --mail-user=wkoeve@geomar.de
#SBATCH --mail-type=ALL

export OMP_NUM_THREADS=1
 
echo $SLURM_JOBID
module load intel/20.0.4
module load netcdf-fortran-intel/4.5.3 
module load hdf5-intel/1.12.0
module load netcdf-c-intel/4.7.4

# test, 27.01.22, nach Änderung System; geht auch nicht
#module load intel
#module load netcdf-fortran-intel
#module load hdf5-intel
#module load netcdf-c-intel


set -e

# prep
cp -p control.ramp1000.in control.in
cp -p data/restart_rampStabi.nc data/restart.nc

echo Integration started: >> timer
date >> timer
./UVic_rampUp  > logfile_ramp1000.log
echo Integration completed: >> timer
date >> timer

# post
cp -p data/restart.nc data/restart_ramp1000.nc

# obtain a summary of resources that have been consumed by your batch calculation
jobinfo

exit
