@@ -12,17 +12,20 @@ function ncsave_new(file, varname, A, sizeA, ncdims, compressLevel)
12
12
end
13
13
14
14
if isscalar(A )
15
- nccreate(file , varname , Datatype= class(A ), Format= ' netcdf4' )
15
+ nccreate(file , varname , ' Datatype' , class(A ), ' Format' , ' netcdf4' )
16
16
elseif isvector(A ) || ischar(A ) || isstring(A )
17
- nccreate(file , varname , Dimensions= ncdims , Datatype= class(A ), Format= ' netcdf4' )
17
+ nccreate(file , varname , ' Dimensions' , ncdims , ...
18
+ ' Datatype' , class(A ), ' Format' , ' netcdf4' )
18
19
elseif compressLevel
19
20
% enable Gzip compression
20
21
% Matlab's dim order is flipped from C / Python
21
- nccreate(file , varname , Dimensions= ncdims , Datatype= class(A ), Format= ' netcdf4' , ...
22
- DeflateLevel= compressLevel , Shuffle= true , ...
23
- ChunkSize= stdlib .auto_chunk_size(sizeA ))
22
+ nccreate(file , varname , ' Dimensions' , ncdims , ...
23
+ ' Datatype' , class(A ), ' Format' , ' netcdf4' , ...
24
+ ' DeflateLevel' , compressLevel , ' Shuffle' , true , ...
25
+ ' ChunkSize' , stdlib .auto_chunk_size(sizeA ))
24
26
else
25
- nccreate(file , varname , Dimensions= ncdims , Datatype= class(A ), Format= ' netcdf4' )
27
+ nccreate(file , varname , ' Dimensions' , ncdims , ...
28
+ ' Datatype' , class(A ), ' Format' , ' netcdf4' )
26
29
end
27
30
28
31
ncwrite(file , varname , A )
0 commit comments