-
Notifications
You must be signed in to change notification settings - Fork 127
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
refactor(IC): integrate initial conditions pkg with IDM #1425
Conversation
wpbonelli
commented
Nov 3, 2023
•
edited
Loading
edited
- use IDM to load flow and transport model initial conditions (no options, just grid data)
- rebased after refactor(idm): remove component level FoundType and param sfac constr… #1421
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you for doing this, @wpbonelli
! -- ensure STRT was found | ||
if (.not. found%strt) then | ||
write (errmsg, '(a)') 'Error in GRIDDATA block: STRT not found.' | ||
call store_error(errmsg) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we need another call to say what input file caused this error. Also, if store_error() isn't given terminate=.true., in this case the program will just continue until we do a check for count_errors. Do we need something like this?
call store_error_filename(this%input_fname)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Revised to
call store_error(errmsg, terminate=.false.)
call store_error_filename(this%input_fname)
I noticed store_error
defaults to terminate false while store_error_filename
defaults true. Should these be consistent or is this deliberate?
src/Model/GroundWaterFlow/gwf3.f90
Outdated
! -- Allocate and read modules attached to model | ||
if (this%inic > 0) call this%ic%ic_ar(this%x) | ||
! -- Load modules attached to model | ||
if (this%inic > 0) call this%ic%ic_load(this%x) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Unless there is some reason we need to wait until AR, I think we should call this ic_load method as soon as possible, maybe toward the end of ic_create?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
After trying this out, it seems this needs to come after define (*_df
), I think because that's where discretization sources its info, so I left this in AR for now.
! | ||
! -- Assign x equal to strt | ||
! -- assign starting head |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe we couldn't do this in ic_cr, which is why we are calling ic_load() as part of the AR calls. Maybe we can keep an ic_ar() routine and assign strt to model%x in it. I know it is not a "allocate and read" action, but maybe we keep the names consistent for now and consider renaming them later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.