All Questions
8
questions
1
vote
0
answers
34
views
All-NaN slice encountered when apply xr_phenology function?
I want calculate vegetation phenology from ndvi netcdf dataset, I follow yours tutorials (DEA Australia and DEA Africa) to apply xr_phenology
function , defined here. To avoid killed kernel of my ...
0
votes
0
answers
44
views
Change dtype of coordinates NetCDF
I was wondering how to change the dtype from float32 to float64 of coordinates.
I can run the following code in the terminal
ncap2 -s 'lat=double(lat); lon=double(lon)' infile.nc outfile.nc
How ever ...
0
votes
1
answer
596
views
Saving plot from .nc file without showing the plot
I am trying to save the sequence of plots of 24 hours of ERA5 data from .nc file without plotting them. I am using xarray for reading .nc data. Here is my code:
import xarray as xr
import matplotlib....
2
votes
1
answer
2k
views
How to change the dtype of a NetCDF variable and rewrite as a new NetCDF file
I was wondering how to change the dtype of precipitation from int16 to float64 in the following NetCDF file with these dimensions and variables, and rewrite it as new NetCDF file;
<class 'netCDF4....
2
votes
0
answers
847
views
Creating raster stack from xarray in Python
I am trying to create a raster stack from an xarray dataset which I obtained from multiple NetCDF files.
import netCDF4 as nc
import rasterio as rio
import numpy as np
import xarray as xr
import os
...
1
vote
1
answer
859
views
NetCDF hourly data to year raster layers (using Python)
Having a NetCDF with a 'time', 'lat' and 'lon' dimension, where time is hourly during a year and the variable to extract is temperature, how do I calculate mean temperature throughout the year using ...
1
vote
1
answer
282
views
Accessing Numpy Array found within an XArray from Satpy
dask.array<shape=(76, 76), dtype=float32, chunksize=(76, 76)>
Coordinates:
crs object +proj=utm +datum=WGS84 +ellps=WGS84 +no_defs +units=m +zone=33.0 +type=crs
* y (y) float64 ...
-1
votes
1
answer
2k
views
How to change Numpy array shape [closed]
I have an array (Numpy of shape (100, 256, 256). How can I change this to (100, 256, 256,3)?
I tried doing reshape but it doesn't work, Can anyone help me.