Skip to content

GitLab

  • Menu
Projects Groups Snippets
    • Loading...
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
  • kadlu kadlu
  • Project information
    • Project information
    • Activity
    • Labels
    • Planning hierarchy
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 17
    • Issues 17
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 0
    • Merge requests 0
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • public_projects
  • kadlukadlu
  • Issues
  • #79

Closed
Open
Created Mar 08, 2021 by Jillian Anderson@jilliana

Potential Data Source -- NEMO from SalishSeaCast

NEMO & SalishSeaCast Data

As we have spoken about in some of our recent meetings, I've been working on integrating data from the SalishSeaCast with the Northern Strait of Georgia (NSOG) range test data we have. In particular, I have been using the hindcast data from the NEMO v19-05 model. This data is stored in the datasets labelled as "Green, Salish Sea,..." on ERDDAP server's griddap page.

Adding support for this dataset to kadlu could prove to lead to the easy addition of other ERDDAP servers, since many (from my data scouring over the last couple months) appear to have the same quirks.

Determining Bounds

The one trick I encountered is that these environmental data are indexed by gridX & gridY coordinates, rather than longitude / latitude. This was a problem, since the bounds we have been using to access data in kadlu, etc all use lon/lat. So, to figure out what the grid boundaries should be, I first needed to download the geolocation & bathymetry dataset. This dataset provides the mapping from (gridX, gridY) to (longitude, latitude). Using this, I was able to find the gridX & gridY ranges (and even maximum depth) that I could use to query the ERDDAP data servers.

Downloading Data

Once you know the bounds you want to use, accessing the data is relatively easy. The simplest way is to programmatically construct the data URL for each variable and download the data directly from the server.

Once it's downloaded, you can load it into an xarray (assuming you are downloading NetCDF files), add in lon/lat coordinates by inner-merging with the bathymetry data, and then save that to disk. I've been saving to NetCDF files, b/c that fits with the rest of the range-driver pipeline, but it could obviously be saved to a database instead.

Jupyter Notebook

Also, I've attached the Jupyter Notebook I have been using to download the data. It's pretty bare bones and doesn't do a good job of handling the errors that can come from the ERDDAP servers (e.g. specifying depth bounds when variable doesn't have it, or 502 errors), but it should give an idea of what the download process looks like.

NEMO_Data_Collection.ipynb

Edited Mar 08, 2021 by Jillian Anderson
To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information
Assignee
Assign to
Time tracking