@@ -12,17 +12,20 @@ function ncsave_new(file, varname, A, sizeA, ncdims, compressLevel)
1212end
1313
1414if isscalar(A )
15- nccreate(file , varname , Datatype= class(A ), Format= ' netcdf4' )
15+ nccreate(file , varname , ' Datatype' , class(A ), ' Format' , ' netcdf4' )
1616elseif 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' )
1819elseif compressLevel
1920 % enable Gzip compression
2021 % 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 ))
2426else
25- nccreate(file , varname , Dimensions= ncdims , Datatype= class(A ), Format= ' netcdf4' )
27+ nccreate(file , varname , ' Dimensions' , ncdims , ...
28+ ' Datatype' , class(A ), ' Format' , ' netcdf4' )
2629end
2730
2831ncwrite(file , varname , A )
0 commit comments