I have downloaded 2 different netcdf4 files. Both of them are about the same area(domain) and have the same variables (temperature). What is different is the years that the data is gathered. For example the first one is from 1-1-1950 until 31-12-1980 and the second one is from 1-1-1981 until 31-12-2000. What I want is basically to add them together in one object so I can have the information from 1980 until 2000. I am using the xarray package and I found two commands : concat and merge. However I am not really sure which one to use and how (syntax-wise). The following links provides information for both methods
https://xarray.pydata.org/en/stable/generated/xarray.concat.html
https://xarray.pydata.org/en/stable/generated/xarray.merge.html#xarray.merge
For example if data1 is the information read from the 1st file and data2 from the second, how can I use one of those methods(and which one?). I think I should use concat but it is a bit confusing for me. It should be noted that the 3-d matrices (data1 and data2) have the following shape : (time, longitude, latitude) where longitude and latitude are of the same size. The only one that differs is time