earthkit.meteo.solar.cos_solar_zenith_angle¶
- earthkit.meteo.solar.cos_solar_zenith_angle(date: DateLike, latitudes: ArrayLike, longitudes: ArrayLike)¶
- earthkit.meteo.solar.cos_solar_zenith_angle(date: DateLike, latitudes: xarray.DataArray, longitudes: xarray.DataArray) xarray.DataArray
- earthkit.meteo.solar.cos_solar_zenith_angle(date: DateLike, latitudes: earthkit.data.FieldList, longitudes: None = None) earthkit.data.FieldList
- earthkit.meteo.solar.cos_solar_zenith_angle(date: DateLike, latitudes: earthkit.data.Field, longitudes: None = None) earthkit.data.Field
Compute the cosine of the solar zenith angle.
- Parameters:
date (
datetime.datetime | numpy.datetime64) – Date/time (typically a scalar applying to all latitude/longitude points).latitudes (
array-like | xarray.DataArray | FieldList | Field) – Latitude (degrees), or a field|(s) whose geography provides latitude/longitude values.longitudes (
array-like | xarray.DataArray | None, optional) – Longitude (degrees). Must be provided with array/xarray inputs and must be omitted (or set toNone) whenlatitudesisFieldListorField.
- Returns:
Cosine of the solar zenith angle (clipped to be non-negative).
- Return type:
array-like | xarray.DataArray | FieldList | Field
Notes
The result is clipped by setting negative values to 0.
Implementations¶
cos_solar_zenith_angle()calls one of the following implementations depending on the type of the input arguments:earthkit.meteo.solar.array.cos_solar_zenith_angle()otherwiseearthkit.meteo.solar.xarray.cos_solar_zenith_angle()when any input is xarray.DataArrayearthkit.meteo.solar.fieldlist.cos_solar_zenith_angle()whenlatitudesis FieldList or Field
The function returns an object of the same type as the input arguments.