earthkit.meteo.solar.array.julian_day

earthkit.meteo.solar.array.julian_day(date)

Compute fractional day-of-year.

Parameters:

date (datetime.datetime, numpy.datetime64, or numpy.ndarray) – Input date(s). May be a scalar or array of numpy.datetime64 or datetime.datetime objects.

Returns:

Fractional day-of-year value(s), where January 1st 00:00 is 0.0.

Return type:

float or numpy.ndarray

Notes

This function supports:

  • Python datetime.datetime scalars

  • numpy.datetime64 scalars

  • numpy arrays of dtype datetime64

This enables compatibility with xarray, which internally represents time coordinates using numpy.datetime64.