@@ -652,8 +652,10 @@ function createdataset(DS::Type,axlist; kwargs...)
652652 * `persist::Bool=true` shall the disk data be garbage-collected when the cube goes out of scope?
653653 * `overwrite::Bool=false` overwrite cube if it already exists
654654 * `properties=Dict{String,Any}()` additional cube properties
655+ * `globalproperties=Dict{String,Any}` global attributes to be added to the dataset
655656 * `fillvalue= T>:Missing ? defaultfillval(Base.nonmissingtype(T)) : nothing` fill value
656657 * `datasetaxis="Variable"` special treatment of a categorical axis that gets written into separate zarr arrays
658+ * `layername="layer"` Fallback name of the variable stored in the dataset if no `datasetaxis` is found
657659 """
658660function createdataset (
659661 DS,
@@ -665,7 +667,9 @@ function createdataset(
665667 chunkoffset = ntuple (i -> 0 , length (axlist)),
666668 overwrite:: Bool = false ,
667669 properties = Dict {String,Any} (),
670+ globalproperties = Dict {String,Any} (),
668671 datasetaxis = " Variable" ,
672+ layername = " layer" ,
669673 kwargs... ,
670674)
671675 if persist === nothing
@@ -698,7 +702,7 @@ function createdataset(
698702 end
699703 end
700704 if groupaxis === nothing
701- cubenames = [" layer " ]
705+ cubenames = [layername ]
702706 else
703707 cubenames = DD. lookup (groupaxis)
704708 end
@@ -712,7 +716,7 @@ function createdataset(
712716 dshandle = YAXArrayBase. create_dataset (
713717 DS,
714718 path,
715- Dict {String,Any} () ,
719+ globalproperties ,
716720 string .(getproperty .(axdata,:name )),
717721 getproperty .(axdata,:data ),
718722 getproperty .(axdata,:attrs ),
0 commit comments