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
e837f890
Commit
e837f890
authored
2 months ago
by
Nils Brüggemann
Browse files
Options
Downloads
Patches
Plain Diff
pyic_view: Some changes to allow to use healpix data.
parent
510819da
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Pipeline
#99117
passed
2 months ago
Stage: test
Stage: deploy
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
scripts/pyic_view.py
+6
-5
6 additions, 5 deletions
scripts/pyic_view.py
with
6 additions
and
5 deletions
scripts/pyic_view.py
+
6
−
5
View file @
e837f890
...
...
@@ -85,7 +85,7 @@ def get_fpath_ckdtree(data, res, path_grid, gname='auto', fpath_tgrid='auto'):
return
fpath_ckdtree
def
get_data
(
ds
,
var_name
,
it
,
iz
,
fpath_ckdt
re
e
,
lon_reg
,
lat_reg
):
def
get_data
(
ds
,
var_name
,
it
,
iz
,
re
s
,
lon_reg
,
lat_reg
):
isel_dict
=
dict
(
time
=
it
)
if
ds
[
var_name
].
ndim
==
3
:
depth_name
=
pyic
.
identify_depth_name
(
ds
[
var_name
])
...
...
@@ -95,7 +95,7 @@ def get_data(ds, var_name, it, iz, fpath_ckdtree, lon_reg, lat_reg):
#else:
# raise ValueError(f"::: Unknown number of dimensions for {var_name}: {ds[var_name].shape}")
dai
=
pyic
.
interp_to_rectgrid_xr
(
ds
[
var_name
].
isel
(
**
isel_dict
),
fpath_ckdtree
,
ds
[
var_name
].
isel
(
**
isel_dict
),
res
=
res
,
lon_reg
=
lon_reg
,
lat_reg
=
lat_reg
,
)
dai
.
attrs
[
"
depth_name
"
]
=
depth_name
...
...
@@ -307,7 +307,8 @@ class view(object):
"
clon_bnds
"
,
"
clat_bnds
"
,
"
elon_bnds
"
,
"
elat_bnds
"
,
"
vlon_bnds
"
,
"
vlat_bnds
"
,
"
clon
"
,
"
clat
"
,
"
elon
"
,
"
elat
"
,
"
lev
"
"
lev
"
,
"
healpix
"
,
]
for
var
in
delvars
:
try
:
...
...
@@ -325,7 +326,7 @@ class view(object):
self
.
fpath_ckdtree
=
get_fpath_ckdtree
(
self
.
ds
,
self
.
res
,
self
.
path_grid
)
self
.
dai
=
get_data
(
self
.
ds
,
self
.
var_name
,
self
.
it
,
self
.
iz
,
self
.
fpath_ckdt
re
e
,
self
.
lon_reg
,
self
.
lat_reg
self
.
re
s
,
self
.
lon_reg
,
self
.
lat_reg
)
self
.
Lon
,
self
.
Lat
=
np
.
meshgrid
(
self
.
dai
.
lon
.
data
,
self
.
dai
.
lat
.
data
)
if
self
.
proj
==
"
None
"
:
...
...
@@ -422,7 +423,7 @@ class view(object):
self
.
update_lon_lat_reg
()
self
.
dai
=
get_data
(
self
.
ds
,
self
.
var_name
,
self
.
it
,
self
.
iz
,
self
.
fpath_ckdt
re
e
,
self
.
lon_reg
,
self
.
lat_reg
self
.
re
s
,
self
.
lon_reg
,
self
.
lat_reg
)
self
.
Lon
,
self
.
Lat
=
np
.
meshgrid
(
self
.
dai
.
lon
,
self
.
dai
.
lat
)
self
.
hm
[
0
].
set_array
(
self
.
dai
.
data
.
flatten
())
...
...
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