This R script calculates environmental distance (Keller et al. 2011) between MEOW ecoregions and ecoprovinces (Spalding et al. 2007) from World Ocean Atlas temperature/salinity data (WOA 2018). For each month, the script averages data into three depth intervals. It calculates minimum, maximum, and mean annual temperature and salinity for the three depth intervals, and applies a generalized linear model.