Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
brunj7 opened this issue Jan 11, 2023 · 7 comments
Open

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

brunj7 opened this issue Jan 11, 2023 · 7 comments
Assignees
Labels
Habitat Habitat subproject

Comments

@brunj7
Copy link
Collaborator

brunj7 commented Jan 11, 2023

@brunj7 brunj7 self-assigned this Jan 11, 2023
@brunj7 brunj7 added the Habitat Habitat subproject label Jan 12, 2023
@brunj7
Copy link
Collaborator Author

brunj7 commented Jan 12, 2023

@brunj7
Copy link
Collaborator Author

brunj7 commented Jan 18, 2023

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
Copy link
Collaborator Author

brunj7 commented Jan 18, 2023

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
Copy link
Collaborator Author

brunj7 commented Jan 19, 2023

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
Copy link
Collaborator Author

brunj7 commented Mar 16, 2023

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
Copy link
Collaborator Author

brunj7 commented Mar 16, 2023

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
Copy link
Collaborator Author

brunj7 commented Mar 16, 2023

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"

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Habitat Habitat subproject
Projects
None yet
Development

No branches or pull requests

1 participant