diff --git a/RELEASE_NOTES.md b/RELEASE_NOTES.md index 5b48e42ec..d7ff237c9 100755 --- a/RELEASE_NOTES.md +++ b/RELEASE_NOTES.md @@ -19,8 +19,8 @@ This file contains a high-level description of this package's evolution. Release Note that dap4 is disabled by default until the testserver situation is resolved. * [Enhancement] The remote testing server can now be specified with the '--with-testserver" option to ./configure. * [Refactor] the oc2 library is no longer independent of the main netcdf-c library. For example, it now uses ncuri, nclist, and ncbytes instead of its homegrown equivalents. -* [Upgrade] Update utf8proc.[ch] to use the version now maintained by the -Julia Language project (https://github.com/JuliaLang/utf8proc/blob/master/LICENSE.md). +* [Upgrade][Bug] Corrected an issue regarding how "orphaned" DAS attributes were handled. See [GitHub #376](https://github.com/Unidata/netcdf-c/pull/376) for more information. +* [Upgrade] Update utf8proc.[ch] to use the version now maintained by the Julia Language project (https://github.com/JuliaLang/utf8proc/blob/master/LICENSE.md). * [Bug] Addressed conversion problem with Windows sscanf. This primarily affected some OPeNDAP URLs on Windows. See [GitHub #365](https://github.com/Unidata/netcdf-c/issues/365) and [GitHub #366](https://github.com/Unidata/netcdf-c/issues/366) for more information. * [Enhancement] Added support for HDF5 collective metadata operations when available. Patch submitted by Greg Sjaardema, see [Pull request #335](https://github.com/Unidata/netcdf-c/pull/335) for more information. * [Bug] Addressed a potential type punning issue. See [GitHub #351](https://github.com/Unidata/netcdf-c/issues/351) for more information. diff --git a/libdap2/env b/libdap2/env index d6d8bca18..1e27a0e79 100644 --- a/libdap2/env +++ b/libdap2/env @@ -4,12 +4,12 @@ alias xx="cd ..;make; cd libdap2" PARMS=""; ARGS=""; CON="" ; CE=""; OCON="" ; VAR=""; SHARP='#' alias q0=;alias qq=;alias qv=;alias q=;alias qh=;alias qqh=;alias qall=;alias qv=;alias qo=; -F="http://www.esrl.noaa.gov/psd/thredds/dodsC/Datasets/ncep.reanalysis.dailyavgs/pressure/air.1947.nc" +F='https://cida.usgs.gov/thredds/dodsC/new_gmo?longitude[0:1:461],latitude[0:1:221],time[0:1:22644]' -if test -e "/cygdrive/f/git/netcdf-c" ; then -TOP="/cygdrive/f/git/netcdf-c" -elif test -e "/cygdrive/d/git/netcdf-c" ; then +if test -e "/cygdrive/d/git/netcdf-c" ; then TOP="/cygdrive/d/git/netcdf-c" +elif test -e "/cygdrive/f/git/netcdf-c" ; then +TOP="/cygdrive/f/git/netcdf-c" elif test -e "/home/dmh/git/netcdf-c" ; then TOP="/home/dmh/git/netcdf-c" else @@ -25,15 +25,15 @@ fi P=`pwd` PARMS="log" -#PARMS="${PARMS}&netcdf3" -#PARMS="${PARMS}&fetch=disk" -#PARMS="${PARMS}&cache" -#PARMS="${PARMS}&nocache" -#PARMS="${PARMS}&wholevar" -PARMS="${PARMS}&show=fetch" -#PARMS="${PARMS}&noprefetch" -#PARMS="${PARMS}&prefetch" -#PARMS="${PARMS}&prefetch=eager" +#PARMS="${PARMS}[netcdf3]" +#PARMS="${PARMS}[fetch=disk]" +#PARMS="${PARMS}[cache]" +#PARMS="${PARMS}[nocache]" +#PARMS="${PARMS}[wholevar]" +PARMS="${PARMS}[show=fetch]" +#PARMS="${PARMS}[noprefetch]" +#PARMS="${PARMS}[prefetch]" +#PARMS="${PARMS}[prefetch=eager]" PARMS="[log][cache][noprefetch]" VARGS="--leak-check=full" @@ -52,10 +52,9 @@ if test "x$PROG" = x ; then PROG="../ncdump/ncdump" fi -if test "x$PARMS" != "x" ; then PARMS="\#$PARMS"; fi U="$F" if test "x$CON" != "x" ; then U="$U?$CON"; fi -UALL="$U${PARMS}" +UALL="${PARMS}$U" #ARGS="-h $ARGS" #ARGS="-w $ARGS" #ARGS="-c $ARGS" @@ -133,4 +132,5 @@ F="http://nomads.ncep.noaa.gov:9090/dods/gens/gens20140123/gep_all_12z" VAR=prmslmsl F="http://data.nodc.noaa.gov/thredds/dodsC/testdata/pathfinderAgg/pathFinderV5.2_night.ncml" CON="sst_dtime.sst_dtime" +F="http://www.esrl.noaa.gov/psd/thredds/dodsC/Datasets/ncep.reanalysis.dailyavgs/pressure/air.1947.nc" fi diff --git a/ncdap_test/expectremote3/test.01.1.dmp b/ncdap_test/expectremote3/test.01.1.dmp index 9caf965cc..ba0c87640 100644 --- a/ncdap_test/expectremote3/test.01.1.dmp +++ b/ncdap_test/expectremote3/test.01.1.dmp @@ -7,10 +7,6 @@ variables: "Ph.D" ; :Facility.DataCenter = "COAS Environmental Computer Facility" ; :Facility.DrifterType = "MetOcean WOCE/OCM" ; - :b.Description = "A test byte" ; - :b.units = "unknown" ; - :i32.Description = "A 32 bit test server int" ; - :i32.units = "unknown" ; data: f64 = 1000 ; diff --git a/ncdap_test/expectremote3/test.07.1.dmp b/ncdap_test/expectremote3/test.07.1.dmp index eabeeb5ad..57799f09d 100644 --- a/ncdap_test/expectremote3/test.07.1.dmp +++ b/ncdap_test/expectremote3/test.07.1.dmp @@ -9,10 +9,6 @@ variables: "Ph.D" ; :Facility.DataCenter = "COAS Environmental Computer Facility" ; :Facility.DrifterType = "MetOcean WOCE/OCM" ; - :b.Description = "A test byte" ; - :b.units = "unknown" ; - :i32.Description = "A 32 bit test server int" ; - :i32.units = "unknown" ; data: person.age = 1, 2, 3, 5, 8 ; diff --git a/ncdap_test/expectremote3/test.07.3.dmp b/ncdap_test/expectremote3/test.07.3.dmp index df91e0f2d..5c97de2d0 100644 --- a/ncdap_test/expectremote3/test.07.3.dmp +++ b/ncdap_test/expectremote3/test.07.3.dmp @@ -11,10 +11,6 @@ variables: "Ph.D" ; :Facility.DataCenter = "COAS Environmental Computer Facility" ; :Facility.DrifterType = "MetOcean WOCE/OCM" ; - :b.Description = "A test byte" ; - :b.units = "unknown" ; - :i32.Description = "A 32 bit test server int" ; - :i32.units = "unknown" ; data: person.name = diff --git a/ncdap_test/expectremote3/test.07.4.dmp b/ncdap_test/expectremote3/test.07.4.dmp index 6b8ba5b2c..307725226 100644 --- a/ncdap_test/expectremote3/test.07.4.dmp +++ b/ncdap_test/expectremote3/test.07.4.dmp @@ -9,10 +9,6 @@ variables: "Ph.D" ; :Facility.DataCenter = "COAS Environmental Computer Facility" ; :Facility.DrifterType = "MetOcean WOCE/OCM" ; - :b.Description = "A test byte" ; - :b.units = "unknown" ; - :i32.Description = "A 32 bit test server int" ; - :i32.units = "unknown" ; data: types.f32 = 0, 0.9999833, 1.999867, 2.99955, 3.998933 ; diff --git a/ncdap_test/tst_remote.sh b/ncdap_test/tst_remote.sh index 73026796c..523daf533 100755 --- a/ncdap_test/tst_remote.sh +++ b/ncdap_test/tst_remote.sh @@ -1,8 +1,5 @@ #!/bin/sh -export SETX=1 -set -x - if test "x$srcdir" = x ; then srcdir=`pwd`; fi . ../test_common.sh diff --git a/oc2/ocnode.c b/oc2/ocnode.c index 39c2b0ab3..0e682286c 100644 --- a/oc2/ocnode.c +++ b/oc2/ocnode.c @@ -13,6 +13,8 @@ static OCerror mergedods1(OCnode* dds, OCnode* das); static OCerror mergeother1(OCnode* root, OCnode* das); static char* pathtostring(NClist* path, char* separator); static void computefullname(OCnode* node); +static OCerror mergeother1(OCnode* root, OCnode* das); +static OCerror mergeother(OCnode* ddsroot, OClist* dasnodes); /* Process ocnodes to fix various semantic issues*/ void @@ -334,13 +336,14 @@ ocddsdasmerge(OCstate* state, OCnode* dasroot, OCnode* ddsroot) if(das == NULL) continue; mergedods1(ddsroot,das); } + /* 6. Assign other orphan attributes, which means - construct their full name and assign as a global attribute. */ - for(i=0;isubnodes);i++) { OCnode* attnode = (OCnode*)nclistget(das->subnodes,i); if(attnode->octype == OC_Attribute) { + if(dds->octype == OC_Atomic + || dds->octype == OC_Sequence + || dds->octype == OC_Structure + || dds->octype == OC_Grid) + attnode->att.var = dds; OCattribute* att = makeattribute(attnode->name, attnode->etype, attnode->att.values); @@ -406,6 +414,19 @@ mergedods1(OCnode* dds, OCnode* dods) return OCTHROW(stat); } +static OCerror +mergeother(OCnode* ddsroot, OClist* dasnodes) +{ + OCerror stat = OC_NOERR; + int i; + for(i=0;iattributes == NULL) root->attributes = nclistnew(); + /* Only include if this is not connected to a variable */ + if(das->att.var != NULL) goto done; + if(das->octype == OC_Attribute) { /* compute the full name of this attribute */ computefullname(das); @@ -431,6 +455,7 @@ mergeother1(OCnode* root, OCnode* das) } } else stat = OC_EDAS; +done: return OCTHROW(stat); } diff --git a/oc2/ocnode.h b/oc2/ocnode.h index 199aa52b2..e760f77d9 100644 --- a/oc2/ocnode.h +++ b/oc2/ocnode.h @@ -36,7 +36,8 @@ typedef struct OCattribute { typedef struct OCattinfo { int isglobal; /* is this supposed to be a global attribute set?*/ int isdods; /* is this a global DODS_XXX attribute set */ - NClist* values; /* oclist*/ + OClist* values; /* oclist*/ + struct OCnode* var; /* containing var else null */ } OCattinfo; /*! Specifies the OCnode. */