Commit 3f48682d authored by Uwe Schulzweida's avatar Uwe Schulzweida
Browse files

Remap: added support for CDI_PROJ_SINU.

parent 3fa916b3
......@@ -531,9 +531,11 @@ bool is_global_grid(int gridID)
bool non_global = remap_non_global || !gridIsCircular(gridID);
int gridtype = gridInqType(gridID);
int projtype = (gridtype == GRID_PROJECTION) ? gridInqProjType(gridID) : -1;
if ( (gridtype == GRID_LONLAT && gridIsRotated(gridID)) ||
(gridtype == GRID_PROJECTION && gridInqProjType(gridID) == CDI_PROJ_RLL) ||
(gridtype == GRID_PROJECTION && gridInqProjType(gridID) == CDI_PROJ_LAEA) ||
(projtype == CDI_PROJ_RLL) ||
(projtype == CDI_PROJ_LAEA) ||
(projtype == CDI_PROJ_SINU) ||
(gridtype == GRID_LONLAT && non_global) ||
(gridtype == GRID_LCC) ||
(gridtype == GRID_LAEA) ||
......@@ -577,10 +579,12 @@ int set_remapgrids(int filetype, int vlistID, int ngrids, bool *remapgrids)
int gridID = vlistGrid(vlistID, index);
int gridtype = gridInqType(gridID);
int projtype = (gridtype == GRID_PROJECTION) ? gridInqProjType(gridID) : -1;
if ( gridtype != GRID_LONLAT &&
!(gridtype == GRID_PROJECTION && gridInqProjType(gridID) == CDI_PROJ_RLL) &&
!(gridtype == GRID_PROJECTION && gridInqProjType(gridID) == CDI_PROJ_LAEA) &&
projtype != CDI_PROJ_RLL &&
projtype != CDI_PROJ_LAEA &&
projtype != CDI_PROJ_SINU &&
gridtype != GRID_GAUSSIAN &&
gridtype != GRID_LCC &&
gridtype != GRID_LAEA &&
......
......@@ -286,8 +286,8 @@ double mod_huiliers_area2(int num_corners, double *cell_corner_lon, double *cell
int gridGenArea(int gridID, double* area)
{
int status = 0;
int lgrid_gen_bounds = FALSE;
int lgriddestroy = FALSE;
bool lgrid_gen_bounds = false;
bool lgriddestroy = false;
long nv;
long gridsize = gridInqSize(gridID);
......@@ -314,7 +314,7 @@ int gridGenArea(int gridID, double* area)
{
if ( gridtype == GRID_GME )
{
lgriddestroy = TRUE;
lgriddestroy = true;
gridID = gridToUnstructured(gridID, 1);
/*
grid_mask = (int*) Malloc(gridsize*sizeof(int));
......@@ -324,9 +324,9 @@ int gridGenArea(int gridID, double* area)
}
else
{
lgriddestroy = TRUE;
lgriddestroy = true;
gridID = gridToCurvilinear(gridID, 1);
lgrid_gen_bounds = TRUE;
lgrid_gen_bounds = true;
}
}
......@@ -336,7 +336,7 @@ int gridGenArea(int gridID, double* area)
{
if ( gridInqNumber(gridID) > 0 )
{
lgriddestroy = TRUE;
lgriddestroy = true;
gridID = referenceToGrid(gridID);
if ( gridID == -1 ) return 1;
}
......
Supports Markdown
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