This function calculates the temporal offset between local solar time and UTC time zone. Calculation is based on geographic coordinates of each locality. Therefore, the function does not work when longitude coordinate is not provided.

mc_prep_solar_tz(data)

Arguments

data

myClim object see myClim-package

Value

myClim object in the same format as input, with tz_offset filled in locality metadata

Details

myClim assumes that the data are in UTC. To calculate temporal offset based on local solar time, this function requires geographic coordinates (at least longitude) to be provided in locality metadata slot lon_wgs84 (in decimal degrees). Geographic coordinates for each locality can be provided already during data reading, see mc_read_data(), or added later with mc_prep_meta_locality() function.

TZ offset (in minutes) is calculated as longitude / 180 * 12 * 60.

Examples

data_solar <- mc_prep_solar_tz(mc_data_example_clean)