Commit bb4f4ecf authored by Uwe Schulzweida's avatar Uwe Schulzweida
Browse files

Cleanup usage of GRID_LCC.

parent 072e3ce3
......@@ -422,7 +422,7 @@ void printGridInfoKernel(int gridID, int index, bool lproj)
my_reset_text_color(stdout);
}
if ( gridtype == GRID_CURVILINEAR || gridtype == GRID_UNSTRUCTURED || gridtype == GRID_LCC )
if ( gridtype == GRID_CURVILINEAR || gridtype == GRID_UNSTRUCTURED )
{
if ( gridHasArea(gridID) ||
gridInqXbounds(gridID, NULL) || gridInqYbounds(gridID, NULL) )
......
......@@ -755,7 +755,7 @@ void gribapiGetGrid(grib_handle *gh, grid_t *grid)
Error("Unsupported grid type: %s", gridNamePtr(gridtype));
}
if ( gridtype == GRID_GAUSSIAN || gridtype == GRID_LONLAT || gridtype == GRID_PROJECTION || gridtype == GRID_LCC )
if ( gridtype == GRID_GAUSSIAN || gridtype == GRID_LONLAT || gridtype == GRID_PROJECTION )
{
long temp;
GRIB_CHECK(grib_get_long(gh, "uvRelativeToGrid", &temp), 0);
......@@ -763,7 +763,7 @@ void gribapiGetGrid(grib_handle *gh, grid_t *grid)
grid->uvRelativeToGrid = (bool)temp;
}
if ( gridtype == GRID_GAUSSIAN || gridtype == GRID_LONLAT || gridtype == GRID_PROJECTION || gridtype == GRID_LCC )
if ( gridtype == GRID_GAUSSIAN || gridtype == GRID_LONLAT || gridtype == GRID_PROJECTION )
{
long temp;
GRIB_CHECK(grib_get_long(gh, "iScansNegatively", &temp), 0);
......
......@@ -184,7 +184,7 @@ cdiPioQueryVarDims(int varShape[3], int vlistID, int varID)
varShape[1] = gridInqSize(gridID) / 2;
break;
case GRID_GENERIC:
case GRID_LCC:
case GRID_PROJECTION:
case GRID_GME:
case GRID_CURVILINEAR:
case GRID_UNSTRUCTURED:
......
......@@ -2053,12 +2053,6 @@ void cdfDefGrid(stream_t *streamptr, int gridID, int gridindex)
cdfDefTrajLon(streamptr, gridID, gridindex);
cdfDefTrajLat(streamptr, gridID, gridindex);
}
/*
else if ( gridtype == GRID_LCC )
{
cdfDefLcc(streamptr, gridID);
}
*/
else
{
Error("Unsupported grid type: %s", gridNamePtr(gridtype));
......
......@@ -410,7 +410,7 @@ void cgribexAddRecord(stream_t * streamptr, int param, int *isec1, int *isec2, d
if ( proj_lonlat_to_lcc_func )
{
x_0 = xval_0; y_0 = yval_0;
proj_lonlat_to_lcc_func(grid_missval, lon_0, lat_0, lat_1, lat_2, a, rf, 1, &x_0, &y_0);
proj_lonlat_to_lcc_func(grid_missval, lon_0, lat_0, lat_1, lat_2, a, rf, (size_t)1, &x_0, &y_0);
if ( IS_NOT_EQUAL(x_0, grid_missval) && IS_NOT_EQUAL(y_0, grid_missval) )
{ x_0 = -x_0; y_0 = -y_0; }
}
......
......@@ -510,7 +510,7 @@ void gribapiAddRecord(stream_t * streamptr, int param, grib_handle *gh,
if ( proj_lonlat_to_lcc_func )
{
x_0 = xval_0; y_0 = yval_0;
proj_lonlat_to_lcc_func(grid_missval, lon_0, lat_0, lat_1, lat_2, a, rf, 1, &x_0, &y_0);
proj_lonlat_to_lcc_func(grid_missval, lon_0, lat_0, lat_1, lat_2, a, rf, (size_t)1, &x_0, &y_0);
if ( IS_NOT_EQUAL(x_0, grid_missval) && IS_NOT_EQUAL(y_0, grid_missval) )
{ x_0 = -x_0; y_0 = -y_0; }
}
......@@ -2981,7 +2981,7 @@ void gribapiSetExtMode(grib_handle *gh, int gridID, long datasize, const double
#endif
int gridtype = gridInqType(gridID);
if ( gridtype == GRID_GENERIC || gridtype == GRID_LONLAT || gridtype == GRID_GAUSSIAN ||
gridtype == GRID_GAUSSIAN_REDUCED || gridtype == GRID_PROJECTION || gridtype == GRID_LCC )
gridtype == GRID_GAUSSIAN_REDUCED || gridtype == GRID_PROJECTION )
{
//scanModeIN = gribapiGetScanningMode(gh);
int scanModeIN = gridInqScanningMode(gridID);
......
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