Commit 5497a0bd authored by Uwe Schulzweida's avatar Uwe Schulzweida
Browse files

Removed GRID_LCC flag.

parent 983055f4
......@@ -166,7 +166,6 @@ extern "C" {
#define GRID_TRAJECTORY 8 // Trajectory
#define GRID_UNSTRUCTURED 9 // General unstructured grid
#define GRID_CURVILINEAR 10 // Curvilinear grid
#define GRID_LCC 11 // Lambert Conformal Conic (GRIB)
#define GRID_PROJECTION 12 // Projected coordinates
#define GRID_CHARXY 13 // One horizontal character dimension
......
......@@ -489,8 +489,8 @@ int gribapiGetGridType(grib_handle *gh)
gridtype = ( gribGetLong(gh, "Ni") == (long) GRIB_MISSING_LONG ) ? GRID_GAUSSIAN_REDUCED : GRID_GAUSSIAN;
break;
case GRIB2_GTYPE_LATLON_ROT: gridtype = GRID_PROJECTION; break;
case GRIB2_GTYPE_LCC: gridtype = GRID_LCC; break;
case GRIB2_GTYPE_STERE: gridtype = CDI_PROJ_STERE; break;
case GRIB2_GTYPE_LCC: gridtype = CDI_PROJ_LCC; break;
case GRIB2_GTYPE_STERE: gridtype = CDI_PROJ_STERE; break;
case GRIB2_GTYPE_SPECTRAL: gridtype = GRID_SPECTRAL; break;
case GRIB2_GTYPE_GME: gridtype = GRID_GME; break;
case GRIB2_GTYPE_UNSTRUCTURED: gridtype = GRID_UNSTRUCTURED; break;
......@@ -788,14 +788,9 @@ void gribapiGetGrid(grib_handle *gh, grid_t *grid)
long editionNumber = gribEditionNumber(gh);
int gridtype = gribapiGetGridType(gh);
int projtype = (gridtype == GRID_PROJECTION && gribapiGetIsRotated(gh)) ? CDI_PROJ_RLL : CDI_UNDEFID;
if ( gridtype == GRID_LCC )
if (gridtype == CDI_PROJ_LCC || gridtype == CDI_PROJ_STERE)
{
gridtype = GRID_PROJECTION;
projtype = CDI_PROJ_LCC;
}
else if (gridtype == CDI_PROJ_STERE)
{
projtype = CDI_PROJ_STERE;
projtype = gridtype;
gridtype = GRID_PROJECTION;
}
/*
......
......@@ -1007,7 +1007,6 @@ int gridInqProjType(int gridID)
grid_t *gridptr = grid_to_pointer(gridID);
int projtype = gridptr->projtype;
if ( projtype == -1 )
{
char mapping[CDI_MAX_NAME]; mapping[0] = 0;
......@@ -1018,6 +1017,7 @@ int gridInqProjType(int gridID)
else if ( strcmp(mapping, "lambert_azimuthal_equal_area") == 0 ) projtype = CDI_PROJ_LAEA;
else if ( strcmp(mapping, "lambert_conformal_conic") == 0 ) projtype = CDI_PROJ_LCC;
else if ( strcmp(mapping, "sinusoidal") == 0 ) projtype = CDI_PROJ_SINU;
else if ( strcmp(mapping, "polar_stereographic") == 0 ) projtype = CDI_PROJ_STERE;
gridptr->projtype = projtype;
}
......
......@@ -38,7 +38,7 @@ int cgribexGetGridType(int *isec2)
{
case GRIB1_GTYPE_LATLON: { gridtype = GRID_LONLAT; break; }
case GRIB1_GTYPE_LATLON_ROT: { gridtype = GRID_PROJECTION; break; }
case GRIB1_GTYPE_LCC: { gridtype = GRID_LCC; break; }
case GRIB1_GTYPE_LCC: { gridtype = CDI_PROJ_LCC; break; }
case GRIB1_GTYPE_GAUSSIAN: { gridtype = ISEC2_Reduced ? GRID_GAUSSIAN_REDUCED : GRID_GAUSSIAN; break; }
case GRIB1_GTYPE_SPECTRAL: { gridtype = GRID_SPECTRAL; break; }
case GRIB1_GTYPE_GME: { gridtype = GRID_GME; break; }
......@@ -141,10 +141,10 @@ void cgribexGetGrid(stream_t *streamptr, int *isec2, int *isec4, grid_t *grid, i
bool compyinc = true;
int gridtype = cgribexGetGridType(isec2);
int projtype = (gridtype == GRID_PROJECTION && cgribexGetIsRotated(isec2)) ? CDI_PROJ_RLL : CDI_UNDEFID;
if ( gridtype == GRID_LCC )
if ( gridtype == CDI_PROJ_LCC )
{
projtype = gridtype;
gridtype = GRID_PROJECTION;
projtype = CDI_PROJ_LCC;
}
if ( streamptr->unreduced && gridtype == GRID_GAUSSIAN_REDUCED && iret != -801 )
......@@ -1811,7 +1811,7 @@ void cgribexDefGrid(int *isec1, int *isec2, double *fsec2, int *isec4, int gridI
cgribexDefGridRegular(isec2, fsec2, gridID, gridtype, gridIsRotated, gridIsCurvilinear);
break;
}
case GRID_LCC:
case CDI_PROJ_LCC:
{
cgribexDefGridLambert(isec2, gridID);
break;
......
......@@ -444,7 +444,7 @@ int grbGetGridtype(int gridID, size_t gridsize, bool *gridIsRotated, bool *gridI
}
else if ( gridInqProjType(gridID) == CDI_PROJ_LCC )
{
gridtype = GRID_LCC;
gridtype = CDI_PROJ_LCC;
}
}
......
......@@ -2277,7 +2277,7 @@ void gribapiDefGrid(int editionNumber, grib_handle *gh, int gridID, int comptype
gribapiDefGridRegular(gh, gridID, gridtype, gridIsRotated, gridIsCurvilinear);
break;
}
case GRID_LCC:
case CDI_PROJ_LCC:
{
gribapiDefGridLambert(gh, editionNumber, gridID);
break;
......
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