Skip to content

Commit

Permalink
BUGFIX: Fixing SMAP notebook with new coordinates and renaming coordi…
Browse files Browse the repository at this point in the history
…nate.py to coordinates.py for the user API to match the developer API.

* Also removing cache_native_coordinates as a attributes of Compositor nodes
  • Loading branch information
mpu-creare committed Oct 12, 2018
1 parent 2c9c215 commit 76c1850
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 9 deletions.
16 changes: 9 additions & 7 deletions doc/notebooks/SMAP-level4-data-access.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,9 @@
"# dim = value\n",
"time = '2018-05-19T12:00:00'\n",
"\n",
"c_world = podpac.Coordinates.grid(lat=lat, lon=lon, time=time, order=['lat', 'lon', 'time'])\n",
"c_world = podpac.Coordinates([podpac.crange(*lat),\n",
" podpac.crange(*lon),\n",
" time], dims=['lat', 'lon', 'time'])\n",
"o = sm.execute(c_world)\n",
"figure()\n",
"o.plot(cmap='gist_earth_r')\n",
Expand Down Expand Up @@ -205,10 +207,10 @@
"outputs": [],
"source": [
"import pydap.client\n",
"# The user needs to know/construct this url. Note the version number Vv3030_001 may change unexpectedly\n",
"# The user needs to know/construct this url. Note the version number Vv4030_001 may change unexpectedly\n",
"source = ('https://n5eil01u.ecs.nsidc.org:443/opendap'\n",
" '/SMAP/SPL4SMAU.004/2018.05.19'\n",
" '/SMAP_L4_SM_aup_20180519T120000_Vv4011_001.h5')\n",
" '/SMAP_L4_SM_aup_20180519T120000_Vv4030_001.h5')\n",
"# This line is needed for an initial authentication\n",
"auth_session.get(source + '.dds') \n",
"dataset = pydap.client.open_url(source, session=auth_session)\n",
Expand Down Expand Up @@ -448,10 +450,10 @@
},
"outputs": [],
"source": [
"bbox = podpac.Coordinates.grid(#dim=(start, stop, number)\n",
" lat=( 49, 25, 2),\n",
" lon=( -126, -66, 2),\n",
" order=['lat', 'lon']\n",
"bbox = podpac.Coordinates([ # (start, stop, number)\n",
" podpac.clinspace( 49, 25, 2), # lat\n",
" podpac.clinspace( -126, -66, 2), # lon\n",
" ], dims=['lat', 'lon']\n",
")"
]
},
Expand Down
File renamed without changes.
4 changes: 2 additions & 2 deletions podpac/core/compositor.py
Original file line number Diff line number Diff line change
Expand Up @@ -65,11 +65,11 @@ class Compositor(Node):
is_source_coordinates_complete = tl.Bool(False,
help=("This allows some optimizations but assumes that a node's "
"native_coordinates=source_coordinate + shared_coordinate "
"IN THAT ORDER")).tag(attr=True)
"IN THAT ORDER"))

source = tl.Unicode().tag(attr=True)
sources = tl.Instance(np.ndarray)
cache_native_coordinates = tl.Bool(True).tag(attr=True)
cache_native_coordinates = tl.Bool(True)

interpolation = tl.Unicode('').tag(attr=True)

Expand Down

0 comments on commit 76c1850

Please sign in to comment.