Skip to content

Commit

Permalink
fix open_mfdataset for new axes
Browse files Browse the repository at this point in the history
  • Loading branch information
meggart committed Nov 28, 2024
1 parent cac79bf commit e13e918
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/DatasetAPI/Datasets.jl
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ using IntervalSets: Interval, (..)
using CFTime: timedecode, timeencode, DateTimeNoLeap, DateTime360Day, DateTimeAllLeap
using YAXArrayBase
using YAXArrayBase: iscontdimval, add_var
using DiskArrayTools: CFDiskArray, ConcatDiskArray
using DiskArrays: DiskArrays, GridChunks
using DiskArrayTools: CFDiskArray, diskstack
using DiskArrays: DiskArrays, GridChunks, ConcatDiskArray
using Glob: glob
using DimensionalData: DimensionalData as DD

Expand Down Expand Up @@ -341,7 +341,7 @@ function merge_new_axis(alldatasets, firstcube,var,mergedim)
newdim = DD.rebuild(mergedim,1:length(alldatasets))
alldiskarrays = map(ds->ds.cubes[var].data,alldatasets).data
newda = diskstack(alldiskarrays)
newdims = (DD.dim(firstcube)...,newdim)
newdims = (DD.dims(firstcube)...,newdim)
YAXArray(newdims,newda,deepcopy(firstcube.properties))
end
function merge_existing_axis(alldatasets,firstcube,var,mergedim)
Expand Down

0 comments on commit e13e918

Please sign in to comment.