shift_longitude#

rojak.core.data.shift_longitude(data, *, domain_bound=-180, sort_data=True, longitude_coord_name='longitude')[source]#

Shift the longitude coordinate to lie within [domain_bound, 360 + domain_bound)

Parameters:
  • data (T) – Array/Dataset whose longitude coordinate is to be shifted

  • domain_bound (float) – Lower bound of the target longitude range. Defaults to -180.

  • sort_data (bool) – If True (default), sort data by the shifted longitude coordinate in ascending order

  • longitude_coord_name (str) – Name of the longitude coordinate. Defaults to "longitude".

Returns:

data with its longitude coordinate shifted (and, if sort_data, sorted)

Return type:

T