Commit 3ebfc9ab authored by R.K.Garcia's avatar R.K.Garcia
Browse files

test: negate scale_factor and add_offset of y(y)

PUG expectation is that positive y angles are north of equator
If this is not correct for Japan sector, look at reversing y array instead of negating sf/ao
parent c4027c3d
......@@ -264,8 +264,9 @@ class NetCDF4_writer(object):
def set_fgf(self, fgf, downsample_factor=1):
if self.fgf_y is not None:
self.fgf_y[:] = fgf.y
self.fgf_y.scale_factor = fgf.my * float(downsample_factor)
self.fgf_y.add_offset = fgf.by
LOG.warning('negating y scale/offset to conform to northward-positive PUG expectation')
self.fgf_y.scale_factor = -fgf.my * float(downsample_factor)
self.fgf_y.add_offset = -fgf.by
if self.fgf_x is not None:
self.fgf_x[:] = fgf.x
self.fgf_x.scale_factor = fgf.mx * float(downsample_factor)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment