NASA-Openscapes / earthdata-cloud-cookbook

A tutorial book of workflows for research using NASA EarthData in the Cloud created by the NASA-Openscapes team
https://nasa-openscapes.github.io/earthdata-cloud-cookbook
Other
85 stars 30 forks source link

Update hvplot cell in Single_File__Direct_S3_Access_NetCDF4_Example.ipynb #140

Closed rsignell-usgs closed 2 years ago

rsignell-usgs commented 2 years ago

https://github.com/NASA-Openscapes/earthdata-cloud-cookbook/blob/main/how-tos/access/Single-File_Direct_S3_Access_NetCDF_Example.ipynb

The hvplot Cell [10] bombed for me with an indexing error:

---------------------------------------------------------------------------
IndexError                                Traceback (most recent call last)
Input In [10], in <cell line: 1>()
----> 1 ssh_da.hvplot.image(x='longitude', y='latitude', cmap='Spectral_r', aspect='equal').opts(clim=(ssh_da.attrs['valid_min'][0],ssh_da.attrs['valid_max'][0]))

IndexError: invalid index to scalar variable.

I suggest this as a nicer hvplot command for this data:

ssh_da.hvplot.image(x='longitude', y='latitude', cmap='Spectral_r', geo=True, tiles='ESRI', global_extent=True)

which produces: 2022-08-09_12-57-14