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
Package registry
Container Registry
Model registry
Operate
Environments
Terraform modules
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
Quan Liu
pyicon
Commits
466ff331
Commit
466ff331
authored
2 years ago
by
Nils Brüggemann
Browse files
Options
Downloads
Patches
Plain Diff
pyic_fig.py: Allow to path the fpath_ckdtree as argument.
parent
f365668a
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
+9
-1
9 additions, 1 deletion
tools/pyic_fig.py
with
9 additions
and
1 deletion
tools/pyic_fig.py
+
9
−
1
View file @
466ff331
...
...
@@ -67,6 +67,8 @@ parser.add_argument('--res', type=float, default=0.3,
help
=
'
Resolution of the interpolated data which will be plotted. So far, 1.0, 0.3, 0.1 are supported.
'
)
parser
.
add_argument
(
'
--fpath_tgrid
'
,
type
=
str
,
default
=
'
auto
'
,
help
=
'
Path to triangular grid file. If
\'
auto
\'
the path is guessed automatically. Only necessary if
\'
--use_tgrid
\'
is used.
'
)
parser
.
add_argument
(
'
--fpath_ckdtree
'
,
type
=
str
,
default
=
'
auto
'
,
help
=
'
Path to ckdtree interpolation file. If
\'
auto
\'
the path is guessed automatically.
'
)
parser
.
add_argument
(
'
--lon_reg
'
,
type
=
str
,
default
=
None
,
help
=
'
Longitude range of the plot.
'
)
parser
.
add_argument
(
'
--lat_reg
'
,
type
=
str
,
default
=
None
,
...
...
@@ -120,6 +122,7 @@ clim = iopts.clim
fpath_fig
=
iopts
.
fpath_fig
use_tgrid
=
iopts
.
use_tgrid
fpath_tgrid
=
iopts
.
fpath_tgrid
fpath_ckdtree
=
iopts
.
fpath_ckdtree
print
(
'
start modules
'
)
import
matplotlib
...
...
@@ -210,7 +213,8 @@ if fpath_tgrid=='auto':
except
:
fpath_tgrid
=
'
from_file
'
#fpath_ckdtree = f'{path_grid}/{gname}/ckdtree/rectgrids/{gname}_res{res:3.2f}_180W-180E_90S-90N.npz'
fpath_ckdtree
=
f
'
{
path_grid
}
/
{
gname
}
/ckdtree/rectgrids/
{
gname
}
_res
{
res
:
3.2
f
}
_180W-180E_90S-90N.nc
'
if
fpath_ckdtree
==
'
auto
'
:
fpath_ckdtree
=
f
'
{
path_grid
}
/
{
gname
}
/ckdtree/rectgrids/
{
gname
}
_res
{
res
:
3.2
f
}
_180W-180E_90S-90N.nc
'
# --- open dataset
mfdset_kwargs
=
dict
(
combine
=
'
nested
'
,
concat_dim
=
'
time
'
,
...
...
@@ -224,6 +228,10 @@ if 'depth' in data.dims:
depth_name
=
'
depth
'
elif
'
depth_2
'
in
data
.
dims
:
depth_name
=
'
depth_2
'
elif
'
lev
'
in
data
.
dims
:
depth_name
=
'
lev
'
elif
'
lev_2
'
in
data
.
dims
:
depth_name
=
'
lev_2
'
else
:
depth_name
=
'
none
'
...
...
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