spestana / goes-ortho

Functions for downloading GOES-R ABI imagery, orthorectifying with a DEM, creating timeseries for a single point from a stack of ABI images
https://spestana.github.io/goes-ortho/
GNU General Public License v3.0
13 stars 4 forks source link

TypeError in make_ortho_map #16

Closed ManuelSalvoldi closed 1 year ago

ManuelSalvoldi commented 1 year ago

I run the example "orthorectify_abi_example.ipynb" and in the function "make_ortho_map", I got an error after these lines: ds = xr.Dataset({
'elevation': (['latitude', 'longitude'], dem.values) },

                coords={'longitude':  (['longitude'], dem.x),
                        'latitude':   (['latitude'], dem.y),
                        'dem_px_angle_x':     (['latitude', 'longitude'],  abi_grid_x),
                        'dem_px_angle_y':     (['latitude', 'longitude'],  abi_grid_y)},

                attrs=metadata)

the error is: TypeError: Using a DataArray object to construct a variable is ambiguous, please extract the data using the .data property.

I used the dem2.tif inside the "dem" directory and the same GOES files (2020_063) of the example.

ManuelSalvoldi commented 1 year ago

I solved this problem with downgrade xarray to 0.18.2.