Commit 44026768 authored by Uwe Schulzweida's avatar Uwe Schulzweida
Browse files

call scan_hybrid_formula() only if att formula_terms is available

parent 17952086
......@@ -5151,7 +5151,8 @@ int isHybridSigmaPressureCoordinate(int ncid, int ncvarid, ncvar_t *ncvars, ncdi
int dimlen = (int)ncdims[dimid].len;
int apvarid1 = -1, bvarid1 = -1, psvarid1 = -1;
scan_hybrid_formula(ncid, ncfvarid, &apvarid1, &bvarid1, &psvarid1);
if ( ncvars[ncfvarid].lformula && ncvars[ncfvarid].lformulaterms )
scan_hybrid_formula(ncid, ncfvarid, &apvarid1, &bvarid1, &psvarid1);
if ( apvarid1 != -1 ) ncvars[apvarid1].isvar = FALSE;
if ( bvarid1 != -1 ) ncvars[bvarid1].isvar = FALSE;
if ( psvarid1 != -1 ) ncvar->psvarid = psvarid1;
......@@ -5160,7 +5161,8 @@ int isHybridSigmaPressureCoordinate(int ncid, int ncvarid, ncvar_t *ncvars, ncdi
{
ncfvarid = ncvar->bounds;
int apvarid2 = -1, bvarid2 = -1, psvarid2 = -1;
scan_hybrid_formula(ncid, ncfvarid, &apvarid2, &bvarid2, &psvarid2);
if ( ncvars[ncfvarid].lformula && ncvars[ncfvarid].lformulaterms )
scan_hybrid_formula(ncid, ncfvarid, &apvarid2, &bvarid2, &psvarid2);
if ( apvarid2 != -1 && bvarid2 != -1 )
{
ncvars[apvarid2].isvar = FALSE;
......@@ -8298,6 +8300,7 @@ double get_timevalue(int fileID, int nctimevarid, int tsID, timecache_t *tcache)
return timevalue;
}
int cdfInqTimestep(stream_t * streamptr, int tsID)
{
long nrecs = 0;
......
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