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

Closed
Open
Created May 07, 2021 by Nikita Kovaloff@nk317845

Unexpected output when running tutorial


import kadlu
​
import numpy as np
from datetime import datetime
C:\Users\s2380\anaconda3\envs\kadlu_env\lib\site-packages\kadlu\geospatial\data_sources\data_util.py:44: UserWarning: storage location not configured. storage location will be set to C:\Users\s2380\kadlu_data\
  warnings.warn(f'{msg} storage location will be set to {storage_location}')
C:\Users\s2380\anaconda3\envs\kadlu_env\lib\site-packages\kadlu\geospatial\data_sources\data_util.py:44: UserWarning: storage location not configured. storage location will be set to C:\Users\s2380\kadlu_data\
  warnings.warn(f'{msg} storage location will be set to {storage_location}')
# ocean boundaries:
bounds = dict(
        start=datetime(2015, 1, 9), end=datetime(2015, 1, 9, 12),
        south=47.8, north=48.8, 
        west=-63.4, east=-61.8, 
        top=0, bottom=100
    )
bounds
bounds
{'start': datetime.datetime(2015, 1, 9, 0, 0),
 'end': datetime.datetime(2015, 1, 9, 12, 0),
 'south': 47.8,
 'north': 48.8,
 'west': -63.4,
 'east': -61.8,
 'top': 0,
 'bottom': 100}
 nul
o = kadlu.Ocean(**bounds) # instantiate ocean with null values
​
 o.bathy(lat=[48.5, 48.1], lon=[-63, -62.5]) # query bathymetric interpolator for values at given coordinates
array([0., 0.])
o = kadlu.Ocean(load_salinity='hycom', **bounds)               # instantiate interpolator with HYCOM salinity data
o.salinity(lat=[48.5, 48.1], lon=[-64, -62.5], depth=[0, 10])  # query interpolator for values at given coordinates
C:\Users\s2380\anaconda3\envs\kadlu_env\lib\site-packages\kadlu\geospatial\data_sources\data_util.py:44: UserWarning: storage location not configured. storage location will be set to C:\Users\s2380\kadlu_data\
  warnings.warn(f'{msg} storage location will be set to {storage_location}')
array([31.29669351, 31.44977994])
o.waveheight(lat=[48.5, 48.1], lon=[-64, -62.5]) # query waveheight interpolator: values remain null
array([0., 0.])
sources = dict(
    
        load_temp='hycom')
o = kadlu.Ocean(**sources, **bounds)
​
o
<kadlu.geospatial.ocean.Ocean at 0x267584ccee0>
o.waveheight(lat=[48.5, 48.1], lon=[-64, -62.5])  # query waveheight interpolator
array([0., 0.])
The expected output for the last line is: array([1.90879009, 2.17006324])
Edited May 07, 2021 by Matthew
To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information
Assignee
Assign to
Time tracking