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
916f0924
Commit
916f0924
authored
2 years ago
by
Nils Brüggemann
Browse files
Options
Downloads
Patches
Plain Diff
pyic_fig.py: Allow for atm pressure level data. Get vertical axes dimension from netcdf dimension.
parent
5edcf717
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
tools/pyic_fig.py
+7
-3
7 additions, 3 deletions
tools/pyic_fig.py
with
7 additions
and
3 deletions
tools/pyic_fig.py
+
7
−
3
View file @
916f0924
...
@@ -139,8 +139,6 @@ import sys
...
@@ -139,8 +139,6 @@ import sys
from
pathlib
import
Path
from
pathlib
import
Path
sys
.
path
.
append
(
f
'
{
Path
.
home
()
}
/pyicon/
'
)
sys
.
path
.
append
(
f
'
{
Path
.
home
()
}
/pyicon/
'
)
import
pyicon
as
pyic
import
pyicon
as
pyic
from
pathlib
import
Path
from
netCDF4
import
Dataset
print
(
'
Done modules.
'
)
print
(
'
Done modules.
'
)
arrange_axes
=
pyic
.
arrange_axes
arrange_axes
=
pyic
.
arrange_axes
...
@@ -240,6 +238,8 @@ elif 'lev' in data.dims:
...
@@ -240,6 +238,8 @@ elif 'lev' in data.dims:
depth_name
=
'
lev
'
depth_name
=
'
lev
'
elif
'
lev_2
'
in
data
.
dims
:
elif
'
lev_2
'
in
data
.
dims
:
depth_name
=
'
lev_2
'
depth_name
=
'
lev_2
'
elif
'
plev
'
in
data
.
dims
:
depth_name
=
'
plev
'
else
:
else
:
depth_name
=
'
none
'
depth_name
=
'
none
'
...
@@ -325,7 +325,11 @@ if (iopts.title_right=='auto') and ('time' in ds[var].dims):
...
@@ -325,7 +325,11 @@ if (iopts.title_right=='auto') and ('time' in ds[var].dims):
if
(
iopts
.
title_center
==
'
auto
'
):
if
(
iopts
.
title_center
==
'
auto
'
):
iopts
.
title_center
=
''
iopts
.
title_center
=
''
if
(
iopts
.
title_left
==
'
auto
'
)
and
(
depth_name
!=
'
none
'
):
if
(
iopts
.
title_left
==
'
auto
'
)
and
(
depth_name
!=
'
none
'
):
iopts
.
title_left
=
f
'
depth =
{
data
[
depth_name
].
data
:
.
1
f
}
m
'
try
:
depth_units
=
data
[
depth_name
].
units
except
:
depth_units
=
''
iopts
.
title_left
=
f
'
{
depth_name
}
=
{
data
[
depth_name
].
data
:
.
1
f
}
{
depth_units
}
'
elif
iopts
.
title_left
==
'
auto
'
:
elif
iopts
.
title_left
==
'
auto
'
:
iopts
.
title_left
=
''
iopts
.
title_left
=
''
...
...
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