I am trying to create a time series object from extracted climate data (NEX-GDDP) using the Google Earth Engine (GEE). The data is daily meteorological data, and in the attached file, the data for January, 2005, is collected over an area of interest. The images from GEE are stored in the GeoTIFF as bands (numbered 1-31), and now I am struggling to get these individual bands into a dataset, and add a time dimension to the file. GEE will not export for more than ten years, so my idea is to create yearly files, which, when saved locally, will be merged (concatenated) on the lat/lon and time dimensions.
I am using Python in a Windows environment, so I am a bit limited (for example, I can't use cdo as this is a Linux based library), and I think that what I would like to do is possible with xarray, but I am missing the (learning) resources to solve this problem with code.
The image shows the xarray view of the metadata: https://i.stack.imgur.com/odWZK.png
Showing one band with Test data Missing the time dimension: https://i.stack.imgur.com/MIp4I.png
Can you provide any link to a training module on NetCDF?
import rioxarray as rxr test = rxr.open_rasterio(filename, masked=True) test xarray.DataArrayband: 31y: 15x: 13 array([[[296.5076 , 296.37006, ..., 295.75443, 295.6565 ], [296.3718 , 295.8929 , ..., 295.39032, 294.9773 ], ..., [295.55945, 295.2863 , ..., 294.49417, 293.64276], [295.90247, 295.60196, ..., 294.41473, 292.2122 ]], [[296.21115, 295.9582 , ..., 295.90155, 295.75537], [296.14667, 295.56586, ..., 295.54822, 295.10535], ..., [295.1618 , 294.9685 , ..., 294.12482, 293.33273], [295.4936 , 295.26575, ..., 293.999 , 291.8243 ]], ...,
To work in the next step of my process, e.g. the concatenating of the other months/years, and later to analyse the data, the structure should be (I think):
dimensions: lat, lon, and time, and
data variable: temperature (or precipitation)
time would start at 01/01/1950 and goes until 31/12/2005