aaronchrist / RLKI-Geolocator

various bits n bobs for coding
GNU General Public License v3.0
1 stars 0 forks source link

Streamline and organize environmental var extraction code #1

Open abfleishman opened 5 years ago

abfleishman commented 5 years ago

Find and organize code that attaches env vars to tracks. Currently, we have currents, eke, sst, ssh, dist to ice edge, depth, bottom slope, bottom roughness, distance to 200m isobath, distance to shore (does not have all the small islands)

abfleishman commented 5 years ago

@briedrummond @aaronchrist This is the blurb I have about the methods for the environmental variables from the thesis manuscript: Ocean Habitat – Data Sources To characterize oceanographic habitats, we used remotely-sensed environmental variables. Sea surface height above geode (ssh) and current velocity vectors (uo = west-east, vo = south-north) were downloaded from the Mercator Operational 1/12° Global Ocean Physics and Analysis Dataset available through the EU Copernicus Marine Environment Monitoring Service (http://marine.copernicus.eu/). Eddy kinetic energy (eke) was calculated from the current vectors as: eke = 1/2(vo^2+uo^2) where vo and uo and current vectors in the south/north and west/east directions. Sea surface temperature (sst) was downloaded from the NOAA High-resolution Blended Analysis of Daily SST and Ice dataset (Reynolds et al. 2007) and bathymetry (depth) was downloaded from the NOAA ETOPO1 dataset (Amante & Eakins 2009). Gradients of sea surface temperature (sst_g), sea surface height (ssh_g), bottom slope (slope) and bathymetric position index (BPI) were calculated using the ‘terrain’ function from the r package ‘raster’ with 8 neighbors (3 x 3 cell moving window; Horn 1981). We calculated the distance from each location to the shelf break (200 m isobath) and the distance to the closest ice edge (Multisensor Analyzed Sea Ice Extent – Northern Hemisphere (MASIE-NH) 4km, Version 1; Fetterer et al., 2010). Each dataset was standardized to the coarsest common spatial resolution shared by all data layers by resampling to a 0.25° grid. All dynamic habitat variables had a temporal resolution of one day. We calculated the mean value for each habitat variable within a 185 km radius buffer around each location.

abfleishman commented 5 years ago

I am having issues getting the same dataset for EKE, SSH, and currents in the same format as the existing data. I have opened a help ticket with Copernicus but I have not heard anything back yet. I will need to see if I can transform the new format to match the old format before I can move on.

abfleishman commented 5 years ago

Breakthrough! I have finally figured out how to transform the data into the same format for the code that I have to attach env vars. So I now I have SST, SSH, EKE, currents, bathymetry, bottom slope, bathymetric position index, bottom aspect, and I am currently working on getting the sea ice working. My collection of sea ice shapefiles were corrupted and I am redownloading them. I hope to finish this weekend. I am also now trying to attach wind vectors and significant wave height from the ERA5 reanalysis, but the data are very high resolution (hourly) and will take significant manipulation before they are ready for attaching to the tracks.

abfleishman commented 5 years ago

here are the following columns: sst = sea surface temperature sst_g = sea surface temperature gradient ssh = sea surface height ssh_g = sea surface height gradient eke = eddy kinetic energy uo = current in the east-west vo = current in the north-south Depth = depth in m Aspect = bottom slope aspect Slope = bottom slope BPI = bathymetric position index dist2ice = distance to the nearest ice edge dist2shore = distance to the nearest major shoreline (large islands and continents) dist2shelf = distance to nearest continental shelf (200m isobath)