Skip to content

BUG: pp field parameters conforming to UM convention for unrotated LAMs #3560

@cpelley

Description

@cpelley

UM requires LAM's which are not on a rotated pole to be described with bplat=90 bplon=180.
Iris will currently set bplon to 0. The recent introduction of UM file metadata checking means that such incorrectly set bplon values will raise an error in the UM.

Our workaround is to override pp fields derived by iris:

https://code.metoffice.gov.uk/trac/ancil/browser/ants/branches/dev/carwynpelley/1169_IRIS_DITCHES_BPLAT_BPLON/lib/ants/fileformats/pp/__init__.py?rev=8607#L207

 207     # Overide bplon as iris doesn not support properly support unrotated pp
 208     # LAMs.  See https://github.com/SciTools/iris/issues/3560
*209     if not ants.utils.cube.is_global(cube):
 210         if x_coord.coord_system == ants.coord_systems.UM_SPHERE.crs:
 211             field.bplon = 180

It would be simple enough to apply a similar change to iris pp generation from cubes by overriding bplon as 180 if the provided field is a LAM with unrotated pole crs.

Background

The convention is that unrotated lams have 180 pole longitude. This way it matches the dumps and matches F03. This is related to the way the UM dump code performs the pole rotation as well as calculating any longitudinal offset of where to place the zero meridian. - Joe Mancell

Internal issue (ANTS workaround): ancil/ticket #1169
Internal issue (F03 update): um/ticket #5305

Metadata

Metadata

Labels

No labels
No labels

Type

No type

Projects

Relationships

None yet

Development

No branches or pull requests

Issue actions