Skip to content

Commit 2e6fac7

Browse files
Fix Issue 762 by accounting for cyclic axes w/ get_domain
1 parent d4cf6fe commit 2e6fac7

File tree

1 file changed

+24
-0
lines changed

1 file changed

+24
-0
lines changed

cf/field.py

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2691,6 +2691,30 @@ def cfa_update_file_substitutions(
26912691
for c in self.constructs.filter_by_data(todict=True).values():
26922692
c.cfa_update_file_substitutions(substitutions)
26932693

2694+
def get_domain(self):
2695+
"""Return the domain.
2696+
2697+
.. versionadded:: NEXTVERSION
2698+
2699+
.. seealso:: `domain`
2700+
2701+
:Returns:
2702+
2703+
`Domain`
2704+
The domain.
2705+
2706+
**Examples**
2707+
2708+
>>> d = f.get_domain()
2709+
2710+
"""
2711+
domain = super().get_domain()
2712+
2713+
# Set axis cyclicity for the domain
2714+
domain._cyclic = self._cyclic
2715+
2716+
return domain
2717+
26942718
def radius(self, default=None):
26952719
"""Return the radius of a latitude-longitude plane defined in
26962720
spherical polar coordinates.

0 commit comments

Comments
 (0)