I am using netCDF4 and python 3.4.
I run the following line of code in order to start writing a new netCDF file that I will be filling with data later in my code following netcdf4 documentation. I however keep getting this error...
File "netCDF4.pyx", line 1466, in netCDF4.Dataset.__init__ (netCDF4.c:19692) RuntimeError: Permission denied
from netCDF4 import Dataset
rootgrp = Dataset('test.nc', 'w', format='NETCDF4')
Any help will be most appreciated.
The "Permission denied" part of the error leads me to believe you don't have permissions to write to the current directory (wherever you are when you run your script).
Check your permissions and/or try giving a full path to put the file in a directory you know you can write to.
dataset.close()
or close ide and delete file 'netCDF4.pyx'
maybe a file exist there, so can't write it.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With