Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
W
workflows
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Lluis Fita Borrell
workflows
Commits
bc2a37f2
Commit
bc2a37f2
authored
5 months ago
by
Lluis Fita Borrell
Browse files
Options
Downloads
Patches
Plain Diff
Introducing the use of the WRF4L structure
parent
df051664
Branches
Branches containing commit
No related tags found
No related merge requests found
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
direct/WRF/hydra/launch_real_intel.pbs
+10
-3
10 additions, 3 deletions
direct/WRF/hydra/launch_real_intel.pbs
direct/WRF/hydra/launch_wrf_intel.pbs
+32
-16
32 additions, 16 deletions
direct/WRF/hydra/launch_wrf_intel.pbs
with
42 additions
and
19 deletions
direct/WRF/hydra/launch_real_intel.pbs
+
10
−
3
View file @
bc2a37f2
...
...
@@ -41,6 +41,12 @@ mainn='launch_real_intel.bash'
#######
errormsg
=
"ERROR -- error -- ERROR -- error"
## hdyra
wrf4lHOME
=
/home/lluis.fita/estudios/workflows/direct/WRF/hydra
shHOME
=
${
wrf4lHOME
}
/../../../components/bats
pyHOME
=
${
wrf4lHOME
}
/../../../components/python3
echo
$(
basename
$BASH_SOURCE
)
echo
" input folder: "
${
idir
}
echo
" output folder: "
${
odir
}
...
...
@@ -115,7 +121,7 @@ if test ! -f ${lastwrfbdy}; then
echo "
output folder:
"
${
odir
}
mv rsl.*
${
odir
}
cp namelist.input
${
odir
}
exit
exit
-1
fi
mv wrf*d*
${
odir
}
...
...
@@ -124,10 +130,11 @@ mv wrf*d* ${odir}
rsls='error out'
for rsln in
${
rsls
}
; do
rm rsl.
${
rsln
}
.tar >& /dev/null
tar cvf rsl.
${
rsln
}
.tar rsl.
${
rsln
}
.
*
if test
$?
-eq 0; then rm -f rsl.
${
rsln
}
.
*
; fi
tar cvf rsl.
${
rsln
}
.tar rsl.
${
rsln
}
.
????
if test
$?
-eq 0; then rm -f rsl.
${
rsln
}
.
????
; fi
done
mv rsl.*.tar
${
odir
}
cp namelist.input
${
odir
}
cp namelist.output
${
odir
}
mv
${
olog
}
${
odir
}
...
...
This diff is collapsed.
Click to expand it.
direct/WRF/hydra/launch_wrf_intel.pbs
+
32
−
16
View file @
bc2a37f2
...
...
@@ -35,10 +35,17 @@ odir=/media/lluis/ExtDiskF_ext4/DATA/EXPS/Fastest/rlpg_cdxwrf2/run/outwrf
# Wether outpuit directory should be cleaned before moving outputs
clean
=
true
mainn
=
'launch_wrf_intel.bash'
####### #######
## MAIN
#######
errormsg
=
'ERROR -- error -- ERROR -- error'
errormsg
=
"ERROR -- error -- ERROR -- error"
## hdyra
wrf4lHOME
=
/home/lluis.fita/estudios/workflows/direct/WRF/hydra
shHOME
=
${
wrf4lHOME
}
/../../../components/bats
pyHOME
=
${
wrf4lHOME
}
/../../../components/python3
echo
$(
basename
$BASH_SOURCE
)
echo
" input folder: "
${
idir
}
...
...
@@ -53,15 +60,15 @@ cd $PBS_O_WORKDIR
#ulimit -s unlimited
echo
$(
basename
$BASH_SOURCE
)
echo
" input folder: "
${
idir
}
echo
" output folder: "
${
odir
}
execn
=
'wrf'
olog
=
run_
${
execn
}
.log
mkdir
-p
${
odir
}
if
${
clean
}
;
then
rm
wrf
*
d
*
rm
rsl.
*
rm
${
odir
}
/
*
rm
${
olog
}
rm
rsl.
*
rm
${
PBS_JOBNAME
}
.o
*
fi
...
...
@@ -74,11 +81,20 @@ if test $? -ne 0; then
fi
echo
"Period of simulation: "
${
period
}
Ndom
=
`
${
shHOME
}
/namelist_value.bash namelist.input max_dom
`
if
test
$?
-ne
0
;
then
echo
${
errormsg
}
echo
"Script failed !!"
echo
${
shHOME
}
/namelist_value.bash namelist.input max_dom
exit
-1
fi
NdomS
=
`
printf
"%02d"
${
Ndom
}
`
startdate
=
`
echo
${
period
}
|
tr
'-'
' '
|
awk
'{print $1}'
`
startdateWRF
=
`
${
shHOME
}
/dates_transform.bash
${
startdate
}
YmdH WRFdate
`
startdateS
=
`
${
shHOME
}
/dates_transform.bash
${
startdate
}
YmdH YmdHMS
`
firstrst
=
wrfrst_d
01
_
${
startdateWRF
}
firstrst
=
wrfrst_d
${
NdomS
}
_
${
startdateWRF
}
irst
=
wrfrst_
${
startdateS
}
.tar
isrestart
=
`
${
shHOME
}
/namelist_value.bash namelist.input restart
`
if
test
$?
-ne
0
;
then
...
...
@@ -107,7 +123,7 @@ enddate=`echo ${period} | tr '-' ' ' | awk '{print $2}'`
enddateWRF
=
`
${
shHOME
}
/dates_transform.bash
${
enddate
}
YmdH WRFdate
`
enddateS
=
`
${
shHOME
}
/dates_transform.bash
${
enddate
}
YmdH YmdHMS
`
lastrst
=
wrfrst_d
01
_
${
enddateWRF
}
lastrst
=
wrfrst_d
${
NdomS
}
_
${
enddateWRF
}
if
test
-f
${
odir
}
/
${
lastrst
}
;
then
echo
${
errormsg
}
echo
" Last restart file named '"
${
odir
}
/
${
lastrst
}
"' exists !!"
...
...
@@ -118,13 +134,12 @@ fi
ln
-s
${
idir
}
/wrf
*
d
*
./
execn
=
'wrf'
ls
-la
${
execn
}
.exe
date
mpirun
-np
${
Nprocs
}
./
${
execn
}
.exe
>
&
run_
${
execn
}
.
log
mpirun
-np
${
Nprocs
}
./
${
execn
}
.exe
>
&
${
o
log
}
if
test
$?
-ne
0
;
then
echo
${
errormsg
}
echo
${
execn
}
".exe failed !!"
echo
" "
${
mainn
}
":
${
execn
}
"
.exe failed
!!
"
mv rsl*
${
odir
}
cp namelist.input
${
odir
}
exit -1
...
...
@@ -133,7 +148,6 @@ date
# Moving outputs
##
if test ! -f
${
lastrst
}
&& test ! -f
${
lastrst
}
_0000; then
echo
${
errormsg
}
echo "
Simulation failed
!!
"
...
...
@@ -148,6 +162,7 @@ mv wrfout*d* ${odir}
mv wrfxtrm*d*
${
odir
}
mv wrfpres*d*
${
odir
}
mv wrfcdx*d*
${
odir
}
mv wrfhfcdx*d*
${
odir
}
orst=wrfrst_
${
enddateS
}
.tar
tar cvf
${
orst
}
wrfrst_d*_
${
enddateWRF
}
*
if test
$?
-eq 0; then
...
...
@@ -159,16 +174,17 @@ fi
rsls='error out'
for rsln in
${
rsls
}
; do
rm rsl.
${
rsln
}
.tar >& /dev/null
tar
cvf rsl.
${
rsln
}
.tar rsl.
${
rsln
}
.
*
if
test
$?
-eq
0
;
then
rm
-f
rsl.
${
rsln
}
.
*
;
fi
tar cvf rsl.
${
rsln
}
.tar rsl.
${
rsln
}
.
????
if test
$?
-eq 0; then rm -f rsl.
${
rsln
}
.
????
; fi
done
mv rsl.*.tar
${
odir
}
mv
run_
${
execn
}
.log
${
odir
}
cp namelist.input
${
odir
}
cp namelist.output
${
odir
}
mv
${
olog
}
${
odir
}
cp launch_mpi-wrf.bash
${
odir
}
Ntsfiles
=
`
ls
-1
*
.d
01
.TS |
wc
-l
|
awk
'{print $1}'
`
Ntsfiles=
`
ls
-1
*
.d
${
NdomS
}
.TS |
wc
-l
|
awk
'{print $1}'
`
tsfiles=
`
ls
-1
*
.d
*
.TS
`
tsfiletypes='PH:QV:TS:VV:PR:TH:UU:WW'
if test
${
Ntsfiles
}
-ne 0; then
...
...
@@ -186,5 +202,5 @@ if test ${Ntsfiles} -ne 0; then
done
fi
echo
"
Success simulation !!"
echo
${
mainn
}
"
:
Success simulation
!!
"
echo "
All outputs are at
"
${
odir
}
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