Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
climix
climix
Commits
d7254e02
Commit
d7254e02
authored
Oct 19, 2020
by
Klaus Zimmermann
Browse files
Detect tty for non-interactive logging output (closes #185)
parent
caf15b62
Changes
5
Hide whitespace changes
Inline
Side-by-side
.gitignore
View file @
d7254e02
...
...
@@ -11,3 +11,5 @@ data
dask-worker-space
dist
docs/build
slurm/
climix/aggregators.py
View file @
d7254e02
...
...
@@ -4,9 +4,9 @@ import logging
import
time
import
dask.array
as
da
from
dask.distributed
import
progress
from
iris.analysis
import
Aggregator
from
.dask_setup
import
progress
from
.util
import
change_units
...
...
climix/dask_setup.py
View file @
d7254e02
# -*- coding: utf-8 -*-
from
collections
import
OrderedDict
import
sys
import
dask
from
dask.distributed
import
Client
,
LocalCluster
from
dask.distributed
import
Client
,
LocalCluster
,
wait
,
system
from
dask.distributed
import
progress
as
distributed_progress
# from dask_jobqueue import SLURMCluster
def
progress
(
fs
):
if
sys
.
stdout
.
isatty
():
return
distributed_progress
(
fs
)
else
:
wait
(
fs
)
return
fs
class
DistributedLocalClusterScheduler
:
def
__init__
(
self
):
self
.
cluster
=
LocalCluster
()
...
...
climix/datahandling.py
View file @
d7254e02
...
...
@@ -3,12 +3,13 @@
import
logging
import
time
from
dask.distributed
import
progress
import
iris
from
iris.experimental.equalise_cubes
import
equalise_attributes
import
netCDF4
import
numpy
as
np
from
.dask_setup
import
progress
MISSVAL
=
1.0e20
...
...
climix/index_functions/percentile_functions.py
View file @
d7254e02
...
...
@@ -2,11 +2,11 @@ import logging
import
cftime
import
dask.array
as
da
from
dask.distributed
import
progress
import
numpy
as
np
from
.support
import
IndexFunction
,
parse_timerange
from
..dask_setup
import
progress
from
..dask_take_along_axis
import
dask_take_along_axis
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment