NCEAS / ca-mpa

OPC California MPA project
3 stars 0 forks source link

Look into how to best download the wave energy data #8

Open brunj7 opened 1 year ago

brunj7 commented 1 year ago

We want to download this data set:

https://maps.nrel.gov/marine-energy-atlas/data-library/layers

API information: https://registry.opendata.aws/wpto-pds-us-wave/ https://developer.nrel.gov/docs/solar/nsrdb/guide/

References using this data: https://www.sciencedirect.com/science/article/pii/S0964569122002186#fig2 https://doi.org/10.1371/journal.pbio.3001195

brunj7 commented 1 year ago

This looks promising: https://github.com/openEDI/documentation/blob/main/US_Wave.md

brunj7 commented 1 year ago

Can not make the examples run. I can get the metadata but not access the data. I filed an issue and we will see if I get an answer from them

brunj7 commented 1 year ago

From this page you can download the full data: https://registry.opendata.aws/wpto-pds-us-wave/ and just the west coast at the time

brunj7 commented 1 year ago

The data have been downloaded on Aurora for the entire west coast.

/home/shares/ca-mpa/data/wave_energy

This is the bash script I developed: https://github.com/NCEAS/ca-mpa/blob/main/data/wave_energy/download_water_power.sh

This can be of interest to manipulate h5 files from R: https://www.neonscience.org/resources/learning-hub/tutorials/hdf5-intro-r

brunj7 commented 1 year ago

Developed a script that process the omni directional wave power and computes annual means as well as the mean over the timespan 2000-2010.

https://github.com/NCEAS/ca-mpa/blob/main/analyses/7habitat/code/wave_energy_data.R

Some values seem either too high and some are below zero, so further QA/QC is needed with the challenge that we need to better understand the plausible range

brunj7 commented 1 year ago

From the map on their website, they use a range from < 4 to 60 > kW/m => also need to check the unit of the raw data

brunj7 commented 1 year ago

Find how to query the metadata of the layer: we have W/m for the data so a factor 1000 with the map on the website kW/m

# Query the metadta
wave_power_met <- rhdf5::h5readAttributes(file = file.path(data_dir, "West_Coast_wave_2000.h5"), 
                 name = "omni-directional_wave_power")

# get the units
wave_power_met$units
#> "W/m"