Skip to content

Commit

Permalink
Review changes.
Browse files Browse the repository at this point in the history
  • Loading branch information
pp-mo committed Jul 21, 2022
1 parent db2326b commit b68b234
Show file tree
Hide file tree
Showing 5 changed files with 15 additions and 13 deletions.
2 changes: 2 additions & 0 deletions lib/iris/experimental/ugrid/load.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@
Extensions to Iris' NetCDF loading to allow the construction of
:class:`~iris.experimental.ugrid.mesh.Mesh`\\ es from UGRID data in the file.
Eventual destination: :mod:`iris.fileformats.netcdf`.
"""
from contextlib import contextmanager
from itertools import groupby
Expand Down
3 changes: 1 addition & 2 deletions lib/iris/experimental/ugrid/save.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,7 @@
Extensions to Iris' NetCDF saving to allow
:class:`~iris.experimental.ugrid.mesh.Mesh` saving in UGRID format.
Eventual destination: :mod:`iris.fileformats.netcdf` (plan to split that module
into ``load`` and ``save`` in future).
Eventual destination: :mod:`iris.fileformats.netcdf`.
"""
from collections.abc import Iterable
Expand Down
6 changes: 5 additions & 1 deletion lib/iris/fileformats/netcdf/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,9 @@
Also refer to document 'NetCDF Climate and Forecast (CF) Metadata Conventions'.
"""
from .loader import DEBUG, NetCDFDataProxy, load_cubes, logger
import iris.config

from .loader import DEBUG, NetCDFDataProxy, load_cubes
from .saver import (
CF_CONVENTIONS_VERSION,
MESH_ELEMENTS,
Expand All @@ -23,6 +25,8 @@
save,
)

logger = iris.config.get_logger(__name__)

# Export all public elements from the loader and saver submodules.
# NOTE: the separation is purely for neatness and developer convenience; from
# the user point of view, it is still all one module.
Expand Down
7 changes: 2 additions & 5 deletions lib/iris/fileformats/netcdf/loader.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,11 +40,8 @@
# Show actions activation statistics.
DEBUG = False

# Configure the logger : shared logger for all in 'iris.fileformats.netcdf'.
from .. import __name__ as _parent_module_name

logger = iris.config.get_logger(_parent_module_name)
del _parent_module_name
# Get the logger : shared logger for all in 'iris.fileformats.netcdf'.
from .. import logger


def _actions_engine():
Expand Down
10 changes: 5 additions & 5 deletions lib/iris/fileformats/netcdf/saver.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,12 +46,12 @@
import iris.io
import iris.util

# Configure the logger : shared logger for all in 'iris.fileformats.netcdf'.
from .. import __name__ as _parent_module_name

logger = iris.config.get_logger(_parent_module_name)
del _parent_module_name
# Get the logger : shared logger for all in 'iris.fileformats.netcdf'.
from .. import logger

# Avoid warning about unused import.
# We could use an __all__, but we don't want to maintain one here
logger

# Standard CML spatio-temporal axis names.
SPATIO_TEMPORAL_AXES = ["t", "z", "y", "x"]
Expand Down

0 comments on commit b68b234

Please sign in to comment.