Repository navigation
feat(idm): integrate MAW package - #2748
Conversation
bda19ae to
89fab01
Compare
|
@mjreno if possible I would wait before merging this PR until #2858 is merged. Hopefully @christianlangevin can review #2858 before you are ready. |
|
select case (this%struct_vectors(icol)%memtype)
case (MTYPE_DBL) ! DOUBLE: use DNODATA sentinel
this%struct_vectors(icol)%dbl1d(irow) = DNODATA
case (MTYPE_STR) ! STRING or KEYWORD: use empty string sentinel
this%struct_vectors(icol)%charstr1d(irow) = ''
end selectNothing hits this today because no converted definition file has an integer member in a keystring; the MAW period members are all keyword records, strings, and reals. I ran into it prototyping a new MAW period setting on top of this branch that takes a connection number and a status, which is the first setting with an integer member. Adding a case for integers is enough: case (MTYPE_INT) ! INTEGER: use zero sentinel
this%struct_vectors(icol)%int1d(irow) = 0Reading the member only when the dispatch keyword selects it avoids the stale value, so this is not blocking, but a setting that reads its integer unconditionally would pick up the wrong connection or index. Worth folding into this pull request while the file is open. Everything else worked as expected: the compound dispatch reads an integer followed by a string without any change, and |
|
Thanks @jdhughes-dev will definitely take a look at this as part of the current PR. |
fe1f625 to
9bd3816
Compare
c028029 to
1e6c443
Compare
|
The SETTING column stores the parameter tagname, which is silently truncated for any tag longer than 16 characters, so a package that dispatches on such a tag never matches and the setting is ignored without an error.
! write dispatch keyword as tagname to SETTING column when present
if (setting_icol > 0) then
this%struct_vectors(setting_icol)%charstr1d(irow) = &
trim(this%struct_vectors(found_col)%idt%tagname)
end if
call this%structarray%mem_create_vector(sa_icol, this%ctx%setting_idt, &
charlen=LENVARNAME)MAW Storing ! write dispatch keyword as mf6varname to SETTING column when present
if (setting_icol > 0) then
this%struct_vectors(setting_icol)%charstr1d(irow) = &
trim(this%struct_vectors(found_col)%idt%mf6varname)
end ifThat is not a drop-in change, because three of the comparisons in
The alternative, if the tagname is the semantics you want, is to widen the column instead and leave the comparisons alone: call this%structarray%mem_create_vector(sa_icol, this%ctx%setting_idt, &
charlen=LINELENGTH)Either resolves the truncation. I would prefer the Found while rebasing #2914 onto this branch: its |
|
Thanks @jdhughes-dev for the report. This is definitely an issue- if possible can you delay on the rebase until after I push again? I'll update this branch later today and fix but there are other changes coming as well (mostly in the Idm code). |
3801597 to
4bc4ddf
Compare
Integrate
GWF-MAWwithIDM.Checklist of items for pull request
ruffon new and modified python scripts in .doc, autotests, doc, distribution, pymake, and utils subdirectories.fprettifyFor additional information see instructions for contributing and instructions for developing.