Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
E
ERA5-ABL
Manage
Activity
Members
Labels
Plan
Issues
0
Issue boards
Milestones
Code
Merge requests
0
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Guillaume Samson
ERA5-ABL
Commits
3e0ae0d6
Commit
3e0ae0d6
authored
1 year ago
by
Guillaume S
Browse files
Options
Downloads
Patches
Plain Diff
remove debug prints
parent
6422d904
Branches
branch_4.2
Branches containing commit
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
subjob_mars.sh
+5
-4
5 additions, 4 deletions
subjob_mars.sh
with
5 additions
and
4 deletions
subjob_mars.sh
+
5
−
4
View file @
3e0ae0d6
#!/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
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment