mirror of https://github.com/ecmwf/eccodes.git
GRIB-626: grib_to_netcdf: CF checker warning about calendar
This commit is contained in:
parent
3455606127
commit
d4547c5365
|
@ -2900,12 +2900,17 @@ static int define_netcdf_dimensions(hypercube *h, fieldset *fs, int ncid, datase
|
||||||
{
|
{
|
||||||
if(setup.usevalidtime)
|
if(setup.usevalidtime)
|
||||||
{
|
{
|
||||||
|
const char *cal = "gregorian";
|
||||||
|
|
||||||
if(setup.mmeans)
|
if(setup.mmeans)
|
||||||
{
|
{
|
||||||
char *period = "0000-01-00 00:00:00";
|
char *period = "0000-01-00 00:00:00";
|
||||||
stat = nc_put_att_text(ncid, var_id, "avg_period", strlen(period), period);
|
stat = nc_put_att_text(ncid, var_id, "avg_period", strlen(period), period);
|
||||||
check_err(stat, __LINE__, __FILE__);
|
check_err(stat, __LINE__, __FILE__);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
stat = nc_put_att_text(ncid, var_id, "calendar", strlen(cal), cal);
|
||||||
|
check_err(stat, __LINE__, __FILE__);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue