I have a netcdf file that is structured with precipitation grid values with dimensions (time, x, y)
When I perform gdal.warp (in python if that matters) I get a new file that has multiple bands that have dimensions (x, y), with the number of bands = len(time) of the previous file and time is not part of the new file.
Is there a way to preserve the dimensions, precipitation name, and time in the new file?
import gdal
warped = gdal.Warp(
destNameOrDestDS=destNameOrDestDS,
srcDSOrSrcDSTab=srcDSOrSrcDSTab,
srcSRS=srcSRS,
dstSRS=dstSRS,
dstNodata=float(srcNodata),
format="NETCDF",
xRes=xRes,
yRes=yRes,
targetAlignedPixels=targetAlignedPixels,
)
So my source netcdf file looks like:
- crs
- QPE
- time
- x
- y
- z
where crs is the coordinate system and QPE is precipitation and then my output looks like:
- Albers
- Band1
- Band2
- Band3
- x
- y
I would like to preserve the original structure so combine the Bands into a single 3 dimensional array with time as the 3rd dimension.