Created
November 30, 2023 21:02
-
-
Save cfbastarz/5c88bc3975b388a4b148ff7be65496d4 to your computer and use it in GitHub Desktop.
Script de submissão para processo recanl do oensMB09 na egeon
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#! /bin/bash -x | |
#SBATCH --output=/mnt/beegfs/carlos.bastarz/oensMB09/recanl/output/setrecanlANLSMT.TQ0126L042.2020090100.Linux.23112411:33.out | |
#SBATCH --error=/mnt/beegfs/carlos.bastarz/oensMB09/recanl/output/setrecanlANLSMT.TQ0126L042.2020090100.Linux.23112411:33.err | |
#SBATCH --time=00:30:00 | |
#SBATCH --tasks-per-node=1 | |
#SBATCH --nodes=1 | |
#SBATCH --job-name=RECANL | |
#SBATCH --partition=PESQ1 | |
export PBS_SERVER=headnode | |
cd /mnt/beegfs/carlos.bastarz/oensMB09/run | |
. /mnt/beegfs/carlos.bastarz/oensMB09/run/EnvironmentalVariablesMCGA TQ0126L042 SMT | |
# | |
# Set date (year,month,day) and hour (hour:minute) | |
# | |
# DATE=yyyymmdd | |
# HOUR=hh:mn | |
# | |
export DATE=$(date +'%Y')$(date +'%m')$(date +'%d') | |
export HOUR=$(date +'%H:%M') | |
echo "Date: "${DATE} | |
echo "Hour: "${HOUR} | |
# | |
# LABELI = yyyymmddhh | |
# LABELI = input file start label | |
# | |
export LABELI=2020090100 | |
# | |
# Prefix names for the FORTRAN files | |
# | |
# NAMEL - List file name prefix | |
# NAMES - Input spectral file name prefix | |
# NAMER - Output gridded file name prefix | |
# | |
# Suffix names for the FORTRAN files | |
# | |
# EXTL - List file name suffix | |
# ERSi - Input spectral file name suffix | |
# ERRi - Output gridded file name suffix | |
# | |
export NAMEL=GANLSMT | |
export NAMES=GANLSMT | |
export NAMER=GANLSMT | |
if [ ANLSMT == ANLAVN -o ANLSMT == ANLNMC -o ANLSMT == ANLSMT -o ANLSMT == ANLEIT -o ANLSMT == ANLEIH ] | |
then | |
export EXTL=S.unf | |
export ERS1=S.unf | |
export ERR1=R.unf | |
else | |
export EXTL=F.ens | |
export ERS1=F.ens | |
export ERR1=R.ens | |
fi | |
# | |
# Set directories | |
# | |
# OPERMOD is the directory for sources, scripts and | |
# printouts files. | |
# DK_suite is the directory for input and output data | |
# and bin files. | |
# ROPERMOD is the directory for big selected output files. | |
# IOPERMOD is the directory for input file. | |
# | |
cd /mnt/beegfs/carlos.bastarz/oensMB09/run | |
# | |
# Now, build the necessary NAMELIST input: | |
# | |
export GNAMEL=${NAMEL}2020090100${EXTL}.TQ0126L042 | |
echo /mnt/beegfs/carlos.bastarz/oensMB09/recanl/datain/${GNAMEL} | |
cat <<EOT2 > /mnt/beegfs/carlos.bastarz/oensMB09/recanl/datain/${GNAMEL} | |
${NAMES}2020090100${ERS1}.TQ0126L042 | |
${NAMER}2020090100${ERR1}.TQ0126L042 | |
EOT2 | |
mkdir -p /mnt/beegfs/carlos.bastarz/oensMB09/recanl/datain | |
cat <<EOT3 > /mnt/beegfs/carlos.bastarz/oensMB09/recanl/datain/recanlANLSMT.nml | |
&DATAIN | |
LDIM=1 | |
DIRL='/mnt/beegfs/carlos.bastarz/oensMB09/recanl/datain/ ' | |
DIRS='/mnt/beegfs/carlos.bastarz/oensMB09/model/datain/ ' | |
DIRR='/mnt/beegfs/carlos.bastarz/oensMB09/recanl/dataout/TQ0126L042/ ' | |
GNAMEL='${GNAMEL} ' | |
&END | |
EOT3 | |
mkdir -p /mnt/beegfs/carlos.bastarz/oensMB09/recanl/dataout/TQ0126L042/ | |
cd /mnt/beegfs/carlos.bastarz/oensMB09/run | |
# | |
# Run recomposition | |
# | |
echo 'Running recomposition...' | |
# | |
# Set directories | |
# | |
export recanl_dir=/mnt/beegfs/carlos.bastarz/oensMB09/recanl | |
export source=${recanl_dir}/source | |
export bin=${recanl_dir}/bin/TQ0126L042; mkdir -p ${bin} | |
export input=${recanl_dir}/datain; mkdir -p ${input} | |
export out=${recanl_dir}/output; mkdir -p ${out} | |
cd ${bin} | |
module load singularity ; singularity exec -e --bind /mnt/beegfs/carlos.bastarz:/mnt/beegfs/carlos.bastarz /mnt/beegfs/carlos.bastarz/containers/oensMB09_BAM_V1.2.1_TQ0126L042_Env_XC50-Ubuntu-18.04_gcc-4.8.5_mpich-3.3_cmake-3.25.2_new-libs.sif mpirun -np 1 /opt/oensMB09-3-testes-com-o-compilador-intel/recanl/bin/TQ0126L042/recanl.TQ0126L042 < ${input}/recanlANLSMT.nml > ${out}/recanl.out.2020090100.${HOUR}.TQ0126L042 | |
touch /mnt/beegfs/carlos.bastarz/oensMB09/recanl/output/monitor.t |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment