-
Notifications
You must be signed in to change notification settings - Fork 168
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Order of dimensions #504
Comments
You can rename a netCDF dimension with xarray.rename() function, e.g. If you need to change the ordering of dimensions, you can use xarray.transpose() e.g. |
As @bradleyswilson alludes to above you can leverage |
I am now able to change the order of dimension of the input file and save it. The problem was arising because the file was too big, almost 7GB. I was using CHIRPS rainfall dataset. I checked using CRU rainfall dataset and I am able to change my input file. Thank you @bradleyswilson @monocongo |
To do an automatic conversion, I usually add these lines after every update: In _compute_write_index ( main.py ) `dataset = xr.open_mfdataset(list(set(files)), chunks=chunks)
` And in _prepare_file ( main.py ) ` ds = xr.open_dataset(netcdf_file)
` |
One more that is unrelated: I usually have to change pet in indices.py From: To: |
Thanks for helping @maxxpower007 ! The common fixes you outlined above might be useful for all users -- maybe we should roll these into the main processing script? One limitation, for now, is that there are no proper tests for the main processing script, so harder to be sure we've not broken something if we add code willy-nilly. |
Sir kindly tell, how to change the name and order of dimension of NETCDF file. I am using chirps dataset and my dimension name is latitude, I am unable to change it to lat and that is raising error. I have tried using ncpdq in Conda prompt for correct order of dimensions but that is raising error related to size of the internal memory.
The text was updated successfully, but these errors were encountered: