Commit 367c3beb authored by Uwe Schulzweida's avatar Uwe Schulzweida
Browse files

gridCreate: CF stdname and units for curvilinear grids

parent 767c83a8
......@@ -3,6 +3,7 @@
* add support for GRID type SINUSOIDAL
* add support for GRID type LAEA
* add support of GRIB level type MEANSEA
* gridCreate: CF stdname and units for curvilinear grids [report: Stephanie Legutke]
* cdf_create: don't set chunksizehint (bug fix) [report: Luis Kornblueh]
* change vlistFlagVar to vlistMergedVar
* set default missval of INT8/16/32 to SCHAR_MIN/SHRT_MIN/INT_MIN
......
......@@ -664,6 +664,7 @@ int gridCreate(int gridtype, int size)
}
gridDefXlongname(gridID, "longitude");
gridDefYlongname(gridID, "latitude");
/*
if ( gridtype == GRID_CURVILINEAR )
{
strcpy(gridptr->xstdname, "grid_longitude");
......@@ -672,6 +673,7 @@ int gridCreate(int gridtype, int size)
gridDefYunits(gridID, "degrees");
}
else
*/
{
strcpy(gridptr->xstdname, "longitude");
strcpy(gridptr->ystdname, "latitude");
......@@ -683,6 +685,15 @@ int gridCreate(int gridtype, int size)
}
case GRID_GME:
case GRID_CELL:
{
gridDefXname(gridID, "lon");
gridDefYname(gridID, "lat");
strcpy(gridptr->xstdname, "longitude");
strcpy(gridptr->ystdname, "latitude");
gridDefXunits(gridID, "degrees_east");
gridDefYunits(gridID, "degrees_north");
break;
}
case GRID_GENERIC:
{
gridDefXname(gridID, "x");
......
......@@ -4345,7 +4345,10 @@ int cdfInqContents(int streamID)
strcmp(ncvars[ncvarid].units, "degrees_E") == 0 ||
strcmp(ncvars[ncvarid].units, "degreeE") == 0 ||
strcmp(ncvars[ncvarid].units, "degreesE") == 0 ||
strcmp(ncvars[ncvarid].stdname, "longitude") == 0 ||
(strcmp(ncvars[ncvarid].units, "degrees") == 0 &&
strcmp(ncvars[ncvarid].stdname, "grid_longitude") == 0) ||
(strcmp(ncvars[ncvarid].units, "radian") == 0 &&
strcmp(ncvars[ncvarid].stdname, "grid_longitude") == 0) )
{
ncvars[ncvarid].islon = TRUE;
......@@ -4359,7 +4362,10 @@ int cdfInqContents(int streamID)
strcmp(ncvars[ncvarid].units, "degrees_N") == 0 ||
strcmp(ncvars[ncvarid].units, "degreeN") == 0 ||
strcmp(ncvars[ncvarid].units, "degreesN") == 0 ||
strcmp(ncvars[ncvarid].stdname, "latitude") == 0 ||
(strcmp(ncvars[ncvarid].units, "degrees") == 0 &&
strcmp(ncvars[ncvarid].stdname, "grid_latitude") == 0) ||
(strcmp(ncvars[ncvarid].units, "radian") == 0 &&
strcmp(ncvars[ncvarid].stdname, "grid_latitude") == 0) )
{
ncvars[ncvarid].islat = TRUE;
......
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