From c6dbbc4c6ff8519d442a7f155e20cc917a418e71 Mon Sep 17 00:00:00 2001 From: Dennis Heimbigner Date: Tue, 3 Dec 2024 16:56:56 -0700 Subject: [PATCH] ckp --- libdispatch/dinstance_intern.c | 39 ++++++++++------ libnczarr/Makefile.am | 1 + libnczarr/zarr.h | 2 +- libnczarr/zattr.c | 9 ++-- libnczarr/zfill.c | 66 --------------------------- libnczarr/zformat2.c | 19 +++----- libnczarr/zinternal.c | 4 +- libnczarr/zinternal.h | 1 - libnczarr/zsync.c | 16 ++----- libnczarr/zutil.c | 3 +- libnczarr/zvar.c | 1 + nczarr_test/ref_nulls_nczarr.baseline | 2 +- nczarr_test/ref_nulls_zarr.baseline | 2 +- nczarr_test/test_quantize.c | 1 + 14 files changed, 49 insertions(+), 117 deletions(-) diff --git a/libdispatch/dinstance_intern.c b/libdispatch/dinstance_intern.c index edcd1ec890..6a4477e23e 100644 --- a/libdispatch/dinstance_intern.c +++ b/libdispatch/dinstance_intern.c @@ -20,6 +20,7 @@ Currently two operations are defined: #include "nc4dispatch.h" #include "ncoffsets.h" #include "ncbytes.h" +#include "nclog.h" #undef REPORT #undef DEBUG @@ -76,8 +77,11 @@ NC_reclaim_data(NC* nc, nc_type xtype, void* memory, size_t count) NC_TYPE_INFO_T* utype = NULL; assert(nc != NULL); - assert((memory == NULL && count == 0) || (memory != NULL || count > 0)); + /* If memory is NULL, ignore count */ + assert(memory == NULL || (memory != NULL && count > 0)); + if(memory == NULL) goto done; + /* Process atomic types */ /* Optimize: Vector of fixed size atomic types (always the case for netcdf-3)*/ @@ -118,7 +122,7 @@ NC_reclaim_data(NC* nc, nc_type xtype, void* memory, size_t count) #endif done: - return stat; + return NCTHROW(stat); } #ifdef USE_NETCDF4 @@ -128,7 +132,8 @@ NC_reclaim_data(NC* nc, nc_type xtype, void* memory, size_t count) static int reclaim_datar(NC_FILE_INFO_T* file, NC_TYPE_INFO_T* utype, Position instance) { - int i,stat = NC_NOERR; + int stat = NC_NOERR; + int i; nc_type basetypeid; NC_TYPE_INFO_T* basetype = NULL; size_t nfields; @@ -154,7 +159,7 @@ reclaim_datar(NC_FILE_INFO_T* file, NC_TYPE_INFO_T* utype, Position instance) if(basetypeid == NC_STRING) { if(vlen->len > 0 && vlen->p != NULL) { char** slist = (char**)vlen->p; /* vlen instance is a vector of string pointers */ - for(i=0;ilen;i++) {if(slist[i] != NULL) {free(slist[i]);slist[i] = NULL;}} + for(i=0;i<(int)vlen->len;i++) {if(slist[i] != NULL) {free(slist[i]);slist[i] = NULL;}} } goto out; } @@ -167,7 +172,7 @@ reclaim_datar(NC_FILE_INFO_T* file, NC_TYPE_INFO_T* utype, Position instance) if((stat = NC_type_alignment_internal(file,basetypeid,basetype,&alignment))) goto done;; vinstance.memory = (char*)vlen->p; /* use char* so we can do pointer arithmetic */ vinstance.memory = (void*)NC_read_align((uintptr_t)vinstance.memory,alignment); - for(i=0;ilen;i++) { + for(i=0;i<(int)vlen->len;i++) { if((stat=reclaim_datar(file,basetype,vinstance))) goto done; /* reclaim one basetype instance */ vinstance.memory += basetype->size; /* move to next base instance */ } @@ -217,7 +222,7 @@ reclaim_datar(NC_FILE_INFO_T* file, NC_TYPE_INFO_T* utype, Position instance) } else {stat = NC_EBADTYPE; goto done;} done: - return stat; + return NCTHROW(stat); } #endif @@ -323,7 +328,7 @@ NC_copy_data(NC* nc, nc_type xtype, const void* memory, size_t count, void* copy #endif done: - return stat; + return NCTHROW(stat); } #ifdef USE_NETCDF4 @@ -380,7 +385,7 @@ copy_datar(NC_FILE_INFO_T* file, NC_TYPE_INFO_T* utype, Position src, Position d char** dststrvec = NULL; if((dststrvec = (void*)malloc(copycount))==NULL) {stat = NC_ENOMEM; goto done;} dstvlens->p = (void*)dststrvec; - for(i=0;ilen;i++) { + for(i=0;i<(int)srcvlens->len;i++) { if((dststrvec[i] = strdup(srcstrvec[i]))==NULL) {stat = NC_ENOMEM; goto done;} } goto done; @@ -406,7 +411,7 @@ copy_datar(NC_FILE_INFO_T* file, NC_TYPE_INFO_T* utype, Position src, Position d dstvlens->p = vdst.memory; /* don't lose it */ vsrc.memory = (void*)NC_read_align((uintptr_t)vsrc.memory,alignment); vdst.memory = (void*)NC_read_align((uintptr_t)vdst.memory,alignment); - for(i=0;ilen;i++) { + for(i=0;i<(int)srcvlens->len;i++) { if((stat=copy_datar(file,basetype,vsrc,vdst))) goto done; vsrc.memory += basetype->size; vdst.memory += basetype->size; @@ -441,7 +446,7 @@ copy_datar(NC_FILE_INFO_T* file, NC_TYPE_INFO_T* utype, Position src, Position d if(field->nc_typeid == NC_STRING) { char** srcstrvec = (char**)src.memory; char** dststrvec = (char**)dst.memory; - for(i=0;isize; fdst.memory += basetype->size; @@ -465,7 +470,7 @@ copy_datar(NC_FILE_INFO_T* file, NC_TYPE_INFO_T* utype, Position src, Position d } else {stat = NC_EBADTYPE; goto done;} done: - return stat; + return NCTHROW(stat); } #endif @@ -531,7 +536,7 @@ NC_type_alignment_internal(NC_FILE_INFO_T* file, nc_type xtype, NC_TYPE_INFO_T* Why was this here? if(stat == NC_NOERR && align == 0) stat = NC_EINVAL; #endif - return stat; + return NCTHROW(stat); } #endif @@ -546,11 +551,15 @@ NC_reclaim_data_all(NC* nc, nc_type xtypeid, void* memory, size_t count) int stat = NC_NOERR; assert(nc != NULL); + /* If memory is NULL, ignore count */ + assert(memory == NULL || (memory != NULL && count > 0)); + if(memory == NULL) goto done; stat = NC_reclaim_data(nc,xtypeid,memory,count); if(stat == NC_NOERR && memory != NULL) {free(memory); memory = NULL;} - return stat; +done: + return NCTHROW(stat); } /* Alternate entry point: includes recovering the top-level memory */ @@ -597,7 +606,7 @@ NC_copy_data_all(NC* nc, nc_type xtype, const void* memory, size_t count, void** #endif if(copyp) {*copyp = copy; copy = NULL;} done: - return stat; + return NCTHROW(stat); } /* Alternate entry point: includes recovering the top-level memory */ diff --git a/libnczarr/Makefile.am b/libnczarr/Makefile.am index 02b7344559..2e684756d9 100644 --- a/libnczarr/Makefile.am +++ b/libnczarr/Makefile.am @@ -55,6 +55,7 @@ ztype.c \ zutil.c \ zvar.c \ zwalk.c \ +znc4.c \ zdebug.c \ zformat.h \ zarr.h \ diff --git a/libnczarr/zarr.h b/libnczarr/zarr.h index 6015613285..d396a87e36 100644 --- a/libnczarr/zarr.h +++ b/libnczarr/zarr.h @@ -97,7 +97,7 @@ EXTERNL void NCZ_setatts_read(NC_OBJ* container); EXTERNL int NCZ_decodesizet64vec(const NCjson* jshape, size_t* rankp, size64_t* shapes); EXTERNL int NCZ_decodesizetvec(const NCjson* jshape, size_t* rankp, size_t* shapes); EXTERNL int NCZ_uniquedimname(NC_FILE_INFO_T* file, NC_GRP_INFO_T* parent, NCZ_DimInfo* dimdata, NC_DIM_INFO_T** dimp, NCbytes* dimname); -EXTERNL int NCZ_computeattrdata(NC_FILE_INFO_T* file, struct NCZ_AttrInfo* att); +EXTERNL int NCZ_computeattrdata(NC_FILE_INFO_T* file, const NCjson* jdata, struct NCZ_AttrInfo* att); EXTERNL int NCZ_dictgetalt(const NCjson* jdict, const NCjson** jvaluep, ...); EXTERNL int NCZ_dictgetalt2(const NCjson* jdict, const NCjson** jvaluep, const char* name1, const char* name2); /* common case */ EXTERNL int NCZ_getnczarrkey(NC_FILE_INFO_T* file, struct ZOBJ* jsonz, const char* name, const NCjson** jncxxxp); diff --git a/libnczarr/zattr.c b/libnczarr/zattr.c index b67853d6e0..d038b7ed07 100644 --- a/libnczarr/zattr.c +++ b/libnczarr/zattr.c @@ -908,9 +908,9 @@ NCZ_set_dual_obj_data(NC_FILE_INFO_T* file, NC_OBJ* object, const char* name, Du switch(which) { case DA_FILLVALUE: assert(len == 1); - if((stat = NC_reclaim_data_all(file->controller,tid,var->fill_value,1))) goto done; + if((stat = NC_reclaim_data_all(file->controller,tid,var->fill_value,len))) goto done; var->fill_value = NULL; - if((stat = NC_copy_data_all(file->controller,tid,data,1,&var->fill_value))) goto done; + if((stat = NC_copy_data_all(file->controller,tid,data,len,&var->fill_value))) goto done; break; case DA_MAXSTRLEN: assert(len == 1); @@ -970,16 +970,15 @@ This is essentially Version 2|3 agnostic because the data part of an attribute is (currently) the same for both versions. */ int -NCZ_computeattrdata(NC_FILE_INFO_T* file, struct NCZ_AttrInfo* ainfo) +NCZ_computeattrdata(NC_FILE_INFO_T* file, const NCjson* jdata, struct NCZ_AttrInfo* ainfo) { int stat = NC_NOERR; NCbytes* buf = ncbytesnew(); NCjson* jtext = NULL; int isjson = 0; /* 1 => attribute value is neither scalar nor array of scalars */ int reclaimvalues = 0; - const NCjson* jdata = ainfo->jdata; - ZTRACE(3,"typehint=%d typeid=%d values=|%s|",ainfo->typehint,ainfo->nctype,NCJtotext(ainfo->jdata)); + ZTRACE(3,"typehint=%d typeid=%d values=|%s|",ainfo->typehint,ainfo->nctype,NCJtotext(jdata)); /* See if this is a simple vector (or scalar) of atomic types vs more complex json */ isjson = (ainfo->nctype == NC_JSON || NCZ_iscomplexjson(ainfo->name,jdata)); diff --git a/libnczarr/zfill.c b/libnczarr/zfill.c index 8ed70a023b..a18541d3fd 100644 --- a/libnczarr/zfill.c +++ b/libnczarr/zfill.c @@ -43,72 +43,6 @@ static struct DFALTFILL { /**************************************************/ /**************************************************/ -#if 0 -/* (over-) write the NC_VAR_INFO_T.fill_value; always make copy of fillvalue argument. - Takes no_fill flag into account. Sync with attribute -*/ -int -NCZ_set_fill_value(NC_FILE_INFO_T* file, NC_VAR_INFO_T* var, int no_fill, const void* fillvalue) -{ - int stat = NC_NOERR; - size_t size; - nc_type tid = var->type_info->hdr.id; - - if(no_fill) { - stat = NCZ_disable_fill(file,var); - goto done; - } - - if ((stat = nc4_get_typelen_mem(file, tid, &size))) goto done; - assert(size); - - /* Reclaim any existing var->fill_value */ - if(var->fill_value != NULL) { - if((stat = NC_reclaim_data_all(file->controller,tid,var->fill_value,1))) goto done; - var->fill_value = NULL; - } - if(fillvalue == NULL) {/* use default fill value */ - /* initialize the fill_value to the default */ - if((stat = NCZ_set_fill_value(file,var,var->no_fill,NCZ_getdfaltfillvalue(var->type_info->hdr.id)))) goto done; - var->fill_val_changed = 0; - } else { - /* overwrite the fill value */ - assert(var->fill_value == NULL); - if((stat = NC_copy_data_all(file->controller,tid,fillvalue,1,&var->fill_value))) goto done; - var->fill_val_changed = 1; - } - var->no_fill = NC_FILL; - - stat = NCZ_reclaim_fill_chunk(((NCZ_VAR_INFO_T*)var->format_var_info)->cache); /* Reclaim any existing fill_chunk */ - -done: - return THROW(stat); -} - -/* (over-) write/create the _FillValue attribute; always makes copy of NC_VAR_INFO_T.fill_value. - Takes no_fill flag into account. Does not sync with NC_VAR_INFO_T.fill_value. -*/ -int -NCZ_set_fill_att(NC_FILE_INFO_T* file, NC_VAR_INFO_T* var, NC_ATT_INFO_T* att, int no_fill, const void* fillvalue) -{ - int stat = NC_NOERR; - if(no_fill) { - stat = NCZ_fillvalue_disable(file,var); - } else { - if(att == NULL) { - int isnew = 0; - if((stat = NCZ_getattr(file, (NC_OBJ*)var, NC_FillValue, var->type_info->hdr.id, &att, &isnew))) goto done; - } - assert(att != NULL && strcmp(att->hdr.name,NC_FillValue)==0); /* Verify */ - if((stat = NCZ_sync_dual_att(file,(NC_OBJ*)var,NC_FillValue,DA_FILLVALUE,FIXATT))) goto done; - var->no_fill = NC_FALSE; - var->fill_val_changed = 1; - } - -done: - return THROW(stat); -} -#endif /* Turn off var.no_fill and var.fill_value. Sync with attribute */ int diff --git a/libnczarr/zformat2.c b/libnczarr/zformat2.c index 6af7bccca6..158be08e95 100644 --- a/libnczarr/zformat2.c +++ b/libnczarr/zformat2.c @@ -102,7 +102,7 @@ static int ZF2_encode_xarray(NC_FILE_INFO_T* file, size_t rank, NC_DIM_INFO_T** static int decode_grp_dims(NC_FILE_INFO_T* file, NC_GRP_INFO_T* grp, const NCjson* jdims, NClist* dimdefs); static int dtype2nctype(NC_FILE_INFO_T* file, const char* dtype, int isattr, nc_type* nctypep, int* endianp, size_t* typelenp); static int nctype2dtype(NC_FILE_INFO_T* file, nc_type nctype, int endianness, size_t typesize, char** dtypep, char** dattrtypep); -static int computeattrinfo(NC_FILE_INFO_T* file, nc_type typehint, const char* aname, const NCjson* jtypes, const NCjson* jainfo, struct NCZ_AttrInfo* ainfo); +static int computeattrinfo(NC_FILE_INFO_T* file, nc_type typehint, const char* aname, const NCjson* jtypes, const NCjson* jdata, struct NCZ_AttrInfo* ainfo); /**************************************************/ /* Format dispatch table */ @@ -517,17 +517,14 @@ ZF2_decode_var(NC_FILE_INFO_T* file, NC_VAR_INFO_T* var, struct ZOBJ* zobj, NCli NCZ_clearAttrInfo(file,&ainfo); ainfo.name = NC_FillValue; ainfo.nctype = vtype; - ainfo.jdata = jvalue; - if((stat = NCZ_computeattrdata(file,&ainfo))) goto done; + if((stat = NCZ_computeattrdata(file,jvalue,&ainfo))) goto done; /* Create var->fill_value */ assert(ainfo.nctype == vtype); if((stat = NCZ_set_dual_obj_data(file,(NC_OBJ*)var,NC_FillValue,DA_FILLVALUE,ainfo.datalen,ainfo.data))) goto done; /* propagate to _FillValue attribute */ if((stat = NCZ_sync_dual_att(file,(NC_OBJ*)var,NC_FillValue,DA_FILLVALUE,FIXATT))) goto done; - /* reclaim ainfo.data */ - if((stat = NC_reclaim_data_all(file->controller,ainfo.nctype,ainfo.data,ainfo.datalen))) goto done; - ainfo.datalen = 0; - ainfo.data = NULL; + /* clear+reclaim ainfo */ + NCZ_clearAttrInfo(file,&ainfo); } } @@ -1656,7 +1653,7 @@ dtype2nctype(NC_FILE_INFO_T* file, const char* dtype, int isattr, nc_type* nctyp Extract type and data for an attribute from json */ static int -computeattrinfo(NC_FILE_INFO_T* file, nc_type typehint, const char* aname, const NCjson* jtypes, const NCjson* jainfo, struct NCZ_AttrInfo* ainfo) +computeattrinfo(NC_FILE_INFO_T* file, nc_type typehint, const char* aname, const NCjson* jtypes, const NCjson* jdata, struct NCZ_AttrInfo* ainfo) { int stat = NC_NOERR; int purezarr = 0; @@ -1670,13 +1667,11 @@ computeattrinfo(NC_FILE_INFO_T* file, nc_type typehint, const char* aname, const TESTPUREZARR; ainfo->name = aname; - /* Save the attribute data */ - ainfo->jdata = jainfo; /* Infer the attribute data's type */ if(purezarr || jtypes == NULL) { ainfo->nctype = NC_NAT; - if((stat = NCZ_inferattrtype(ainfo->name,typehint,ainfo->jdata,&ainfo->nctype))) goto done; + if((stat = NCZ_inferattrtype(ainfo->name,typehint,jdata,&ainfo->nctype))) goto done; } else { /* Search the jtypes for the type of this attribute */ ainfo->nctype = NC_NAT; @@ -1685,7 +1680,7 @@ computeattrinfo(NC_FILE_INFO_T* file, nc_type typehint, const char* aname, const if((stat=dtype2nctype(file,NCJstring(jatype),ISATTR,&ainfo->nctype,&ainfo->endianness,&ainfo->typelen))) goto done; if(ainfo->nctype >= N_NCZARR_TYPES) {stat = NC_EINTERNAL; goto done;} } - if((stat = NCZ_computeattrdata(file,ainfo))) goto done; + if((stat = NCZ_computeattrdata(file,jdata,ainfo))) goto done; done: return ZUNTRACEX(THROW(stat),"typeid=%d typelen=%d len=%u",ainfo->nctype,ainfo->typelen,ainfo->len); diff --git a/libnczarr/zinternal.c b/libnczarr/zinternal.c index 0dc2a74a89..2506f7944e 100644 --- a/libnczarr/zinternal.c +++ b/libnczarr/zinternal.c @@ -312,11 +312,11 @@ NCZ_ensure_fill_value(NC_VAR_INFO_T *var) return NC_NOERR; /* If the user has set a fill_value for this var, use, otherwise find the default fill value. */ - assert(var->no_fill == NC_FILL); if(var->fill_value == NULL) { NC_FILE_INFO_T* file = var->container->nc4_info; nc_type vartid = var->type_info->hdr.id; - if((stat = NC_copy_data_all(file->controller,vartid,NCZ_getdfaltfillvalue(vartid),1,&var->fill_value))) goto done; + void* dfalt = NCZ_getdfaltfillvalue(vartid); + if((stat = NCZ_set_dual_obj_data(file,(NC_OBJ*)var,NC_FillValue,DA_FILLVALUE,1,dfalt))) goto done; /* synchronize to attribute */ if((stat = NCZ_sync_dual_att(file,(NC_OBJ*)var,NC_FillValue,DA_FILLVALUE,FIXATT))) goto done; } diff --git a/libnczarr/zinternal.h b/libnczarr/zinternal.h index 51e485c4d8..fc5b910085 100644 --- a/libnczarr/zinternal.h +++ b/libnczarr/zinternal.h @@ -358,7 +358,6 @@ typedef struct NCZ_DimDecl { /* Parsed Attribute info */ struct NCZ_AttrInfo { const char* name; - const NCjson* jdata; nc_type nctype; size_t typelen; int endianness; diff --git a/libnczarr/zsync.c b/libnczarr/zsync.c index 21c4080e50..fdc8860fea 100644 --- a/libnczarr/zsync.c +++ b/libnczarr/zsync.c @@ -192,6 +192,10 @@ ncz_encode_var_meta(NC_FILE_INFO_T* file, NC_VAR_INFO_T* var, int isclose) */ if((stat = ncz_create_computed_var_attributes(file,var))) goto done; + /* Create|Update the dual attributes */ + if((stat = NCZ_ensure_dual_attributes(file,(NC_OBJ*)var))) + + /* Convert to JSON */ if((stat=NCZF_encode_attributes(file,(NC_OBJ*)var,&jnczvar,NULL,&zobj.jatts))) goto done; @@ -274,15 +278,6 @@ ncz_create_computed_var_attributes(NC_FILE_INFO_T* file,NC_VAR_INFO_T* var) int isnew = 0; if(parent->parent != NULL) goto done; /* Only do this for root group */ - -#if 0 - /* See if _Quantize_XXX is already defined */ - if(var != NULL && var->quantize_mode > 0) { - const char* qname = NC_findquantizeattname(var->quantize_mode); - if(qname == NULL) {stat = NC_ENOTATT; goto done;} - if((stat = NCZ_sync_dual_att(file,(NC_OBJ*)var,qname,DA_QUANTIZE,FIXATT))) goto done; - } -#endif if(zinfo->flags & FLAG_XARRAYDIMS) { /* test if we should generate xarray dimensions */ special = NULL; @@ -702,12 +697,11 @@ ncz_decode_atts(NC_FILE_INFO_T* file, NC_OBJ* container, const NCjson* jatts, co /* If we have not read a _FillValue attribute, then go ahead and create it */ if(stat == NC_ENOTATT) { stat = NC_NOERR; /*reset*/ - NCZ_clearAttrInfo(file,&ainfo); ainfo.name = NC_FillValue; ainfo.nctype = var->type_info->hdr.id; if((stat = NC4_inq_atomic_type(ainfo.nctype, NULL, &ainfo.typelen))) goto done; ainfo.datalen = 1; - ainfo.data = var->fill_value; + if((stat = NC_copy_data_all(file->controller,ainfo.nctype,var->fill_value,ainfo.datalen,&ainfo.data))) goto done; if((stat = ncz_makeattr(file,(NC_OBJ*)var,&ainfo,&special))) goto done; } else if(stat != NC_NOERR) goto done; } diff --git a/libnczarr/zutil.c b/libnczarr/zutil.c index a1c853ac88..ae6607b99d 100644 --- a/libnczarr/zutil.c +++ b/libnczarr/zutil.c @@ -1319,13 +1319,12 @@ NCZ_clearAttrInfo(NC_FILE_INFO_T* file, struct NCZ_AttrInfo* ainfo) (void)NC_reclaim_data_all(file->controller,ainfo->nctype,ainfo->data,ainfo->datalen); } *ainfo = NCZ_emptyAttrInfo(); -assert(ainfo->data == NULL); } struct NCZ_AttrInfo NCZ_emptyAttrInfo(void) { - static struct NCZ_AttrInfo ai = {NULL,NULL,NC_NAT,0,NC_ENDIAN_NATIVE,0,NULL}; + static struct NCZ_AttrInfo ai = {NULL,NC_NAT,0,NC_ENDIAN_NATIVE,0,NULL}; return ai; } diff --git a/libnczarr/zvar.c b/libnczarr/zvar.c index 600d433daa..9b86228eae 100644 --- a/libnczarr/zvar.c +++ b/libnczarr/zvar.c @@ -1089,6 +1089,7 @@ NCZ_def_var_endian(int ncid, int varid, int endianness) int NCZ_def_var_quantize(int ncid, int varid, int quantize_mode, int nsd) { +fprintf(stderr,"@@@ mode=%d nsd=%d\n",quantize_mode,nsd); return ncz_def_var_extra(ncid, varid, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, &quantize_mode, &nsd); diff --git a/nczarr_test/ref_nulls_nczarr.baseline b/nczarr_test/ref_nulls_nczarr.baseline index 6abaf34891..0030498209 100644 --- a/nczarr_test/ref_nulls_nczarr.baseline +++ b/nczarr_test/ref_nulls_nczarr.baseline @@ -1,12 +1,12 @@ netcdf ref_nulls { variables: int test ; - test:_FillValue = -2147483647 ; test:nul_sng = 0b ; test:empty_sng = "" ; test:space_sng = " " ; test:zero_sng = "0" ; test:nul0 = 0b ; + test:_FillValue = -2147483647 ; data: test = 1 ; diff --git a/nczarr_test/ref_nulls_zarr.baseline b/nczarr_test/ref_nulls_zarr.baseline index 673d809fc1..cc4db43153 100644 --- a/nczarr_test/ref_nulls_zarr.baseline +++ b/nczarr_test/ref_nulls_zarr.baseline @@ -3,12 +3,12 @@ dimensions: _scalar_ = 1 ; variables: int test(_scalar_) ; - test:_FillValue = -2147483647 ; test:nul_sng = 0 ; test:empty_sng = "" ; test:space_sng = " " ; test:zero_sng = "0" ; test:nul0 = 0 ; + test:_FillValue = -2147483647 ; data: test = 1 ; diff --git a/nczarr_test/test_quantize.c b/nczarr_test/test_quantize.c index 2f521ed0f7..e0a5c602a7 100644 --- a/nczarr_test/test_quantize.c +++ b/nczarr_test/test_quantize.c @@ -201,6 +201,7 @@ fprintf(stderr,"URL=%s\n",file_url); /* Close the file. */ if (nc_close(ncid)) ERR; +system("/home/dmh/git/netcdf.fork/nczarr_test/.libs/zmapio -h -t float file:///home/dmh/git/netcdf.fork/alltests_1733018656/nczarr_test/testdir_quantize/tst_quantize.nc.zarr#mode=zarr,file"); /* Open the file and check. */ if (nc_open(FILE_NAME, NC_WRITE, &ncid)) ERR;