From 2bb0c9590eb1b905d466d9a56b8d54b7e57d366b Mon Sep 17 00:00:00 2001 From: mjreno Date: Mon, 21 Oct 2024 08:01:04 -0400 Subject: [PATCH] tolerate dimension 0 static list input (#2038) Co-authored-by: mjreno --- src/Utilities/Idm/mf6blockfile/LoadMf6File.f90 | 2 +- src/Utilities/Idm/mf6blockfile/StructArray.f90 | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/src/Utilities/Idm/mf6blockfile/LoadMf6File.f90 b/src/Utilities/Idm/mf6blockfile/LoadMf6File.f90 index 0382e7151b4..c4698340a31 100644 --- a/src/Utilities/Idm/mf6blockfile/LoadMf6File.f90 +++ b/src/Utilities/Idm/mf6blockfile/LoadMf6File.f90 @@ -602,7 +602,7 @@ subroutine parse_structarray_block(this, iblk) call mem_setptr(nrow, idt%shape, this%mf6_input%mempath) nrows = nrow else - nrows = 0 + nrows = -1 end if ! ! -- create a structured array diff --git a/src/Utilities/Idm/mf6blockfile/StructArray.f90 b/src/Utilities/Idm/mf6blockfile/StructArray.f90 index c7b3ec5529d..44c3575ea03 100644 --- a/src/Utilities/Idm/mf6blockfile/StructArray.f90 +++ b/src/Utilities/Idm/mf6blockfile/StructArray.f90 @@ -90,7 +90,8 @@ function constructStructArray(mf6_input, ncol, nrow, blocknum, mempath, & ! ! -- set rows if known or set deferred struct_array%nrow = nrow - if (struct_array%nrow == 0) then + if (struct_array%nrow == -1) then + struct_array%nrow = 0 struct_array%deferred_shape = .true. end if !