weecology / EvergladesWadingBird

Data from the Everglades breeding bird monitoring project
Creative Commons Zero v1.0 Universal
3 stars 3 forks source link

Add processed EDEN surface data for whole region and subregions #65

Closed ethanwhite closed 2 years ago

ethanwhite commented 2 years ago

One of the common correlates being used in the system is a variety of measurements based on the static and dynamic properties of water depth during the breeding season. These metrics typically use the EDEN interpolated surfaces, are calculated at the cell level, and are then averaged over the region of interest - either the entire study area or the sub regions within the study area.

We should add code for creating and dating these averages and store the average values for each season as a data product.

A good starting point for this is in creatingbird_vars.R at https://www.sciencebase.gov/catalog/item/5f76232382cef8d1839c689c

We will first need to process the quarterly water depth data at https://sflthredds.er.usgs.gov/thredds/catalog/eden/catalog.html into a single netCDF file at which point the code in creatingbird_vars.R provides a good template for the rest of the processing.

ethanwhite commented 2 years ago

I'm wondering if we want to start a small rEDEN package to drive this and other EDEN related work. The API (in the form of directory structure and info embedded in html tables) seems pretty good, simple, robust, we've had good experiences with the dev, etc. Just at UF there are lots of Everglades projects that engage with this data. Probably worth reaching out to the EDEN folks at some point.

I'm working on code to automate the download of all the *depth.nc files with a basic system for only downloading new files based on the last modified dates on the EDEN web pages.

ethanwhite commented 2 years ago

Working on this here: https://github.com/weecology/EvergladesWadingBird/tree/eden-surfaces

ethanwhite commented 2 years ago

@gmyenni or @skmorgane - do you know the difference between "surfaces" and "depths" (see https://sflthredds.er.usgs.gov/thredds/catalog/eden/catalog.html) and whether we want one or both?

This page - https://sofia.usgs.gov/eden/models/watersurfacemod_download.php - appears to provide "surfaces" based on the file names.

gmyenni commented 2 years ago

Surface is the elevation at water level, and depth is water elevation - ground elevation:

Water depth is calculated by subtracting the EDEN ground digital elevation model (DEM) from the predicted water surface. Water depth data is reported for above ground values only (i.e., "negative" water depth values are set to zero).

So surface is the closest product to the data. But depth is how much actual water there is, which may be more relevant, depending on how much ground elevation actually varies.

https://sofia.usgs.gov/eden/models/watersurfacemod.php#watersufacefiles

ethanwhite commented 2 years ago

Thanks @gmyenni. I also asked the USGS folks who I was emailing with about EverWaders and got the following response:

The data used here are water depths, not surfaces. Water surfaces are stage measurements, whereas the water depths are stage minus the elevation (with belowground depths converted to zeroes).

Since the water measures are generally related to prey availability predator barriers depth makes sense to me. For now I'll just pull the depth data, but it should be easy enough to generalize it to also pull surfaces if we want them.

ethanwhite commented 2 years ago

Core code is implemented here: https://github.com/weecology/wader/pull/4

@gmyenni - the goal now is to use that code to produce subregion and Everglades-wide averages and store them here for easy use.

gmyenni commented 2 years ago

@ethanwhite how does this look: Water/eden_covariates.csv

ethanwhite commented 2 years ago

Looks great!