#!/bin/bash

# Command options:
#SBATCH -J swop_20230304_27012_09_SD_AM_xC_negativeHWMwind
#SBATCH -o /dartfs-hpc/rc/lab/L/LynchK/public_html/Gemini3D/swop_20230304_27012_09_SD_AM_xC_negativeHWMwind/%j.log
#SBATCH -e /dartfs-hpc/rc/lab/L/LynchK/public_html/Gemini3D/swop_20230304_27012_09_SD_AM_xC_negativeHWMwind/%j.err
#SBATCH --mail-type=END,FAIL
#SBATCH --time=1200
#SBATCH --nodes=1
#SBATCH --ntasks-per-node=64
#SBATCH --cpus-per-task=1
#SBATCH -A physics
# CPU divisions:
# Number of cells = 425 x 288 x 384 = 47,001,600
# Number of CPUs = 64
# Number of cells per cpu = 1728
# Number of nodes in x2 = 1
# Number of nodes in x3 = 1
# Number of cells per node in x2 = 288
# Number of cells per node in x3 = 384
# Number of CPUs per node in x2 = 8
# Number of CPUs per node in x3 = 8
# Number of cells per CPU in x2 = 36
# Number of cells per CPU in x3 = 48

# Commands to run
export HWMPATH='/dartfs-hpc/rc/home/v/f007h9v/hwmgemini/gemini3d/hwm14/data'
cd /dartfs-hpc/rc/home/v/f007h9v/hwmgemini/gemini3d/build
mpiexec /dartfs-hpc/rc/home/v/f007h9v/hwmgemini/gemini3d/build/gemini.bin /dartfs-hpc/rc/lab/L/LynchK/public_html/Gemini3D/swop_20230304_27012_09_SD_AM_xC_negativeHWMwind;\
matlab -batch "\
addpath('/dartfs-hpc/rc/home/v/f007h9v/gemini_saturn/aurora_gemini/');\
addpath('/dartfs-hpc/rc/home/v/f007h9v/gemini_saturn/mat_gemini/');\
addpath('/dartfs-hpc/rc/home/v/f007h9v/gemini_saturn/mat_gemini-scripts/');\
addpath('/dartfs-hpc/rc/home/v/f007h9v/gemini_saturn/gemini3d/');\
aurogem.sim.process('/dartfs-hpc/rc/lab/L/LynchK/public_html/Gemini3D/swop_20230304_27012_09_SD_AM_xC_negativeHWMwind');\
exit\
"
