Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
pyicon
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
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
Show more breadcrumbs
Nils Brüggemann
pyicon
Commits
d100c57c
Commit
d100c57c
authored
2 years ago
by
Nils Brüggemann
Browse files
Options
Downloads
Patches
Plain Diff
pyicon/pyicon_simulation.py: Added addSim option. Deactivated not working option.
parent
43cf09c7
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
pyicon/pyicon_simulation.py
+11
-7
11 additions, 7 deletions
pyicon/pyicon_simulation.py
with
11 additions
and
7 deletions
pyicon/pyicon_simulation.py
+
11
−
7
View file @
d100c57c
...
...
@@ -24,13 +24,13 @@ class Simulation(object):
self
.
DGridMapping
=
get_grid_uuid
()
path_grid
=
'
/work/mh0033/m300602/icon/grids/
'
if
self
.
fpath_tgrid
==
'
auto
'
:
print
(
'
\'
fpath
\'
needs to be specified: we get an error.
'
)
Dgrid
=
identify_grid
(
path_grid
,
fpath
)
self
.
fpath_tgrid
=
Dgrid
[
'
fpath_grid
'
]
if
self
.
fpath_fx
==
'
auto
'
:
print
(
'
\'
lev
\'
needs to be specified: we get an error.
'
)
self
.
fpath_fx
=
f
'
{
path_grid
}
/
{
gname
}
/
{
gname
}
_
{
lev
}
_fx.nc
'
#
if self.fpath_tgrid=='auto':
#
print('\'fpath\' needs to be specified: we get an error.')
#
Dgrid = identify_grid(path_grid, fpath)
#
self.fpath_tgrid = Dgrid['fpath_grid']
#
if self.fpath_fx=='auto':
#
print('\'lev\' needs to be specified: we get an error.')
#
self.fpath_fx = f'{path_grid}/{gname}/{gname}_{lev}_fx.nc'
return
def
_get_info_str
(
self
):
info
=
f
"""
{
self
.
run
}
:
...
...
@@ -134,6 +134,10 @@ class SimulationList(object):
self
.
dict
[
S
.
run
]
=
S
except
:
print
(
"
::: Warning: Could not add {S.run} to SimulationList.dict! :::
"
)
def
addSim
(
self
,
*
args
,
**
kwargs
):
S
=
Simulation
(
*
args
,
**
kwargs
)
self
.
add
(
S
)
return
def
__iter__
(
self
):
return
SimulationIterator
(
self
)
def
__getitem__
(
self
,
item
):
...
...
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