Skip to content
Snippets Groups Projects
Commit 3e0ae0d6 authored by Guillaume S's avatar Guillaume S
Browse files

remove debug prints

parent 6422d904
No related branches found
No related tags found
No related merge requests found
#!/bin/bash #!/bin/bash
set -xv set +xv
date=${1} date=${1}
...@@ -13,13 +13,13 @@ dir_out="/ec/res4/scratch/ar0s/ERA5/GRIB_N320/${ym}"; mkdir -p ${dir_out} ...@@ -13,13 +13,13 @@ dir_out="/ec/res4/scratch/ar0s/ERA5/GRIB_N320/${ym}"; mkdir -p ${dir_out}
dir_req=$(dirname ${2}:-".") dir_req=$(dirname ${2}:-".")
file_req=$(basename ${2%*.req*}) file_req=$(basename ${2%*.req*})
req_type=${file_req/mars_} ; req_type=${req_type%%_*} req_type=${file_req/mars_} ; req_type=${req_type%%_*}
file_out="${req_type%%_*}_ERA5_L*_GLO_TLAUTO_IGNONE_GN320_ana01h_${date}.grib" file_out="${req_type}_ERA5_L*_GLO_TLAUTO_IGNONE_GN320_ana01h_${date}.grib"
if [ ! -s ${dir_out}/${file_out} ]; then if [ ! -s ${dir_out}/${file_out} ]; then
# EDIT MARS REQ # EDIT MARS REQ
if [ -f ${dir_req}/${file_req}.req.base ]; then if [ -f ${dir_req}/${file_req}.req.base ]; then
sed -e "s~date_req~${date}~g; s~dir_out~${dir_out}~g" < ${dir_req}/${file_req}.req.base > ${dir_req}/JOBS/${file_out}.req sed -e "s~date_req~${date}~g; s~dir_out~${dir_out}~g" < ${dir_req}/${file_req}.req.base > ${dir_req}/JOBS/${file_req}_${date}.req
else else
echo "MARS REQUEST NOT FOUND !" echo "MARS REQUEST NOT FOUND !"
exit 1 exit 1
...@@ -28,6 +28,7 @@ if [ ! -s ${dir_out}/${file_out} ]; then ...@@ -28,6 +28,7 @@ if [ ! -s ${dir_out}/${file_out} ]; then
# SUBMIT MARS REQUEST # SUBMIT MARS REQUEST
while [ $(squeue -u $USER -h -t pending,running -r | wc -l) -eq 100 ]; do echo "sleeping..."; sleep 10; done while [ $(squeue -u $USER -h -t pending,running -r | wc -l) -eq 100 ]; do echo "sleeping..."; sleep 10; done
if [ ${date} -eq ${date_end} ]; then echo "waiting..."; w="--wait"; fi if [ ${date} -eq ${date_end} ]; then echo "waiting..."; w="--wait"; fi
sbatch ${w} --job-name=mars_${req_type}_${date} <<EOF sbatch ${w} --job-name=mars_${req_type}_${date} <<EOF
#!/bin/bash #!/bin/bash
#SBATCH --job-name=marsreq #SBATCH --job-name=marsreq
...@@ -37,7 +38,7 @@ if [ ! -s ${dir_out}/${file_out} ]; then ...@@ -37,7 +38,7 @@ if [ ! -s ${dir_out}/${file_out} ]; then
set +xv set +xv
mars ${dir_req}/JOBS/${file_out}.req mars ${dir_req}/JOBS/${file_req}_${date}.req
exit 0 exit 0
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment