#!/bin/bash
pool_size=$1
pool_rank=$2

nlmdz=71
nxios=1
rm -f run_file
for (( c=0; c<$pool_size; c++ ))
do
  whole_ensemble_rank=$((${pool_size}*${pool_rank}+$c))
  echo "${nlmdz}-16 env OMP_NUM_THREADS=8 MEMBER=${whole_ensemble_rank} ./script_lmdz.x.ksh" >> run_file
done  
echo "${nxios}-2 env OMP_NUM_THREADS=1  ./script_xios.x.ksh" >> run_file

