Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
P
PLUM
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Deploy
Releases
Container Registry
Model registry
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Land Use Lab
PLUM
Commits
0ea6ba92
Commit
0ea6ba92
authored
3 years ago
by
ALEXANDER Peter
Browse files
Options
Downloads
Patches
Plain Diff
Change to create scenario to specific common properties file on command line
parent
6e88fe9b
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
scripts/createScenarios.sh
+35
-8
35 additions, 8 deletions
scripts/createScenarios.sh
with
35 additions
and
8 deletions
scripts/createScenarios.sh
+
35
−
8
View file @
0ea6ba92
...
...
@@ -7,18 +7,45 @@
common_prop_file
=
/exports/csce/eddie/geos/groups/LURG/models/PLUM/output/common_properties
output_dir
=
/exports/csce/eddie/geos/groups/LURG/models/PLUM/output
filename
=
"/exports/csce/eddie/geos/groups/LURG/models/PLUM/
$1
"
overwrite
=
0
if
[[
$*
==
*
-O
*
]]
;
then
overwrite
=
1
else
overwrite
=
0
for
arg
in
"
$@
"
do
case
$arg
in
-O
|
-o
)
overwrite
=
1
shift
# Remove argument name from processing
;;
-C
|
-c
)
common_prop_file
=
"
$2
"
shift
# Remove argument name from processing
shift
# Remove argument value from processing
;;
*
)
[[
!
-z
$1
]]
&&
file
=
"
$1
"
shift
# Remove argument value from processing
;;
esac
done
echo
scenariofile
=
$file
,
common_prop_file
=
$common_prop_file
,
overwrite
=
$overwrite
echo
# not keen on the way this directory is fixed but for backward compatiblity will not change it
filename
=
"/exports/csce/eddie/geos/groups/LURG/models/PLUM/
$file
"
if
[
!
-f
"
$filename
"
]
;
then
echo
"File for scenario data
$filename
does not exist."
echo
"Need to specify scenario table file correctly. Stopping!"
exit
-1
fi
if
[
"$#"
-lt
1
]
;
then
echo
"Need to specify scenario table file"
exit
if
[
!
-f
"
$common_prop_file
"
]
;
then
echo
"Common properties file
$common_prop_file
does not exist."
echo
"Need to specify with -c or use default. Stopping!"
exit
-1
fi
echo
"Generating scenarios into
$output_dir
"
while
read
-r
datarow
...
...
@@ -84,4 +111,4 @@ if [[ $* == *-s* ]]; then
R < /exports/csce/eddie/geos/groups/LURG/models/PLUM/plumv2/scripts/createShockFiles.R
--no-save
--args
$1
$endYear
else
echo
"Not running R shock script"
fi
\ No newline at end of file
fi
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