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
  • Merge requests
  • !37

Merged
Created Mar 05, 2020 by Oliver Kirsebom@kirsebomOwner

WIP : review of ocean module

  • Overview 5
  • Commits 5
  • Pipelines 4
  • Changes 4

Hi @matt_s , I am in the progress of reviewing the ocean module tutorial.

Came upon a minor bug in the bathy_xy method, which I've fixed.

However, when attempting to run the cell

o = Ocean(load_salinity='hycom', **bounds)                     # instantiate interpolator with HYCOM salinity data
o.salinity(lat=[47.5, 48.1], lon=[-64, -62.5], depth=[0, 10])  # query interpolator for values at given coordinates

I get the following warnings,

/home/oliskir/src/anaconda3/envs/kadlu_env/lib/python3.6/site-packages/scipy/interpolate/interpolate.py:2537: RuntimeWarning: divide by zero encountered in true_divide
  (grid[i + 1] - grid[i]))
/home/oliskir/src/anaconda3/envs/kadlu_env/lib/python3.6/site-packages/scipy/interpolate/interpolate.py:2537: RuntimeWarning: invalid value encountered in true_divide
  (grid[i + 1] - grid[i]))
/home/oliskir/src/anaconda3/envs/kadlu_env/lib/python3.6/site-packages/scipy/interpolate/interpolate.py:2515: RuntimeWarning: invalid value encountered in add
  values += np.asarray(self.values[edge_indices]) * weight[vslice]

and the result,

array([nan, nan])

Can you reproduce this error at your end?

Also, this reminded me of another issue we've touched previously: Do we want the bathy and bathy_xy methods to return depth (positive) or elevation (negative)? Per discussion with Casey, I think we agreed elevation (i.e. negative values) was more natural ...

Assignee
Assign to
Reviewer
Request review from
Time tracking
Source branch: review_ocean_tutorial