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

remove debug prints

parent 6422d904
Branches branch_4.2
No related tags found
No related merge requests found
#!/bin/bash
set -xv
set +xv
date=${1}
......@@ -13,13 +13,13 @@ dir_out="/ec/res4/scratch/ar0s/ERA5/GRIB_N320/${ym}"; mkdir -p ${dir_out}
dir_req=$(dirname ${2}:-".")
file_req=$(basename ${2%*.req*})
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
# EDIT MARS REQ
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
echo "MARS REQUEST NOT FOUND !"
exit 1
......@@ -28,6 +28,7 @@ if [ ! -s ${dir_out}/${file_out} ]; then
# SUBMIT MARS REQUEST
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
sbatch ${w} --job-name=mars_${req_type}_${date} <<EOF
#!/bin/bash
#SBATCH --job-name=marsreq
......@@ -37,7 +38,7 @@ if [ ! -s ${dir_out}/${file_out} ]; then
set +xv
mars ${dir_req}/JOBS/${file_out}.req
mars ${dir_req}/JOBS/${file_req}_${date}.req
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