mirror of https://github.com/ecmwf/eccodes.git
Documentation
This commit is contained in:
parent
ade2ff78af
commit
8900e12429
|
@ -157,7 +157,8 @@ static int get_native_type(grib_accessor* a)
|
||||||
/* Convert input date to Julian number. If date is invalid, return -1 */
|
/* 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)
|
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 */
|
/* For validating the date/time, we specify seconds as an integer */
|
||||||
long lSecond = (long)second;
|
long lSecond = (long)second;
|
||||||
grib_datetime_to_julian(year, month, day, hour, minute, lSecond, &result);
|
grib_datetime_to_julian(year, month, day, hour, minute, lSecond, &result);
|
||||||
|
|
|
@ -561,7 +561,7 @@ static int pack_long(grib_accessor* a, const long* val, size_t* len)
|
||||||
if (err != GRIB_SUCCESS)
|
if (err != GRIB_SUCCESS)
|
||||||
return err;
|
return err;
|
||||||
|
|
||||||
dstep = (((double)(*val)) * u2s[unit]) / u2s[2];
|
dstep = (((double)(*val)) * u2s[unit]) / u2s[2]; /* in days */
|
||||||
dend += dstep;
|
dend += dstep;
|
||||||
|
|
||||||
err = grib_julian_to_datetime(dend, &year_of_end_of_interval, &month_of_end_of_interval,
|
err = grib_julian_to_datetime(dend, &year_of_end_of_interval, &month_of_end_of_interval,
|
||||||
|
|
|
@ -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"
|
#include "grib_api_internal.h"
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue