Commit 31d7ad94 authored by Uwe Schulzweida's avatar Uwe Schulzweida
Browse files

Scalar Z-Coordinate: added support for bounds (bug fix).

parent 1b9a4a03
......@@ -2,6 +2,10 @@
* Version 1.8.1 released
2017-04-05 Uwe Schulzweida
* Scalar Z-Coordinate: added support for bounds (bug fix)
2017-03-18 Uwe Schulzweida
* grid_check_cyclic: check yvals for curvilinear grids (bug fix)
......
......@@ -2780,10 +2780,10 @@ void cdf_define_all_zaxes(stream_t *streamptr, int vlistID, ncdim_t *ncdims, int
if ( ncvars[zvarid].bounds != CDI_UNDEFID )
{
int nbdims = ncvars[ncvars[zvarid].bounds].ndims;
if ( nbdims == 2 )
if ( nbdims == 2 || is_scalar )
{
int nlevel = (int)ncdims[ncvars[ncvars[zvarid].bounds].dimids[0]].len;
int nvertex = (int)ncdims[ncvars[ncvars[zvarid].bounds].dimids[1]].len;
int nlevel = is_scalar ? 1 : (int)ncdims[ncvars[ncvars[zvarid].bounds].dimids[0]].len;
int nvertex = (int)ncdims[ncvars[ncvars[zvarid].bounds].dimids[1-is_scalar]].len;
if ( nlevel == zsize && nvertex == 2 )
{
with_bounds = 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