From cc25aac175a8e8897b4abee76dc0afa8e267cd65 Mon Sep 17 00:00:00 2001 From: Dennis Heimbigner Date: Mon, 14 Nov 2022 12:51:09 -0700 Subject: [PATCH] remotetest --- configure.ac | 20 +++---- .../test_atomic_array.nc.ncdump | 48 ++++++++++++++++ .../test_atomic_types.nc.ncdump | 57 +++++++++++++++++++ .../baselineremote/test_enum_1.nc.ncdump | 13 +++++ .../baselineremote/test_enum_2.nc.ncdump | 16 ++++++ .../baselineremote/test_enum_3.nc.ncdump | 12 ++++ .../baselineremote/test_enum_array.nc.ncdump | 15 +++++ dap4_test/baselineremote/test_fill.nc.ncdump | 14 +++++ .../baselineremote/test_fill_2.nc.ncdump | 27 +++++++++ .../baselineremote/test_groups1.nc.ncdump | 35 ++++++++++++ dap4_test/baselineremote/test_misc1.nc.ncdump | 24 ++++++++ .../baselineremote/test_one_var.nc.ncdump | 7 +++ .../test_one_vararray.nc.ncdump | 9 +++ .../baselineremote/test_opaque.nc.ncdump | 9 +++ .../test_opaque_array.nc.ncdump | 13 +++++ .../baselineremote/test_struct1.nc.ncdump | 12 ++++ .../test_struct_array.nc.ncdump | 19 +++++++ .../test_struct_nested.nc.ncdump | 20 +++++++ .../test_struct_nested3.nc.ncdump | 17 ++++++ .../baselineremote/test_struct_type.nc.ncdump | 12 ++++ dap4_test/baselineremote/test_test.nc.ncdump | 9 +++ dap4_test/baselineremote/test_unlim.nc.ncdump | 37 ++++++++++++ .../baselineremote/test_unlim1.nc.ncdump | 37 ++++++++++++ dap4_test/baselineremote/test_utf8.nc.ncdump | 9 +++ dap4_test/baselineremote/test_vlen1.nc.ncdump | 12 ++++ .../baselineremote/test_vlen11.nc.ncdump | 12 ++++ dap4_test/baselineremote/test_vlen2.nc.ncdump | 18 ++++++ dap4_test/baselineremote/test_vlen3.nc.ncdump | 15 +++++ dap4_test/baselineremote/test_vlen4.nc.ncdump | 17 ++++++ dap4_test/baselineremote/test_vlen5.nc.ncdump | 17 ++++++ dap4_test/baselineremote/test_vlen6.nc.ncdump | 14 +++++ dap4_test/baselineremote/test_vlen7.nc.ncdump | 14 +++++ dap4_test/baselineremote/test_vlen8.nc.ncdump | 17 ++++++ .../baselineremote/test_zerodim.nc.ncdump | 24 ++++++++ dap4_test/test_remote.sh | 16 ++++-- 35 files changed, 649 insertions(+), 18 deletions(-) create mode 100644 dap4_test/baselineremote/test_atomic_array.nc.ncdump create mode 100644 dap4_test/baselineremote/test_atomic_types.nc.ncdump create mode 100644 dap4_test/baselineremote/test_enum_1.nc.ncdump create mode 100644 dap4_test/baselineremote/test_enum_2.nc.ncdump create mode 100644 dap4_test/baselineremote/test_enum_3.nc.ncdump create mode 100644 dap4_test/baselineremote/test_enum_array.nc.ncdump create mode 100644 dap4_test/baselineremote/test_fill.nc.ncdump create mode 100644 dap4_test/baselineremote/test_fill_2.nc.ncdump create mode 100644 dap4_test/baselineremote/test_groups1.nc.ncdump create mode 100644 dap4_test/baselineremote/test_misc1.nc.ncdump create mode 100644 dap4_test/baselineremote/test_one_var.nc.ncdump create mode 100644 dap4_test/baselineremote/test_one_vararray.nc.ncdump create mode 100644 dap4_test/baselineremote/test_opaque.nc.ncdump create mode 100644 dap4_test/baselineremote/test_opaque_array.nc.ncdump create mode 100644 dap4_test/baselineremote/test_struct1.nc.ncdump create mode 100644 dap4_test/baselineremote/test_struct_array.nc.ncdump create mode 100644 dap4_test/baselineremote/test_struct_nested.nc.ncdump create mode 100644 dap4_test/baselineremote/test_struct_nested3.nc.ncdump create mode 100644 dap4_test/baselineremote/test_struct_type.nc.ncdump create mode 100644 dap4_test/baselineremote/test_test.nc.ncdump create mode 100644 dap4_test/baselineremote/test_unlim.nc.ncdump create mode 100644 dap4_test/baselineremote/test_unlim1.nc.ncdump create mode 100644 dap4_test/baselineremote/test_utf8.nc.ncdump create mode 100644 dap4_test/baselineremote/test_vlen1.nc.ncdump create mode 100644 dap4_test/baselineremote/test_vlen11.nc.ncdump create mode 100644 dap4_test/baselineremote/test_vlen2.nc.ncdump create mode 100644 dap4_test/baselineremote/test_vlen3.nc.ncdump create mode 100644 dap4_test/baselineremote/test_vlen4.nc.ncdump create mode 100644 dap4_test/baselineremote/test_vlen5.nc.ncdump create mode 100644 dap4_test/baselineremote/test_vlen6.nc.ncdump create mode 100644 dap4_test/baselineremote/test_vlen7.nc.ncdump create mode 100644 dap4_test/baselineremote/test_vlen8.nc.ncdump create mode 100644 dap4_test/baselineremote/test_zerodim.nc.ncdump diff --git a/configure.ac b/configure.ac index a4a7f50a8..e43ee0a8e 100644 --- a/configure.ac +++ b/configure.ac @@ -614,21 +614,14 @@ AC_MSG_CHECKING([whether dap use of remotetest server should be enabled]) AC_ARG_ENABLE([dap-remote-tests], [AS_HELP_STRING([--disable-dap-remote-tests], [disable dap remote tests])]) -# Default off -test "x$enable_dap_remote_tests" = xyes || enable_dap_remote_tests=no +# Default on +test "x$enable_dap_remote_tests" = xno || enable_dap_remote_tests=yes if test "x$enable_dap" = "xno" ; then enable_dap_remote_tests=no fi AC_MSG_RESULT($enable_dap_remote_tests) -AC_MSG_CHECKING([whether dap use of remotetest server should be enabled]) -AC_ARG_ENABLE([dap-remote-tests], - [AS_HELP_STRING([--disable-dap-remote-tests], - [disable dap remote tests])]) -test "x$enable_dap_remote_tests" = xno || enable_dap_remote_tests=yes -AC_MSG_RESULT($enable_dap_remote_tests) - -AC_MSG_CHECKING([whether use of external servers should be enabled]) +AC_MSG_CHECKING([whether use of external (non-unidata) servers should be enabled]) AC_ARG_ENABLE([external-server-tests], [AS_HELP_STRING([--enable-external-server-tests (default off)], [enable external server tests])]) @@ -667,11 +660,12 @@ if test "x$REMOTETESTSERVERS" = xno ; then dfaltsvc="remotetest.unidata.ucar.edu" REMOTETESTSERVERS="${dfaltsvc}" fi -AC_MSG_RESULT([$svclist]) -AC_DEFINE_UNQUOTED([REMOTETESTSERVERS], ["$REMOTETESTSERVERS"], [the testservers for remote tests.]) +msg="${REMOTETESTSERVERS}" if test "x$dfaltsvc" != x ; then - AC_MSG_NOTICE([Using default: --with-testservers=${dfaltsvc}]) + msg="${msg} (default)" fi +AC_MSG_RESULT([${msg}]) +AC_DEFINE_UNQUOTED([REMOTETESTSERVERS], ["$REMOTETESTSERVERS"], [the testservers for remote tests.]) # Set the config.h flags if test "x$enable_dap" = xyes; then diff --git a/dap4_test/baselineremote/test_atomic_array.nc.ncdump b/dap4_test/baselineremote/test_atomic_array.nc.ncdump new file mode 100644 index 000000000..194064d39 --- /dev/null +++ b/dap4_test/baselineremote/test_atomic_array.nc.ncdump @@ -0,0 +1,48 @@ +netcdf test_atomic_array { +types: + byte enum cloud_class_t {Clear = 0, Cumulonimbus = 1, Stratus = 2, + Stratocumulus = 3, Cumulus = 4, Altostratus = 5, Nimbostratus = 6, + Altocumulus = 7, Cirrostratus = 8, Cirrocumulus = 9, Cirrus = 10, + Missing = 127} ; + opaque(16) opaque16_t ; +dimensions: + d1 = 1 ; + d2 = 2 ; + d3 = 3 ; + d4 = 4 ; + d5 = 5 ; +variables: + ubyte vu8(d2, d3) ; + short v16(d4) ; + uint vu32(d2, d3) ; + double vd(d2) ; + char vc(d2) ; + string vs(d2, d2) ; + opaque16_t vo(d1, d2) ; + cloud_class_t primary_cloud(d5) ; + cloud_class_t primary_cloud:_FillValue = Missing ; +data: + + vu8 = + 255, 1, 2, + 3, 4, 5 ; + + v16 = 1, 2, 3, 4 ; + + vu32 = + 5, 4, 3, + 2, 1, 0 ; + + vd = 17.9, 1024.8 ; + + vc = "@&" ; + + vs = + "hello\tworld", "\r\n", + "Καλημέα", "abc" ; + + vo = + 0X0123456789ABCDEF0000000000000000, 0XABCDEF00000000000000000000000000 ; + + primary_cloud = Clear, Stratus, Clear, Cumulonimbus, _ ; +} diff --git a/dap4_test/baselineremote/test_atomic_types.nc.ncdump b/dap4_test/baselineremote/test_atomic_types.nc.ncdump new file mode 100644 index 000000000..b9cf9a20d --- /dev/null +++ b/dap4_test/baselineremote/test_atomic_types.nc.ncdump @@ -0,0 +1,57 @@ +netcdf test_atomic_types { +types: + byte enum cloud_class_t {Clear = 0, Cumulonimbus = 1, Stratus = 2, + Stratocumulus = 3, Cumulus = 4, Altostratus = 5, Nimbostratus = 6, + Altocumulus = 7, Cirrostratus = 8, Cirrocumulus = 9, Cirrus = 10, + Missing = 127} ; + opaque(16) opaque16_t ; +variables: + byte v8 ; + ubyte vu8 ; + short v16 ; + ushort vu16 ; + int v32 ; + uint vu32 ; + int64 v64 ; + uint64 vu64 ; + float vf ; + double vd ; + char vc ; + string vs ; + opaque16_t vo ; + cloud_class_t primary_cloud ; + cloud_class_t primary_cloud:_FillValue = Missing ; + cloud_class_t secondary_cloud ; + cloud_class_t secondary_cloud:_FillValue = Missing ; +data: + + v8 = -128 ; + + vu8 = 255 ; + + v16 = -32768 ; + + vu16 = _ ; + + v32 = 2147483647 ; + + vu32 = _ ; + + v64 = 9223372036854775807 ; + + vu64 = 18446744073709551615 ; + + vf = 3.141593 ; + + vd = 3.14159265358979 ; + + vc = "@" ; + + vs = "hello\tworld" ; + + vo = 0X0123456789ABCDEF0000000000000000 ; + + primary_cloud = Stratus ; + + secondary_cloud = _ ; +} diff --git a/dap4_test/baselineremote/test_enum_1.nc.ncdump b/dap4_test/baselineremote/test_enum_1.nc.ncdump new file mode 100644 index 000000000..254299ff9 --- /dev/null +++ b/dap4_test/baselineremote/test_enum_1.nc.ncdump @@ -0,0 +1,13 @@ +netcdf test_enum_1 { +types: + byte enum cloud_class_t {Clear = 0, Cumulonimbus = 1, Stratus = 2, + Stratocumulus = 3, Cumulus = 4, Altostratus = 5, Nimbostratus = 6, + Altocumulus = 7, Cirrostratus = 8, Cirrocumulus = 9, Cirrus = 10, + Missing = 127} ; +variables: + cloud_class_t primary_cloud ; + cloud_class_t primary_cloud:_FillValue = Missing ; +data: + + primary_cloud = Stratus ; +} diff --git a/dap4_test/baselineremote/test_enum_2.nc.ncdump b/dap4_test/baselineremote/test_enum_2.nc.ncdump new file mode 100644 index 000000000..b65155173 --- /dev/null +++ b/dap4_test/baselineremote/test_enum_2.nc.ncdump @@ -0,0 +1,16 @@ +netcdf test_enum_2 { +types: + byte enum cloud_class_t {Clear = 0, Cumulonimbus = 1, Stratus = 2, + Stratocumulus = 3, Cumulus = 4, Altostratus = 5, Nimbostratus = 6, + Altocumulus = 7, Cirrostratus = 8, Cirrocumulus = 9, Cirrus = 10, + Missing = 127} ; + +group: h { + variables: + cloud_class_t primary_cloud ; + cloud_class_t primary_cloud:_FillValue = Missing ; + data: + + primary_cloud = Stratus ; + } // group h +} diff --git a/dap4_test/baselineremote/test_enum_3.nc.ncdump b/dap4_test/baselineremote/test_enum_3.nc.ncdump new file mode 100644 index 000000000..0ff678982 --- /dev/null +++ b/dap4_test/baselineremote/test_enum_3.nc.ncdump @@ -0,0 +1,12 @@ +netcdf test_enum_3 { +types: + byte enum cloud_class_t {Clear = 0, Stratus = 1, Missing = 127} ; + +group: h { + variables: + cloud_class_t primary_cloud ; + data: + + primary_cloud = Stratus ; + } // group h +} diff --git a/dap4_test/baselineremote/test_enum_array.nc.ncdump b/dap4_test/baselineremote/test_enum_array.nc.ncdump new file mode 100644 index 000000000..1c5944620 --- /dev/null +++ b/dap4_test/baselineremote/test_enum_array.nc.ncdump @@ -0,0 +1,15 @@ +netcdf test_enum_array { +types: + byte enum cloud_class_t {Clear = 0, Cumulonimbus = 1, Stratus = 2, + Stratocumulus = 3, Cumulus = 4, Altostratus = 5, Nimbostratus = 6, + Altocumulus = 7, Cirrostratus = 8, Cirrocumulus = 9, Cirrus = 10, + Missing = 127} ; +dimensions: + d5 = 5 ; +variables: + cloud_class_t primary_cloud(d5) ; + cloud_class_t primary_cloud:_FillValue = Missing ; +data: + + primary_cloud = Clear, Stratus, Clear, Cumulonimbus, _ ; +} diff --git a/dap4_test/baselineremote/test_fill.nc.ncdump b/dap4_test/baselineremote/test_fill.nc.ncdump new file mode 100644 index 000000000..ce4105b59 --- /dev/null +++ b/dap4_test/baselineremote/test_fill.nc.ncdump @@ -0,0 +1,14 @@ +netcdf test_fill { +variables: + ubyte uv8 ; + short v16 ; + int uv32 ; + int uv32:_FillValue = 17 ; +data: + + uv8 = 240 ; + + v16 = 32700 ; + + uv32 = 111000 ; +} diff --git a/dap4_test/baselineremote/test_fill_2.nc.ncdump b/dap4_test/baselineremote/test_fill_2.nc.ncdump new file mode 100644 index 000000000..0735d3d37 --- /dev/null +++ b/dap4_test/baselineremote/test_fill_2.nc.ncdump @@ -0,0 +1,27 @@ +netcdf test_fill_2 { +types: + byte enum cloud_class_t {Clear = 0, Cumulonimbus = 1, Stratus = 2, + Stratocumulus = 3, Cumulus = 4, Altostratus = 5, Nimbostratus = 6, + Altocumulus = 7, Cirrostratus = 8, Cirrocumulus = 9, Cirrus = 10, + Missing = 127} ; +dimensions: + d2 = 2 ; +variables: + cloud_class_t enumvar(d2) ; + cloud_class_t enumvar:_FillValue = Missing ; + int uv32(d2) ; + int uv32:_FillValue = 17 ; + ubyte uv8(d2) ; + ubyte uv8:_FillValue = 120UB ; + short v16(d2) ; + short v16:_FillValue = -37s ; +data: + + enumvar = Stratus, _ ; + + uv32 = 111000, _ ; + + uv8 = 240, _ ; + + v16 = 32700, _ ; +} diff --git a/dap4_test/baselineremote/test_groups1.nc.ncdump b/dap4_test/baselineremote/test_groups1.nc.ncdump new file mode 100644 index 000000000..d351478db --- /dev/null +++ b/dap4_test/baselineremote/test_groups1.nc.ncdump @@ -0,0 +1,35 @@ +netcdf test_groups1 { +dimensions: + dim1 = 5 ; + +group: g { + dimensions: + dim2 = 3 ; + + group: h { + dimensions: + dim3 = 7 ; + variables: + int v1(dim1) ; + float v2(dim2) ; + data: + + v1 = -876354855, -1761252264, 1723477387, -46827465, 1475147969 ; + + v2 = 12, -100, _ ; + } // group h + + group: i { + dimensions: + dim3 = 7 ; + variables: + int v1(dim1) ; + float v3(dim3) ; + data: + + v1 = 2, 3, 5, 7, 11 ; + + v3 = 23, 29, 19, 31, 17, 37, 13 ; + } // group i + } // group g +} diff --git a/dap4_test/baselineremote/test_misc1.nc.ncdump b/dap4_test/baselineremote/test_misc1.nc.ncdump new file mode 100644 index 000000000..91bb83451 --- /dev/null +++ b/dap4_test/baselineremote/test_misc1.nc.ncdump @@ -0,0 +1,24 @@ +netcdf test_misc1 { +dimensions: + lon = 4 ; + time = UNLIMITED ; // (0 currently) + lat = 6 ; + unlim = UNLIMITED ; // (3 currently) +variables: + float var(unlim) ; + var:_ChunkSizes = 1024U ; + float lon(lon) ; + string lon:units = "degrees_east" ; + float lat(lat) ; + string lat:units = "degrees_north" ; + +// global attributes: + string :title = "example for workshop" ; +data: + + var = 0, 1, 3 ; + + lon = _, _, _, _ ; + + lat = _, _, _, _, _, _ ; +} diff --git a/dap4_test/baselineremote/test_one_var.nc.ncdump b/dap4_test/baselineremote/test_one_var.nc.ncdump new file mode 100644 index 000000000..f4ab177bd --- /dev/null +++ b/dap4_test/baselineremote/test_one_var.nc.ncdump @@ -0,0 +1,7 @@ +netcdf test_one_var { +variables: + int t ; +data: + + t = 17 ; +} diff --git a/dap4_test/baselineremote/test_one_vararray.nc.ncdump b/dap4_test/baselineremote/test_one_vararray.nc.ncdump new file mode 100644 index 000000000..964677c45 --- /dev/null +++ b/dap4_test/baselineremote/test_one_vararray.nc.ncdump @@ -0,0 +1,9 @@ +netcdf test_one_vararray { +dimensions: + d2 = 2 ; +variables: + int t(d2) ; +data: + + t = 17, 37 ; +} diff --git a/dap4_test/baselineremote/test_opaque.nc.ncdump b/dap4_test/baselineremote/test_opaque.nc.ncdump new file mode 100644 index 000000000..c2cdc2342 --- /dev/null +++ b/dap4_test/baselineremote/test_opaque.nc.ncdump @@ -0,0 +1,9 @@ +netcdf test_opaque { +types: + opaque(16) opaque16_t ; +variables: + opaque16_t vo1 ; +data: + + vo1 = 0X0123456789ABCDEF0000000000000000 ; +} diff --git a/dap4_test/baselineremote/test_opaque_array.nc.ncdump b/dap4_test/baselineremote/test_opaque_array.nc.ncdump new file mode 100644 index 000000000..fa6f19f06 --- /dev/null +++ b/dap4_test/baselineremote/test_opaque_array.nc.ncdump @@ -0,0 +1,13 @@ +netcdf test_opaque_array { +types: + opaque(16) opaque16_t ; +dimensions: + d2 = 2 ; +variables: + opaque16_t vo2(d2, d2) ; +data: + + vo2 = + 0X0123456789ABCDEF0000000000000000, 0XABCDEF00000000000000000000000000, + 0XFEDCBA98765432100000000000000000, 0XFEDCBA99999999990000000000000000 ; +} diff --git a/dap4_test/baselineremote/test_struct1.nc.ncdump b/dap4_test/baselineremote/test_struct1.nc.ncdump new file mode 100644 index 000000000..f48e7611e --- /dev/null +++ b/dap4_test/baselineremote/test_struct1.nc.ncdump @@ -0,0 +1,12 @@ +netcdf test_struct1 { +types: + compound s_t { + int x ; + int y ; + }; // s_t +variables: + s_t s ; +data: + + s = {1, -2} ; +} diff --git a/dap4_test/baselineremote/test_struct_array.nc.ncdump b/dap4_test/baselineremote/test_struct_array.nc.ncdump new file mode 100644 index 000000000..4fdc82c0f --- /dev/null +++ b/dap4_test/baselineremote/test_struct_array.nc.ncdump @@ -0,0 +1,19 @@ +netcdf test_struct_array { +types: + compound s_t { + int x ; + int y ; + }; // s_t +dimensions: + dx = 4 ; + dy = 3 ; +variables: + s_t s(dx, dy) ; +data: + + s = + {1, -1}, {17, 37}, {-32767, 32767}, + {-1, 3}, {-2, 2}, {-3, 1}, + {-4, 12}, {-8, 8}, {-12, 4}, + {-5, 15}, {-10, 10}, {-15, 5} ; +} diff --git a/dap4_test/baselineremote/test_struct_nested.nc.ncdump b/dap4_test/baselineremote/test_struct_nested.nc.ncdump new file mode 100644 index 000000000..65bc0e637 --- /dev/null +++ b/dap4_test/baselineremote/test_struct_nested.nc.ncdump @@ -0,0 +1,20 @@ +netcdf test_struct_nested { +types: + compound x_field1_t { + int x ; + int y ; + }; // x_field1_t + compound x_field2_t { + int x ; + int y ; + }; // x_field2_t + compound x_t { + x_field1_t field1 ; + x_field2_t field2 ; + }; // x_t +variables: + x_t x ; +data: + + x = {{1, -2}, {255, 90}} ; +} diff --git a/dap4_test/baselineremote/test_struct_nested3.nc.ncdump b/dap4_test/baselineremote/test_struct_nested3.nc.ncdump new file mode 100644 index 000000000..358950a1c --- /dev/null +++ b/dap4_test/baselineremote/test_struct_nested3.nc.ncdump @@ -0,0 +1,17 @@ +netcdf test_struct_nested3 { +types: + compound x_field3_field2_t { + int field1 ; + }; // x_field3_field2_t + compound x_field3_t { + x_field3_field2_t field2 ; + }; // x_field3_t + compound x_t { + x_field3_t field3 ; + }; // x_t +variables: + x_t x ; +data: + + x = {{{17}}} ; +} diff --git a/dap4_test/baselineremote/test_struct_type.nc.ncdump b/dap4_test/baselineremote/test_struct_type.nc.ncdump new file mode 100644 index 000000000..68897d31f --- /dev/null +++ b/dap4_test/baselineremote/test_struct_type.nc.ncdump @@ -0,0 +1,12 @@ +netcdf test_struct_type { +types: + compound s_t { + int x ; + int y ; + }; // s_t +variables: + s_t s ; +data: + + s = {1, -2} ; +} diff --git a/dap4_test/baselineremote/test_test.nc.ncdump b/dap4_test/baselineremote/test_test.nc.ncdump new file mode 100644 index 000000000..936c3cfee --- /dev/null +++ b/dap4_test/baselineremote/test_test.nc.ncdump @@ -0,0 +1,9 @@ +netcdf test_test { +types: + byte enum enum_t {c1 = 1, c2 = 2, c3 = 3} ; +variables: + enum_t v1 ; +data: + + v1 = c1 ; +} diff --git a/dap4_test/baselineremote/test_unlim.nc.ncdump b/dap4_test/baselineremote/test_unlim.nc.ncdump new file mode 100644 index 000000000..7b9d1d5cc --- /dev/null +++ b/dap4_test/baselineremote/test_unlim.nc.ncdump @@ -0,0 +1,37 @@ +netcdf test_unlim { +dimensions: + lon = 2 ; + time = UNLIMITED ; // (2 currently) + lat = 3 ; +variables: + float lon(lon) ; + string lon:units = "degrees_east" ; + double time(time) ; + time:_ChunkSizes = 512U ; + string time:units = "seconds since 2009-01-01" ; + float lat(lat) ; + string lat:units = "degrees_north" ; + float pr(time, lat, lon) ; + pr:_ChunkSizes = 1U, 3U, 2U ; + string pr:standard_name = "air_pressure_at_sea_level" ; + string pr:units = "hPa" ; + string pr:_edu.ucar.maps = "/time", "/lat", "/lon" ; + +// global attributes: + string :title = "example for workshop" ; +data: + + lon = _, _ ; + + time = _, _ ; + + lat = _, _, _ ; + + pr = + 0, 1, + 2, 3, + 4, 5, + 10, 11, + 12, 13, + 14, 15 ; +} diff --git a/dap4_test/baselineremote/test_unlim1.nc.ncdump b/dap4_test/baselineremote/test_unlim1.nc.ncdump new file mode 100644 index 000000000..f41940c3d --- /dev/null +++ b/dap4_test/baselineremote/test_unlim1.nc.ncdump @@ -0,0 +1,37 @@ +netcdf test_unlim1 { +dimensions: + lon = 2 ; + lat = 3 ; + time = UNLIMITED ; // (2 currently) +variables: + float lon(lon) ; + string lon:units = "degrees_east" ; + double time(time) ; + time:_ChunkSizes = 512U ; + string time:units = "seconds since 2009-01-01" ; + float lat(lat) ; + string lat:units = "degrees_north" ; + float pr(time, lat, lon) ; + pr:_ChunkSizes = 1U, 3U, 2U ; + string pr:standard_name = "air_pressure_at_sea_level" ; + string pr:units = "hPa" ; + string pr:_edu.ucar.maps = "/time", "/lat", "/lon" ; + +// global attributes: + string :title = "example for workshop" ; +data: + + lon = _, _ ; + + time = _, _ ; + + lat = _, _, _ ; + + pr = + 0, 1, + 2, 3, + 4, 5, + 10, 11, + 12, 13, + 14, 15 ; +} diff --git a/dap4_test/baselineremote/test_utf8.nc.ncdump b/dap4_test/baselineremote/test_utf8.nc.ncdump new file mode 100644 index 000000000..d9429c1be --- /dev/null +++ b/dap4_test/baselineremote/test_utf8.nc.ncdump @@ -0,0 +1,9 @@ +netcdf test_utf8 { +dimensions: + d2 = 2 ; +variables: + string vs(d2) ; +data: + + vs = "Καλημέα", "abc" ; +} diff --git a/dap4_test/baselineremote/test_vlen1.nc.ncdump b/dap4_test/baselineremote/test_vlen1.nc.ncdump new file mode 100644 index 000000000..7329efc0b --- /dev/null +++ b/dap4_test/baselineremote/test_vlen1.nc.ncdump @@ -0,0 +1,12 @@ +netcdf test_vlen1 { +types: + compound x_base_t { + int x ; + }; // x_base_t + x_base_t(*) x_t ; +variables: + x_t x ; +data: + + x = {{1}, {3}, {5}, {7}} ; +} diff --git a/dap4_test/baselineremote/test_vlen11.nc.ncdump b/dap4_test/baselineremote/test_vlen11.nc.ncdump new file mode 100644 index 000000000..2c8587962 --- /dev/null +++ b/dap4_test/baselineremote/test_vlen11.nc.ncdump @@ -0,0 +1,12 @@ +netcdf test_vlen11 { +types: + compound v_base_t { + int v ; + }; // v_base_t + v_base_t(*) v_t ; +variables: + v_t v ; +data: + + v = {{4}, {754}} ; +} diff --git a/dap4_test/baselineremote/test_vlen2.nc.ncdump b/dap4_test/baselineremote/test_vlen2.nc.ncdump new file mode 100644 index 000000000..698438367 --- /dev/null +++ b/dap4_test/baselineremote/test_vlen2.nc.ncdump @@ -0,0 +1,18 @@ +netcdf test_vlen2 { +types: + compound x_base_t { + int x ; + }; // x_base_t + x_base_t(*) x_t ; +dimensions: + d3 = 3 ; + d2 = 2 ; +variables: + x_t x(d3, d2) ; +data: + + x = + {{1}, {3}, {5}, {7}}, {{100}, {200}}, + {{-1}, {-2}}, {{1}, {3}, {5}, {7}}, + {{100}, {200}}, {{-1}, {-2}} ; +} diff --git a/dap4_test/baselineremote/test_vlen3.nc.ncdump b/dap4_test/baselineremote/test_vlen3.nc.ncdump new file mode 100644 index 000000000..bfe1a6fe8 --- /dev/null +++ b/dap4_test/baselineremote/test_vlen3.nc.ncdump @@ -0,0 +1,15 @@ +netcdf test_vlen3 { +types: + compound v1_f1_base_t { + int f1 ; + }; // v1_f1_base_t + v1_f1_base_t(*) v1_f1_t ; + compound v1_t { + v1_f1_t f1 ; + }; // v1_t +variables: + v1_t v1 ; +data: + + v1 = {{{1}, {3}, {5}, {7}}} ; +} diff --git a/dap4_test/baselineremote/test_vlen4.nc.ncdump b/dap4_test/baselineremote/test_vlen4.nc.ncdump new file mode 100644 index 000000000..a6e1b4656 --- /dev/null +++ b/dap4_test/baselineremote/test_vlen4.nc.ncdump @@ -0,0 +1,17 @@ +netcdf test_vlen4 { +types: + compound v1_f1_base_t { + int f1 ; + }; // v1_f1_base_t + v1_f1_base_t(*) v1_f1_t ; + compound v1_t { + v1_f1_t f1(2) ; + }; // v1_t +dimensions: + _Anonymous2 = 2 ; +variables: + v1_t v1 ; +data: + + v1 = {{{{1}, {3}, {5}, {7}}, {}}} ; +} diff --git a/dap4_test/baselineremote/test_vlen5.nc.ncdump b/dap4_test/baselineremote/test_vlen5.nc.ncdump new file mode 100644 index 000000000..40da63950 --- /dev/null +++ b/dap4_test/baselineremote/test_vlen5.nc.ncdump @@ -0,0 +1,17 @@ +netcdf test_vlen5 { +types: + compound v1_v_base_t { + int v ; + }; // v1_v_base_t + v1_v_base_t(*) v1_v_t ; + compound v1_t { + v1_v_t v ; + }; // v1_t +dimensions: + d2 = 2 ; +variables: + v1_t v1(d2) ; +data: + + v1 = {{{1}, {3}, {5}, {7}}}, {{{100}, {200}}} ; +} diff --git a/dap4_test/baselineremote/test_vlen6.nc.ncdump b/dap4_test/baselineremote/test_vlen6.nc.ncdump new file mode 100644 index 000000000..c76ddedeb --- /dev/null +++ b/dap4_test/baselineremote/test_vlen6.nc.ncdump @@ -0,0 +1,14 @@ +netcdf test_vlen6 { +types: + compound v1_base_t { + int v1 ; + }; // v1_base_t + v1_base_t(*) v1_t ; +dimensions: + d = 2 ; +variables: + v1_t v1(d) ; +data: + + v1 = {{1}, {3}, {5}, {7}}, {{17}, {19}} ; +} diff --git a/dap4_test/baselineremote/test_vlen7.nc.ncdump b/dap4_test/baselineremote/test_vlen7.nc.ncdump new file mode 100644 index 000000000..9b1a2a3a6 --- /dev/null +++ b/dap4_test/baselineremote/test_vlen7.nc.ncdump @@ -0,0 +1,14 @@ +netcdf test_vlen7 { +types: + compound v1_base_t { + int v1 ; + }; // v1_base_t + v1_base_t(*) v1_t ; +dimensions: + d = 1 ; +variables: + v1_t v1(d) ; +data: + + v1 = {{17}, {19}, {21}} ; +} diff --git a/dap4_test/baselineremote/test_vlen8.nc.ncdump b/dap4_test/baselineremote/test_vlen8.nc.ncdump new file mode 100644 index 000000000..b8d9b7ff1 --- /dev/null +++ b/dap4_test/baselineremote/test_vlen8.nc.ncdump @@ -0,0 +1,17 @@ +netcdf test_vlen8 { +types: + compound v1_base_t { + int v1 ; + }; // v1_base_t + v1_base_t(*) v1_t ; +dimensions: + d1 = 2 ; + d2 = 2 ; +variables: + v1_t v1(d1, d2) ; +data: + + v1 = + {{1}, {3}, {5}, {7}}, {{17}, {19}}, + {{11}, {33}, {55}, {77}}, {{717}, {919}} ; +} diff --git a/dap4_test/baselineremote/test_zerodim.nc.ncdump b/dap4_test/baselineremote/test_zerodim.nc.ncdump new file mode 100644 index 000000000..aa1451c33 --- /dev/null +++ b/dap4_test/baselineremote/test_zerodim.nc.ncdump @@ -0,0 +1,24 @@ +netcdf test_zerodim { +dimensions: + lon = 4 ; + time = UNLIMITED ; // (0 currently) + lat = 6 ; + unlim = UNLIMITED ; // (3 currently) +variables: + float var(unlim) ; + var:_ChunkSizes = 1024U ; + float lon(lon) ; + string lon:units = "degrees_east" ; + float lat(lat) ; + string lat:units = "degrees_north" ; + +// global attributes: + string :title = "example for workshop" ; +data: + + var = 0, 1, 3 ; + + lon = _, _, _, _ ; + + lat = _, _, _, _, _, _ ; +} diff --git a/dap4_test/test_remote.sh b/dap4_test/test_remote.sh index a1ae8070a..3105fd876 100755 --- a/dap4_test/test_remote.sh +++ b/dap4_test/test_remote.sh @@ -10,7 +10,7 @@ set -e echo "test_remote.sh:" #BIG=1 -#NOCSUM=1 +#CSUM=1 computetestablefiles @@ -24,13 +24,19 @@ fi if test "x${RESET}" = x1 ; then rm -fr ${BASELINEREM}/*.ncdump ; fi for f in $F ; do - URL="[log][show=fetch][dap4]${TESTSERVER}/testfiles/${f}" + FRAG="#dap4&log&show=fetch" + QUERY="" if test "x$BIG" = x1; then - URL="[ucar.littleendian=0]${URL}" + FRAG="${FRAG}&ucar.littleendian=0" fi - if test "x$NOCSUM" = x1; then - URL="[ucar.checksummode=none]${URL}" + if test "x$CSUM" = x1 ; then + QUERY="${QUERY}&dap4.checksum=true" + else + QUERY="${QUERY}${QCHAR}&dap4.checksum=false" fi + # Fix up QUERY + if test "x$QUERY" != x ; then QUERY=`echo -n $QUERY | sed -e 's/^&/?/'` ; fi + URL="${TESTSERVER}/testfiles/${f}${QUERY}${FRAG}" ${NCDUMP} ${DUMPFLAGS} "${URL}" > ${builddir}/results_test_remote/${f}.ncdump if test "x${TEST}" = x1 ; then diff -wBb "${BASELINEREM}/${f}.ncdump" "${builddir}/results_test_remote/${f}.ncdump"