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
Aaron Spring
pyicon
Commits
307d05cc
Commit
307d05cc
authored
3 years ago
by
Nils Brüggemann
Browse files
Options
Downloads
Patches
Plain Diff
pyicon/pyicon_calc.py: Changed np.argmin() to ().argmin() to be compatible with xarray/dask.
parent
ae85c050
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
pyicon/pyicon_calc.py
+6
-1
6 additions, 1 deletion
pyicon/pyicon_calc.py
with
6 additions
and
1 deletion
pyicon/pyicon_calc.py
+
6
−
1
View file @
307d05cc
print
(
'
sys glob os
'
)
import
sys
import
glob
,
os
#import datetime
print
(
'
numpy
'
)
import
numpy
as
np
print
(
'
netcdf
'
)
from
netCDF4
import
Dataset
,
num2date
#from scipy import interpolate
#from scipy.spatial import cKDTree
print
(
'
ipdb
'
)
from
ipdb
import
set_trace
as
mybreak
#from .pyicon_tb import *
print
(
'
Done modules calc.
'
)
#def distance(p1, p2):
# """
...
...
@@ -368,7 +373,7 @@ def calc_bstr_vgrid(IcD, mass_flux_vint, lon_start=0., lat_start=90., verbose=Fa
next_vertex_list
=
[]
# --- start vertex
list_vertex_index
=
np
.
argmin
((
IcD
.
vlon
-
lon_start
)
**
2
+
(
IcD
.
vlat
-
lat_start
)
**
2
)
list_vertex_index
=
((
IcD
.
vlon
-
lon_start
)
**
2
+
(
IcD
.
vlat
-
lat_start
)
**
2
)
.
argmin
()
vertexIsAccounted_list
[
list_vertex_index
]
=
1.
next_vertex_list
.
append
(
list_vertex_index
)
...
...
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