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
  • #59

Closed
Open
Created Apr 07, 2020 by Oliver Kirsebom@kirsebomOwner

Problem when attempting to initialize Ocean for small region

When I attempt to initialize Ocean for small region, I get an error, if the region does not contain any data. For example, running the below script

from datetime import datetime
from kadlu.geospatial.ocean import Ocean

bounds = dict(
               south=43.5, north=43.6, west=-59.8, east=-59.7,
               start=datetime(2015,1,1), end=datetime(2015,1,2), 
               top=0, bottom=10000
             )
data_sources = dict(load_temp='hycom', load_windspeed='wwiii')
gully = Ocean(**bounds, **data_sources)

results in this error message,

WWIII 2015-01-01 windU: processed and inserted 0 rows. 654921 null values removed, 1360359 duplicates ignored
WWIII 2015-01-01 windV: processed and inserted 0 rows. 654921 null values removed, 1360359 duplicates ignored
Traceback (most recent call last):
  File "test_kadlu.py", line 23, in <module>
    gully = Ocean(**bounds2, **data_sources)
  File "/home/oliskir/src/anaconda3/envs/kadlu_env/lib/python3.7/site-packages/kadlu/geospatial/ocean.py", line 204, in __init__
    for i in interpolations: i.start()
  File "/home/oliskir/src/anaconda3/envs/kadlu_env/lib/python3.7/site-packages/kadlu/geospatial/ocean.py", line 192, in <genexpr>
    columns = (fcn(v=v, data=data, **kwargs) for fcn, v in pipe)
  File "/home/oliskir/src/anaconda3/envs/kadlu_env/lib/python3.7/site-packages/kadlu/geospatial/data_sources/wwiii.py", line 235, in load_wind_uv
    wind_u, lat, lon, epoch, _, wind_v, _, _, _, _ = np.array(db.fetchall()).T
ValueError: not enough values to unpack (expected 10, got 0)

How should we resolve this?

To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information
Assignee
Assign to
Time tracking