pydata / xarray

N-D labeled arrays and datasets in Python
https://xarray.dev
Apache License 2.0
3.61k stars 1.08k forks source link

Zeros on longitude variable #3347

Open hevgyrt opened 5 years ago

hevgyrt commented 5 years ago

MCVE Code Sample

# Your code here

Expected Output

Problem Description

Output of xr.show_versions()

# Paste the output here xr.show_versions() here
hevgyrt commented 5 years ago

Hi,

I would like to use xarray for our Copernicus Sentinel-2 data in satellittdata.no which are in NetCDF-4/CF. However, the longitude variable gives a lot of zeros when using xarray, but the correct values using netCDF4 Dataset reader:

ncin_s2 = xa.open_dataset('http://nbstds.met.no/thredds/dodsC/NBS/S2A/2019/08/27/S2A_MSIL1C_20190827T123701_N0208_R095_T39XVL_20190827T143509.nc')

Screenshot from 2019-09-26 21-00-31

Reading using OPeNDAP.

dcherian commented 5 years ago

That URL doesn't seem to work: http://nbstds.met.no/thredds/dodsC/NBS/S2A/2019/08/27/S2A_MSIL1C_20190827T123701_N0208_R095_T39XVL_20190827T143509.nc

hevgyrt commented 5 years ago

It is an OPeNDAP URL. If you add ".html" or ".dds" you should get some information in a web browser. xarray and netCDF4 reads the url as given..

tor. 26. sep. 2019 kl. 21:06 skrev Deepak Cherian <notifications@github.com

:

That URL doesn't seem to work: http://nbstds.met.no/thredds/dodsC/NBS/S2A/2019/08/27/S2A_MSIL1C_20190827T123701_N0208_R095_T39XVL_20190827T143509.nc

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/pydata/xarray/issues/3347?email_source=notifications&email_token=AF7PQWQ2PDJLPNCOYCGDIADQLUB2NA5CNFSM4I25ZB6KYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOD7WUNWY#issuecomment-535643867, or mute the thread https://github.com/notifications/unsubscribe-auth/AF7PQWTVCNZH3XGGBYX7D5DQLUB2NANCNFSM4I25ZB6A .

stale[bot] commented 3 years ago

In order to maintain a list of currently relevant issues, we mark issues as stale after a period of inactivity

If this issue remains relevant, please comment here or remove the stale label; otherwise it will be marked as closed automatically