Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save hot007/2e482b951603670f24ee03b4e7de4b9f to your computer and use it in GitHub Desktop.
Save hot007/2e482b951603670f24ee03b4e7de4b9f to your computer and use it in GitHub Desktop.
Display the source blob
Display the rendered blob
Raw
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@hot007
Copy link
Author

hot007 commented Apr 28, 2021

Note that the input netCDF data contains a "scale factor", which for significant wave height hs is 0.002. Xarray is netCDF-aware and knows what to do with this, which is why when we plot the data it comes out in the range 0-2.5m.
It may be possible to do area extraction not only point, I recommend point here to avoid hitting THREDDS server limits. It's fine to experiment with area extraction but unintuitive errors may result.
Although I ran this on an HPC interactive node, this code could be executed on a laptop and it shouldn't take much longer - we're not taking advantage of the HPC here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment