Skip to content

Commit c987e01

Browse files
committed
Small fixes - WIP.
1 parent f1a27be commit c987e01

1 file changed

Lines changed: 7 additions & 2 deletions

File tree

src/iris_grib/_grib1_convert.py

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -308,7 +308,12 @@ def _coord_system(section2: Section) -> CoordSystem:
308308

309309
if grid_name in ("polar_stereo", "lambert_conformal"):
310310
pcf = section2["projectionCentreFlag"]
311-
grid_orientation_degrees = section2["LoV"]
311+
if grid_name == "polar_stereo":
312+
orientation_keyname = "orientationOfTheGrid"
313+
else:
314+
# different for lambert (!yuck!)
315+
orientation_keyname = "LoV"
316+
grid_orientation_degrees = section2[orientation_keyname]
312317
truescale_lat = 60.0 # this is FIXED for grib1
313318
match pcf:
314319
case 0:
@@ -335,7 +340,7 @@ def _coord_system(section2: Section) -> CoordSystem:
335340
)
336341
elif grid_name == "polar_stereo":
337342
coord_system = coord_systems.PolarStereographic(
338-
pole_lat_lat=0,
343+
central_lat=pole_lat,
339344
central_lon=grid_orientation_degrees,
340345
true_scale_lat=truescale_lat, # this is a CONSTANT for grib1
341346
ellipsoid=ellipsoid

0 commit comments

Comments
 (0)