Skip to content

Commit

Permalink
Review changes: clarify comments.
Browse files Browse the repository at this point in the history
  • Loading branch information
pp-mo committed Jul 1, 2021
1 parent 97b20aa commit 16be67b
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -607,6 +607,10 @@ def test_mapping_undefined(self):
# TODO: it's not clear why this needs to behave differently from case
# (3.) : possibly, these two should be made consistent.
#
# TODO: *all* these 'mismatch' cases should probably generate warnings,
# except for plain-latlon coords with no grid-mapping.
# At present, we _only_ warn when an expected grid-mapping is absent.
#

def test_mapping__mismatch__latlon_coords_rotated_system(self):
# Rules Triggered:
Expand Down Expand Up @@ -694,7 +698,6 @@ def test_mapping__mismatch__rotated_coords_nonll_system(self):
# 006 : fc_build_coordinate_(rotated_longitude)(rotated no-cs : discarded projected cs)
# Notes:
# * coords built : rotated-lat + lon, with no coord-system (see above)
# TODO: should this change ??
result = self.run_testcase(
mapping_type_name=hh.CF_GRID_MAPPING_ALBERS,
xco_name="grid_longitude",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -317,14 +317,17 @@ def test_dim_nonmonotonic(self):
self.check_result(result, "aux")

def test_dim_fails_typeident(self):
# The coord variable is identified as a CFDimensionCoordinate by cf.py,
# but having the wrong units causes it to fail the 'is_time' or
# 'is_period' test, so the 'provides_coord' rule fails to trigger.
# So it is built as a 'miscellaneous' dim-coord.
# Provide a coord variable, identified as a CFDimensionCoordinate by
# cf.py, but with the "wrong" units for a time or period coord.
# This causes it to fail both 'is_time' and 'is_period' tests and so,
# within the 'action_provides_coordinate' routine, does not trigger as
# a 'provides_coord_(time[[_period]])' rule, but instead as a
# 'default_coordinate_(provide-phase)'.
# As a result, it is built as a 'miscellaneous' dim-coord.
# N.B. this makes *no* practical difference, because a 'misc' dim
# coord is still a dim coord (albeit one with bad units).
# ( N.B.#2 Not quite the same for lat/lon coords, where coord-specific
# 'build' rules always use a fixed standard-name ).
# coord is still a dim coord (albeit one with incorrect units).
# N.B.#2 that is different from lat/lon coords, where the coord-specific
# 'build' rules have the extra effect of setting a fixed standard-name.
#
# Rules Triggered:
# 001 : fc_default
Expand Down

0 comments on commit 16be67b

Please sign in to comment.