From 415f9f3354b1b94996415e527835f7b8e14d67be Mon Sep 17 00:00:00 2001 From: myang6 Date: Thu, 5 Feb 2026 14:31:38 -0500 Subject: [PATCH 1/7] HYRAX-2007, add a member and a method to store the ratio of the array size to the real storage size. Application needs to feed in the number. This member can apply to both the whole array or the subset. --- Array.h | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/Array.h b/Array.h index ae3bfd6d8..ae69cf051 100644 --- a/Array.h +++ b/Array.h @@ -185,6 +185,7 @@ class Array : public Vector { vector var_chunk_info; }; + private: D4Maps *d_maps = nullptr; @@ -193,6 +194,8 @@ class Array : public Vector { bool direct_io_flag = false; var_storage_info vs_info; + float storage_size_ratio = 1; + void update_dimension_pointers(D4Group *grp); void print_dim_element(const XMLWriter &xml, const dimension &d, bool constrained); @@ -315,6 +318,11 @@ class Array : public Vector { void set_dio_flag(bool dio_flag_value = true) { direct_io_flag = dio_flag_value; } var_storage_info &get_var_storage_info() { return vs_info; } void set_var_storage_info(const var_storage_info &my_vs_info); + + // The following methods are for the applications that care about storage size. + // By default, the storage_size is set to be 0(we may need to set it to the total number of bytes). + float get_storage_size_ratio() {return storage_size_ratio;} + void set_storage_size_ratio(float sr) {storage_size_ratio = sr;} }; } // namespace libdap From de7b27cc124ad0305cd104f3dd938c8304b70332 Mon Sep 17 00:00:00 2001 From: myang6 Date: Thu, 12 Mar 2026 14:39:02 -0400 Subject: [PATCH 2/7] HYRAX-1950, make the switch-branch work. --- retired/VCPP/BeforeInstall.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/retired/VCPP/BeforeInstall.txt b/retired/VCPP/BeforeInstall.txt index 18ccd45ce..04b2b1cf5 100644 --- a/retired/VCPP/BeforeInstall.txt +++ b/retired/VCPP/BeforeInstall.txt @@ -1 +1 @@ -In addition to installing libdap 3.8.2, this will also install other run-time libraries libdap uses. However, this will not install the software need to compile our source code on the Windows XP platform. For more information about building our software from source, see http://scm.opendap.org/trac/wiki/XP or contact us at support at opendap.org. +In addition to installing libdap 3.8.2, this will also install other run-time libraries libdap uses. However, this will not install the software need to compile our source code on the Windows XP platform. For more information about building our software from source, see http://scm.opendap.org/trac/wiki/XP or contact us at support at opendap.org. From e1aa010a7a2afd77ecdd733c06b4616c62d21ec8 Mon Sep 17 00:00:00 2001 From: myang6 Date: Thu, 12 Mar 2026 15:19:31 -0400 Subject: [PATCH 3/7] HYRAX-1950, add a two new fields. One for the direct chunk IO, one for the optimization to see if compression should be turned on in the fileout netCDF module. --- Array.h | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/Array.h b/Array.h index 1423bbbaf..7d4cb0e1b 100644 --- a/Array.h +++ b/Array.h @@ -191,6 +191,7 @@ class Array : public Vector { /** @brief Storage layout and filter metadata for direct-I/O reads. */ struct var_storage_info { + bool has_filled_chunks; ///< Whether this array has chunks that only contain filled values. string filter; ///< Filter pipeline description. vector deflate_levels; ///< Deflate levels per filter stage. vector chunk_dims; ///< Chunk dimensions in row-major order. @@ -507,8 +508,14 @@ class Array : public Vector { void set_var_storage_info(const var_storage_info &my_vs_info); // The following methods are for the applications that care about storage size. - // By default, the storage_size is set to be 0(we may need to set it to the total number of bytes). + + /** @brief Returns the ratio of logical size to the real storage size for this array. */ float get_storage_size_ratio() {return storage_size_ratio;} + + /** + * @brief set the ratio of the logical size to the real storage size for this array. + * @param the ratio of the logical size to the real storage size for this array. + */ void set_storage_size_ratio(float sr) {storage_size_ratio = sr;} }; From 7a4380a5ffbf94e5e24dd0d8222bdb2a9e4c64ae Mon Sep 17 00:00:00 2001 From: myang6 Date: Fri, 13 Mar 2026 07:58:14 -0400 Subject: [PATCH 4/7] HYRAX-1950, use clang-format. --- Array.h | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/Array.h b/Array.h index 7d4cb0e1b..433937e93 100644 --- a/Array.h +++ b/Array.h @@ -198,7 +198,6 @@ class Array : public Vector { vector var_chunk_info; ///< Per-chunk metadata records. }; - private: D4Maps *d_maps = nullptr; @@ -510,13 +509,13 @@ class Array : public Vector { // The following methods are for the applications that care about storage size. /** @brief Returns the ratio of logical size to the real storage size for this array. */ - float get_storage_size_ratio() {return storage_size_ratio;} + float get_storage_size_ratio() { return storage_size_ratio; } - /** - * @brief set the ratio of the logical size to the real storage size for this array. + /** + * @brief set the ratio of the logical size to the real storage size for this array. * @param the ratio of the logical size to the real storage size for this array. */ - void set_storage_size_ratio(float sr) {storage_size_ratio = sr;} + void set_storage_size_ratio(float sr) { storage_size_ratio = sr; } }; } // namespace libdap From 293ec6dc8764c80f6555f35665f9138c2f2e5d20 Mon Sep 17 00:00:00 2001 From: myang6 Date: Mon, 16 Mar 2026 08:59:49 -0400 Subject: [PATCH 5/7] HYRAX-1950, set the filled chunk flag for the varaible storage info. --- Array.cc | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Array.cc b/Array.cc index 36b3a6e9c..592c6253a 100644 --- a/Array.cc +++ b/Array.cc @@ -1337,6 +1337,8 @@ void Array::dump(std::ostream &strm) const { */ void Array::set_var_storage_info(const var_storage_info &my_vs_info) { + vs_info.has_filled_chunks = my_vs_info.has_filled_chunks; + vs_info.filter = my_vs_info.filter; for (const auto &def_lev : my_vs_info.deflate_levels) From c30198f148ae22d99d7bac868ec5c2e18ccf457a Mon Sep 17 00:00:00 2001 From: myang6 Date: Mon, 16 Mar 2026 09:12:07 -0400 Subject: [PATCH 6/7] HYRAX-1950, follow clang-format. --- Array.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Array.cc b/Array.cc index 592c6253a..a57a274ce 100644 --- a/Array.cc +++ b/Array.cc @@ -1337,7 +1337,7 @@ void Array::dump(std::ostream &strm) const { */ void Array::set_var_storage_info(const var_storage_info &my_vs_info) { - vs_info.has_filled_chunks = my_vs_info.has_filled_chunks; + vs_info.has_filled_chunks = my_vs_info.has_filled_chunks; vs_info.filter = my_vs_info.filter; From 589514ed7ac333f3ab4a82e6ac68a676ffe73d4d Mon Sep 17 00:00:00 2001 From: myang6 Date: Mon, 16 Mar 2026 11:52:08 -0400 Subject: [PATCH 7/7] HYRAX-1950, reduce a sonar cloud code smell --- Array.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Array.h b/Array.h index 433937e93..27b60acb0 100644 --- a/Array.h +++ b/Array.h @@ -509,7 +509,7 @@ class Array : public Vector { // The following methods are for the applications that care about storage size. /** @brief Returns the ratio of logical size to the real storage size for this array. */ - float get_storage_size_ratio() { return storage_size_ratio; } + float get_storage_size_ratio() const { return storage_size_ratio; } /** * @brief set the ratio of the logical size to the real storage size for this array.