Skip to contents

Matches thermal dynamics of specific tiles (i.e., specific latitude and longitudes) collected across multiple flights to the thermal dynamics of an operative temperature model (OTM).

Usage

match_data(flights_data, otm_splines, coverage_per, error_max)

Arguments

flights_data

A data frame of flights data obtained through rnp_flights_data and corrected using correct_flights_data. The temperature column should be op_temp but the function will also work if surf_temp is provided.

otm_splines

A nested tibble obtained using gen_otm_splines

coverage_per

A numeric between 0 - 1 indicating the minimum coverage that a tile should have across all flights provided in order to be included in the matching. Coverage is calculated as the number of times temperature was measured in a given tile divided by the total number of flights. Values >= 0.9 are recommended. The function will provide a warning of the numbeof tiles for which coverage is > 0.5. If missing, it defaults to 0.9

error_max

The maximum average absolute error between temperature measurements of a tile and an OTM that makes a match between a tile and OTM valid. Error is calculated as the average absolute value between the OTM prediction and the temperature measurements of the tile. If missing, it defaults to 100, a sufficiently large number so all tiles are assigned regardless of error.

Value

A matches data frame with columns for x, y (UTM coordinates), the otm_id that best describes the thermal dynamics of that tile and the average absolute error between tile measurements and OTM predictions. Rows where is.na(otm_id) indicate tiles where error was not

< error_max for any of the OTMs provided.