Replies: 4 comments
-
Hi @b-kode , thanks for the issue Please could you paste the stack trace? And if possible adjust the example so it can be pasted (check out GH formatting documentation if needed). Thanks |
Beta Was this translation helpful? Give feedback.
-
Hi @max-sixty, I have added the traceback. Thanks! |
Beta Was this translation helpful? Give feedback.
-
Hi all, I encountered the same problem when trying to save data from met.no's archived MEPS data on "https://thredds.met.no/thredds/dodsC/meps25epsarchive/" when trying to save the remote dataset as a local netCDF file. I found that it depends on the size of the dataset I want to save and it works fine up to about 5MB file size. Thus, my workaround is to chunk the data e.g. by selecting only one ensemble member at a time, save the chunk as a file to make sure everything is downloaded, then read in again and do dataset.merge() in order to get one netCDF file. It seems to me as if the problem could be solved by writing to hard disk in chunks. Hope this helps to find the root of this issue.... Thanks for opening this issue @b-kode! |
Beta Was this translation helpful? Give feedback.
-
Hi all, import xarray as xr
import pandas as pd
URL ='https://opendap.nccs.nasa.gov/dods/GEOS-5/fp/0.25_deg/assim/inst3_3d_asm_Np'
ds = xr.open_dataset(URL,engine='netcdf4')
var_ls = ['omega', 't', 'v', 'u']
lev_ls = [1000., 975., 950., 925., 900., 875., 850., 825., 800.,
775., 750., 700., 650., 600., 550., 500., 450., 400.,
350., 300., 275., 250., 225., 200., 175., 150., 125.,
100., 70., 50., 30., 10., 5.,3, 2, 1]
time_range = pd.date_range('2021-01-02T12', '2021-01-07', freq = '6H')
for sel_date in time_range:
ds_sel = ds[var_ls].sel(
time = sel_date,
lev = lev_ls,
method = 'nearest'
)
ouf_date=sel_date.strftime('%Y%m%d%H')
outfile = f'geos5_subset_{ouf_date}.nc'
print(outfile)
ds_sel.to_netcdf(outfile) [EDIT] It may have helped to add |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Hi all,
I am interested in extracting specific point and variable information from the GEOS-FC product, accessible via OpenDap.
Loading the data seems to work fine, and I can do some processing to my specific needs.
Ideally I would like to convert this selection to a dataframe, or if needed store as an intermediate file from which I can read again.
Yet when doing so, I get the following error: RuntimeError: NetCDF: DAP failure
I am not sure what is causing this? Perhaps I chunck the data in the wrong (inefficient) way? Or there is an error with the GEOS netcdf files? Or ...
Below a working code snippet.
Traceback error:
More info on my xarray installation:
commit: None
python: 3.6.9 (default, Jul 3 2019, 07:38:46)
[GCC 8.3.0]
python-bits: 64
OS: Linux
OS-release: 4.15.0-66-generic
machine: x86_64
processor: x86_64
byteorder: little
LC_ALL: en_US.UTF-8
LANG: en_GB.UTF-8
LOCALE: en_US.UTF-8
libhdf5: 1.10.4
libnetcdf: 4.6.3
xarray: 0.14.0
pandas: 0.25.2
numpy: 1.17.3
scipy: 1.3.1
netCDF4: 1.5.3
pydap: installed
h5netcdf: None
h5py: 2.9.0
Nio: None
zarr: 2.3.2
cftime: 1.0.4
nc_time_axis: None
PseudoNetCDF: None
rasterio: 1.0.28
cfgrib: None
iris: None
bottleneck: 1.2.1
dask: 0.16.0
distributed: None
matplotlib: 3.1.1
cartopy: 0.17.0
seaborn: 0.9.0
numbagg: None
setuptools: 41.4.0
pip: 9.0.1
conda: None
pytest: 5.2.1
IPython: 7.3.0
sphinx: 1.8.4
Beta Was this translation helpful? Give feedback.
All reactions