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])
To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information