Commit 25f52e6f authored by Uwe Schulzweida's avatar Uwe Schulzweida
Browse files

removed warning: VCT missing

parent 1a7b508c
......@@ -2050,6 +2050,8 @@ void cdf_def_vct_echam(stream_t *streamptr, int zaxisID)
if ( type == ZAXIS_HYBRID || type == ZAXIS_HYBRID_HALF )
{
int ilev = zaxisInqVctSize(zaxisID)/2;
if ( ilev == 0 ) return;
int mlev = ilev - 1;
size_t start;
size_t count = 1;
......@@ -2065,12 +2067,6 @@ void cdf_def_vct_echam(stream_t *streamptr, int zaxisID)
return;
}
if ( ilev == 0 )
{
Warning("VCT missing");
return;
}
int fileID = streamptr->fileID;
if ( streamptr->ncmode == 2 ) cdf_redef(fileID);
......@@ -2132,6 +2128,8 @@ void cdf_def_vct_cf(stream_t *streamptr, int zaxisID, int nclevID, int ncbndsID)
if ( type == ZAXIS_HYBRID || type == ZAXIS_HYBRID_HALF )
{
int ilev = zaxisInqVctSize(zaxisID)/2;
if ( ilev == 0 ) return;
int mlev = ilev - 1;
int hyaiid = 0, hybiid = 0, hyamid, hybmid;
char tmpname[CDI_MAX_NAME];
......@@ -2143,12 +2141,6 @@ void cdf_def_vct_cf(stream_t *streamptr, int zaxisID, int nclevID, int ncbndsID)
return;
}
if ( ilev == 0 )
{
Warning("VCT missing");
return;
}
int fileID = streamptr->fileID;
if ( streamptr->ncmode == 2 ) cdf_redef(fileID);
......
......@@ -1860,7 +1860,6 @@ void cgribexDefLevel(int *isec1, int *isec2, double *fsec2, int zaxisID, int lev
{
double level;
int ilevel, zaxistype, ltype;
static bool lwarning = true;
static bool lwarning_vct = true;
zaxistype = zaxisInqType(zaxisID);
......@@ -1955,11 +1954,6 @@ void cgribexDefLevel(int *isec1, int *isec2, double *fsec2, int zaxisID, int lev
}
vctsize = zaxisInqVctSize(zaxisID);
if ( vctsize == 0 && lwarning )
{
Warning("VCT missing. ( param = %d, zaxisID = %d )", ISEC1_Parameter, zaxisID);
lwarning = false;
}
if ( vctsize > 255 )
{
ISEC2_NumVCP = 0;
......
......@@ -2258,7 +2258,6 @@ static
void gribapiDefLevel(int editionNumber, grib_handle *gh, int param, int zaxisID, int levelID, int gcinit, int proddef_template_num)
{
int lbounds = 0;
static int warning = 1;
double dlevel1 = 0, dlevel2 = 0;
int zaxistype = zaxisInqType(zaxisID);
......@@ -2375,15 +2374,11 @@ void gribapiDefLevel(int editionNumber, grib_handle *gh, int param, int zaxisID,
if ( !gcinit )
{
int vctsize = zaxisInqVctSize(zaxisID);
if ( vctsize == 0 && warning )
if ( vctsize > 0 )
{
char paramstr[32];
cdiParamToString(param, paramstr, sizeof(paramstr));
Warning("VCT missing ( param = %s, zaxisID = %d )", paramstr, zaxisID);
warning = 0;
GRIB_CHECK(my_grib_set_long(gh, "PVPresent", 1), 0);
GRIB_CHECK(grib_set_double_array(gh, "pv", zaxisInqVctPtr(zaxisID), (size_t)vctsize), 0);
}
GRIB_CHECK(my_grib_set_long(gh, "PVPresent", 1), 0);
GRIB_CHECK(grib_set_double_array(gh, "pv", zaxisInqVctPtr(zaxisID), (size_t)vctsize), 0);
}
break;
......
......@@ -397,7 +397,6 @@ void iegDefLevel(int *pdb, int *gdb, double *vct, int zaxisID, int levelID)
{
double level;
int ilevel, leveltype;
static int warning = 1;
static int vct_warning = 1;
leveltype = zaxisInqType(zaxisID);
......@@ -441,12 +440,6 @@ void iegDefLevel(int *pdb, int *gdb, double *vct, int zaxisID, int levelID)
}
vctsize = zaxisInqVctSize(zaxisID);
if ( vctsize == 0 && warning )
{
Warning("VCT missing. ( code = %d, zaxisID = %d )",
IEG_P_Parameter(pdb), zaxisID);
warning = 0;
}
if ( vctsize > 100 )
{
/* IEG_G_NumVCP(gdb) = 0; */
......
......@@ -1031,15 +1031,8 @@ int varDefZaxis(int vlistID, int zaxistype, int nlevels, double *levels, int lbo
zaxisDefUbounds(zaxisID, levels2);
}
if ( zaxistype == ZAXIS_HYBRID || zaxistype == ZAXIS_HYBRID_HALF )
{
/* if ( vctsize > 0 && vctsize >= 2*(nlevels+1)) */
/* if ( vctsize > 0 && vctsize >= 2*(nlevels)) */
if ( vctsize > 0 )
zaxisDefVct(zaxisID, vctsize, vct);
else
Warning("VCT missing");
}
if ( (zaxistype == ZAXIS_HYBRID || zaxistype == ZAXIS_HYBRID_HALF) && vctsize > 0 )
zaxisDefVct(zaxisID, vctsize, vct);
zaxisDefName(zaxisID, name);
zaxisDefLongname(zaxisID, longname);
......
......@@ -497,13 +497,8 @@ int vlist_generate_zaxis(int vlistID, int zaxistype, int nlevels, const double *
zaxisDefUbounds(zaxisID, ubounds);
}
if ( zaxistype == ZAXIS_HYBRID )
{
if ( vctsize > 0 )
zaxisDefVct(zaxisID, vctsize, vct);
else
Warning("VCT missing");
}
if ( zaxistype == ZAXIS_HYBRID && vctsize > 0 )
zaxisDefVct(zaxisID, vctsize, vct);
}
nzaxis = vlistptr->nzaxis;
......
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