Documentation

This commit is contained in:
Shahram Najm 2022-08-11 11:16:24 +01:00
parent ade2ff78af
commit 8900e12429
3 changed files with 8 additions and 4 deletions

View File

@ -157,7 +157,8 @@ static int get_native_type(grib_accessor* a)
/* Convert input date to Julian number. If date is invalid, return -1 */
static double date_to_julian(long year, long month, long day, long hour, long minute, double second)
{
double result = 0;
double result = 0; /* Julian number in units of days */
/* For validating the date/time, we specify seconds as an integer */
long lSecond = (long)second;
grib_datetime_to_julian(year, month, day, hour, minute, lSecond, &result);

View File

@ -561,7 +561,7 @@ static int pack_long(grib_accessor* a, const long* val, size_t* len)
if (err != GRIB_SUCCESS)
return err;
dstep = (((double)(*val)) * u2s[unit]) / u2s[2];
dstep = (((double)(*val)) * u2s[unit]) / u2s[2]; /* in days */
dend += dstep;
err = grib_julian_to_datetime(dend, &year_of_end_of_interval, &month_of_end_of_interval,

View File

@ -9,8 +9,11 @@
*/
/***************************************************************************
* Enrico Fucile *
* *
*
* The Julian date of any instant is the Julian day number plus the fraction of a day
* since the preceding noon in Universal Time.
* Julian dates are expressed as a Julian day number with a decimal fraction added.
*
***************************************************************************/
#include "grib_api_internal.h"