Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
G
gotm_ismer
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
2
Issues
2
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
Operations
Operations
Incidents
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Dany Dumont
gotm_ismer
Commits
11b18235
Commit
11b18235
authored
Apr 27, 2017
by
Dany Dumont
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Ajout de run_enp.sh comme exemple de script batch
parent
5652bb2b
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
108 additions
and
0 deletions
+108
-0
scripts/shell/run_enp.sh
scripts/shell/run_enp.sh
+108
-0
No files found.
scripts/shell/run_enp.sh
0 → 100755
View file @
11b18235
#!/bin/bash
export
EXPDIR
=
$(
pwd
)
echo
$EXPDIR
if
[
$#
-ne
1
]
then
echo
""
echo
"Usage:
$0
<exp>"
echo
""
echo
" <exp> should be one of the following:"
echo
" 0910_E1 "
echo
" 0910_E2 "
echo
" 1011_E1 "
echo
" 1011_E2 "
exit
fi
exp
=
$1
echo
" Linking entry parameters and files for
$exp
"
rm
-f
*
.dat
rm
-f
gotmrun.mal
rm
-f
obs.nml
rm
-f
airsea.mal
ln
-sf
$exp
/enp/
*
.mal
.
ln
-sf
$exp
/
*
.nml
.
ln
-sf
$exp
/
*
.dat
.
ln
-sf
enp_files/
*
.dat
.
if
[
!
airsea.mal
]
||
[
!
gotmrun.mal
]
then
echo
" ERROR : .mal files missing"
exit
else
echo
"-----------------------------------------------------"
echo
" run_enp.sh"
echo
"-----------------------------------------------------"
# Parameters for the forcings
count
=
1
for
file
in
ecmwf_meteo_
*
.dat
do
count
=
`
expr
000
$count
|
tail
-4c
`
#count=`expr 000$count | tail -8c`
echo
$count
if
[
-f
airsea.nml
]
then
rm
-f
airsea.nml
fi
cat
airsea.mal |
sed
\
-e
"s/meteofile/ecmwf_meteo_
$count
.dat/g"
\
>
airsea.nml
if
[
-f
airsea.nml
]
then
echo
" airsea.nml created"
fi
if
[
-f
gotmrun.nml
]
then
rm
-f
gotmrun.nml
fi
cat
gotmrun.mal |
sed
\
-e
"s/experiment_name/
$count
/g"
\
>
gotmrun.nml
if
[
-f
gotmrun.nml
]
then
echo
" gotmrun.nml created"
fi
strt
=
`
date
+%H:%M:%S
`
echo
" runnning with "
$file
echo
" started at "
$strt
./gotm_prod_IFORT
>
&
$count
.out
end
=
`
date
+%H:%M:%S
`
echo
" ended at "
$end
mv
$count
.nc
$exp
/enp
mv
$count
.out
$exp
/enp/
mv
${
count
}
_fasham.par
$exp
/enp/
count
=
`
expr
$count
+ 1
`
# Uncoment for debugging
if
[
`
expr
$count
`
==
4
]
then
echo
" Exiting"
exit
fi
done
fi
exit
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment