Omaha #4259 Fix lat/lon grids and ifpnetCDF parmList issues
Change-Id: Ie1437c6455a7c88a31ba0152bd56976ab6ce70c3 Former-commit-id: 26faf2500b76504bddcda0e6eb5dbe334e6cdc3f
This commit is contained in:
parent
6ed473f7ac
commit
2853d08519
4 changed files with 8 additions and 13 deletions
|
@ -1702,7 +1702,7 @@ class SmartScript(BaseTool.BaseTool):
|
||||||
|
|
||||||
def getLatLonGrids(self):
|
def getLatLonGrids(self):
|
||||||
gridLoc = self.getGridLoc()
|
gridLoc = self.getGridLoc()
|
||||||
latLonGrid = gridLoc.getLatLonGrid().getNDArray();
|
latLonGrid = gridLoc.getLatLonGrid()
|
||||||
# FIXME We reverse the x and y dimensions because that's what AWIPS 1
|
# FIXME We reverse the x and y dimensions because that's what AWIPS 1
|
||||||
# did and that makes the pre-existing python code compatible. Java
|
# did and that makes the pre-existing python code compatible. Java
|
||||||
# ordering is x,y while python is ordering is y,x. So our latlonGrid
|
# ordering is x,y while python is ordering is y,x. So our latlonGrid
|
||||||
|
|
|
@ -209,7 +209,7 @@ def advection(windGrid, scalarGrid):
|
||||||
# in any SmartTool.
|
# in any SmartTool.
|
||||||
def getLatLonGrids(gridLoc):
|
def getLatLonGrids(gridLoc):
|
||||||
# Fetch the grids
|
# Fetch the grids
|
||||||
latLonGrid = gridLoc.getLatLonGrid().__numpy__[0];
|
latLonGrid = gridLoc.getLatLonGrid()
|
||||||
latLonGrid = reshape(latLonGrid, (2,gridLoc.getNy().intValue(),gridLoc.getNx().intValue()), order='F')
|
latLonGrid = reshape(latLonGrid, (2,gridLoc.getNy().intValue(),gridLoc.getNx().intValue()), order='F')
|
||||||
return latLonGrid[1], latLonGrid[0]
|
return latLonGrid[1], latLonGrid[0]
|
||||||
|
|
||||||
|
|
|
@ -370,7 +370,7 @@ def storeLatLonGrids(client, file, databaseID, invMask, krunch, clipArea):
|
||||||
gridLoc = IFPServerConfigManager.getServerConfig(DatabaseID(databaseID).getSiteId()).dbDomain()
|
gridLoc = IFPServerConfigManager.getServerConfig(DatabaseID(databaseID).getSiteId()).dbDomain()
|
||||||
pDict = gridLoc.getProjection()
|
pDict = gridLoc.getProjection()
|
||||||
|
|
||||||
latLonGrid = gridLoc.getLatLonGrid().getNDArray()
|
latLonGrid = gridLoc.getLatLonGrid()
|
||||||
|
|
||||||
latLonGrid = numpy.reshape(latLonGrid, (2,gridLoc.getNy().intValue(),gridLoc.getNx().intValue()), order='F')
|
latLonGrid = numpy.reshape(latLonGrid, (2,gridLoc.getNy().intValue(),gridLoc.getNx().intValue()), order='F')
|
||||||
|
|
||||||
|
@ -1270,10 +1270,9 @@ def main(outputFilename, parmList, databaseID, startTime,
|
||||||
# AFPS.DBSubsystem_getBuiltBy(), AFPS.DBSubsystem_getBuiltOn(),
|
# AFPS.DBSubsystem_getBuiltBy(), AFPS.DBSubsystem_getBuiltOn(),
|
||||||
# AFPS.DBSubsystem_getBuildVersion())
|
# AFPS.DBSubsystem_getBuildVersion())
|
||||||
|
|
||||||
try:
|
if hasattr(parmList, 'java_name'):
|
||||||
len(parmList)
|
|
||||||
except TypeError:
|
|
||||||
parmList = JUtil.javaObjToPyVal(parmList)
|
parmList = JUtil.javaObjToPyVal(parmList)
|
||||||
|
|
||||||
argDict = {"outputFilename": outputFilename,
|
argDict = {"outputFilename": outputFilename,
|
||||||
"parmList": parmList,
|
"parmList": parmList,
|
||||||
"databaseID": databaseID,
|
"databaseID": databaseID,
|
||||||
|
|
|
@ -980,17 +980,13 @@ public class GridLocation extends PersistableDataObject<String> implements
|
||||||
PixelOrientation.CENTER, this);
|
PixelOrientation.CENTER, this);
|
||||||
mt.transform(gridCells, 0, latLon, 0, gridCells.length / 2);
|
mt.transform(gridCells, 0, latLon, 0, gridCells.length / 2);
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
e.printStackTrace();
|
statusHandler.error("Error computing lat/lon grid", e);
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* FIXME We reverse the x and y dimensions because that's what AWIPS 1
|
* return the 1-d array and let python reshape it
|
||||||
* did and that makes the pre-existing python code compatible. Java
|
|
||||||
* ordering is x,y while python is ordering is y,x. It's confusing and
|
|
||||||
* questionable at best so someday someone should correct all that. Good
|
|
||||||
* luck.
|
|
||||||
*/
|
*/
|
||||||
return new NDArray<float[]>(latLon, ny, nx, 2);
|
return new NDArray<float[]>(latLon, 1, latLon.length);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
Loading…
Add table
Reference in a new issue