#!/bin/bash ##### BASH: # - launch sanity check of the analyse for each member of the ensemble (after EnKF). # # 06/05/2024 A. Delhasse alison.delhasse@uclouvain.be # ######### #!/bin/bash #SBATCH -n 1 #SBATCH -t 00:10:00 #SBATCH -J post_perturbation #SBATCH -o log/slurm_sanity-%j.out #SBATCH -e log/slurm_sanity-%j.err #SBATCH --partition=debug # Partition sur laquelle lancer le travail ##SBATCH --exclusive # Ressources exclusives #SBATCH --account=limhr # Compte associƩ au travail #SBATCH --mem-per-cpu=64000 ### LOAD MODULES #module load Python/3.10.4-GCCcore-11.3.0 module --force purge module load EasyBuild/2023a module load netCDF-Fortran/4.6.1-gompi-2023a module load Perl-bundle-CPAN/5.36.1-GCCcore-12.3.0 module load ScaLAPACK/2.2.0-gompi-2023a-fb module load FFTW.MPI/3.3.10-gompi-2023a set -x for mem in `seq 1 5`; do mname=$(printf "%02d" $mem) ####------------#### ### CHECK INPUTS ### ####------------#### if [ ! -f analysis_ice_1${mname}.nc ] ; then echo "analysis_ice_1${mname}.nc MISSING" ; exit 1 fi if [ ! -f analysis_oce_1${mname}.nc ] ; then echo "analysis_oce_1${mname}.nc MISSING" ; exit 2 fi ####-------------#### ### LAUNCH SANITY ### ####-------------#### ./sanity_check analysis_ice_1${mname}.nc forecast_ice_1${mname}.nc analysis_oce_1${mname}.nc forecast_oce_1${mname}.nc [ $? -ne 0 ] && exit 3 ####---------------------#### ### CHECK AND MOVE OUPUTS ### ####---------------------#### if [ ! -f ice_out.nc ] ; then echo "ice_out.nc MISSING for mem${mname}" else mv ice_out.nc ice_out_1${mname}.nc cp ice_out_1${mname}.nc new_restart_ice_1${mname}.nc fi if [ ! -f oce_out.nc ] ; then echo "oce_out.nc MISSING for mem${mname}" else mv oce_out.nc oce_out_1${mname}.nc cp oce_out_1${mname}.nc new_restart_oce_1${mname}.nc fi echo " Sanity check ${mname} done" echo"" done #mem