Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
Fesom Mesh Generation
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
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD 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
This is an archived project. Repository and other project resources are read-only.
Show more breadcrumbs
Paleoclimate Dynamics
Utilities
Fesom Mesh Generation
Commits
3a188412
Commit
3a188412
authored
4 years ago
by
udubey
Browse files
Options
Downloads
Patches
Plain Diff
allow fixing for gateways before Triangle runs from a input file
parent
90c6b3bf
No related branches found
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
FESOM2_Mesh_Generation_{{cookiecutter.mesh_name}}/run_all.py
+29
-0
29 additions, 0 deletions
FESOM2_Mesh_Generation_{{cookiecutter.mesh_name}}/run_all.py
with
29 additions
and
0 deletions
FESOM2_Mesh_Generation_{{cookiecutter.mesh_name}}/run_all.py
+
29
−
0
View file @
3a188412
...
...
@@ -5,6 +5,8 @@ Bootstrap script to create a new mesh based on the CORE 2 Resolution.
Dr. Paul Gierz, Jan 2020
"""
import
cdo
import
yaml
import
os
import
shutil
...
...
@@ -18,6 +20,33 @@ if __name__ == "__main__":
if
not
os
.
path
.
exists
(
"
./raw_input_data
"
):
os
.
makedirs
(
"
./raw_input_data
"
)
shutil
.
copyfile
(
"
{{cookiecutter.input_fpath}}
"
,
"
./raw_input_data/{{cookiecutter.input_fname}}
"
)
shutil
.
copyfile
(
"
{{cookiecutter.input_fpath}}
"
,
"
./raw_input_data/{{cookiecutter.input_fname}}_backup
"
)
if
os
.
path
.
exists
(
"
fixup_gateways.yaml
"
):
with
open
(
"
fixup_gateways.yaml
"
,
"
r
"
)
as
gateway_fixes_file
:
gateway_fixes
=
yaml
.
load
(
gateway_fixes_file
)
if
gateway_fixes
:
CDO
=
cdo
.
Cdo
()
print
(
"
Fixup input data:
"
)
for
gateway_name
,
fix_list
in
gateway_fixes
.
items
():
print
(
gateway_name
)
print
(
fix_list
)
for
fix_number
,
fix
in
enumerate
(
fix_list
):
print
(
f
"
*
{
fix_number
}
:
"
)
fix
=
[
int
(
item
)
for
item
in
fix
.
split
(
"
,
"
)]
x1
=
fix
[
0
]
x2
=
fix
[
1
]
y1
=
fix
[
2
]
y2
=
fix
[
3
]
value
=
fix
[
4
]
print
(
"
* Setting:
"
)
# FIXME:
print
(
f
"
{
y2
}
------
{
x2
}
"
)
print
(
f
"
| |
"
)
print
(
f
"
|
{
value
}
|
"
)
print
(
f
"
| |
"
)
print
(
f
"
{
x1
}
------
{
y1
}
"
)
output
=
CDO
.
setcindexbox
(
f
"
{
value
}
,
{
x1
}
,
{
x2
}
,
{
y1
}
,
{
y2
}
"
,
input
=
"
./raw_input_data/{{cookiecutter.input_fname}}
"
)
os
.
rename
(
output
,
"
./raw_input_data/{{cookiecutter.input_fname}}
"
)
print
(
40
*
"
-
"
)
print
(
"
* MATLAB Part:
"
)
os
.
system
(
"
matlab.sh -s -S
\"
--mem=36000
\"
-M
\"
-nodisplay -r run(
'
mg_topo_prep_triangle_input.m
'
)
\"
"
)
...
...
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