Commit dfaae63c authored by Fabian Wachsmann's avatar Fabian Wachsmann
Browse files

Recognize zaxis type altitude via standard_name

parent edef9ce4
......@@ -188,6 +188,22 @@ bool is_height_axis(const char *stdname, const char *longname)
return status;
}
bool is_altitude_axis(const char *stdname, const char *longname)
{
bool status = false;
if ( strcmp(stdname, "altitude") == 0 )
{
status = true;
}
else if ( strcmp(longname, "altitude") == 0 )
{
status = true;
}
return status;
}
bool is_lon_axis(const char *units, const char *stdname)
{
......
......@@ -13,6 +13,7 @@ bool is_pressure_units(const char *units);
bool is_DBL_axis(/*const char *units,*/ const char *longname);
bool is_depth_axis(const char *stdname, const char *longname);
bool is_height_axis(const char *stdname, const char *longname);
bool is_altitude_axis(const char *stdname, const char *longname);
bool is_lon_axis(const char *units, const char *stdname);
bool is_lat_axis(const char *units, const char *stdname);
......
......@@ -1824,6 +1824,8 @@ void verify_coordinate_vars_1(int ncid, int ndims, ncdim_t *ncdims, ncvar_t *ncv
ncvars[ncvarid].zaxistype = ZAXIS_DEPTH_BELOW_SEA;
else if ( is_height_axis(ncvars[ncvarid].stdname, ncvars[ncvarid].longname) )
ncvars[ncvarid].zaxistype = ZAXIS_HEIGHT;
else if ( is_altitude_axis(ncvars[ncvarid].stdname, ncvars[ncvarid].longname) )
ncvars[ncvarid].zaxistype = ZAXIS_ALTITUDE;
}
}
else
......
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