Skip to content

Commit

Permalink
Better TranslationError for non-polar.
Browse files Browse the repository at this point in the history
  • Loading branch information
trexfeathers committed Apr 19, 2024
1 parent a1c3f67 commit f793bdd
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions iris_grib/_save_rules.py
Original file line number Diff line number Diff line change
Expand Up @@ -706,11 +706,11 @@ def grid_definition_template_20(cube, grib):
elif np.isclose(cs.central_lat, 90.0):
centre_flag = 0x0
else:
emsg = (
"Bipolar and symmetric polar stereo projections "
"are not supported in GRIB Template 3.20."
message = (
f"{cs.central_lat=} . GRIB Template 3.20 only supports the polar "
"stereographic projection; central_lat must be 90.0 or -90.0."
)
raise TranslationError(emsg)
raise TranslationError(message)

def non_standard_scale_factor_error(message: str):
message = f"Non-standard scale factor specified. {message}"
Expand Down

0 comments on commit f793bdd

Please sign in to comment.