I have converted several raster files into NetCDF file using ArcMap10.5. Now I want to open netcdf file in python 3.6.
%matplotlib inline
import numpy as np
import matplotlib.pyplot as plt
import pandas as pd
import netCDF4
import xarray as xr
import h5py
import glob
allfiles = glob.glob('\folder*.nc')
for file in allfiles:
file = xr.open_dataset(file).to_dataframe()
list_of_dfs.append(file)
print(file)
Getting following error:
SError: [Errno -101] NetCDF: HDF error:'file.nc'
I tried Setting environmental variable HDF5_USE_FILE_LOCKING=FALSE as suggested here But, still getting that error. Is there anyone who can help? Thanks