# Read multi .nc files along new dimension

**URL:** <https://discourse.julialang.org/t/read-multi-nc-files-along-new-dimension/70696>\
**Category:** Geo\
**Created:** [October 31, 2021, 5:44pm UTC](https://discourse.julialang.org/t/read-multi-nc-files-along-new-dimension/70696 "2021-10-31T17:44:53Z")\
**Posts on this page:** 1\
**Showing post:** 8

<div class="post-metadata">

**Author:** ![Raf](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/raf/32/3383_2.png) [@Raf](https://discourse.julialang.org/u/Raf)\
**Post date:** [November 21, 2021, 9:45am UTC](https://discourse.julialang.org/t/read-multi-nc-files-along-new-dimension/70696/8 "2021-11-21T09:45:14Z")

</div>

Late to the party, but `RasterSeries` in [Rasters.jl](https://github.com/rafaqz/Rasters.jl) is designed for this use-case. Use the regex from @Fliks, then:

```julia
using Rasters
series = RasterSeries(filelist, Ti(timestamps))
# Retreive something
series[Ti=At(DateTime(2001, 1, 1)]

```

If you need to join the files into a single `Raster` variable with a time dimension, use `Rasters.combine`:

```julia
combined_raster = combine(series, Ti)
write("combined.nc", combined_raster)

```

You can do the same thing with a series of `tif` or whatever, and still `write` to netcdf.

---

_[View the full topic](https://discourse.julialang.org/t/read-multi-nc-files-along-new-dimension/70696)._
