-
Notifications
You must be signed in to change notification settings - Fork 8
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
Feature/install execute #12
Feature/install execute #12
Conversation
Hi Cas, thanks for doing this now! I wasn't fully aware apparently you had something coming up as well. Will have a look and try to merge your work with some things I had in mind. Some reactions on what I read above:
|
Ah, and to avoid double work in future, maybe try to assign yourself to the corresponding issue! ;) I think I will try to have you review my feature branches from now on through pull request to develop as well, so then you'll always be aware of changes, and two minds reflecting on potential use cases etc. is very useful I think. |
I indeed did not assign myself to #7 or #6; my bad. I'll have some more time over the weekend to go through your comments. I'd like to get to v0.5.0 asap since it seems that I've infected some of the people around me to start using RMODFLOW as well ;) (researchers + students) |
Ok, great! And no problem for #8. Not immediately working on that, except maybe here and there making function names consistent with ModelMuse. Just merged by the way. Not sure if I broke anything. Will try to finalize this asap, so we can merge in develop. |
My idea was that by default,
So withhout lower/upper bounds as discussed in #7 ?
Correct but right now, RMODFLOW only supports HOB and its output...
Ok. Docs should explain the different use-cases then. I think most users would simply run |
This PR addresses #7 and in part #6. Since you're also working on this, I thought it better to PR into this branch instead of develop.
Changes:
rmf_install
is updated. Installing examples is not (yet) supported. As mentioned in RMODFLOW extension packages #10, this might be better suited for a separate package.rmf_install
will install the latest version of a MODFLOW code (either 2005, NWT, OWHM, LGR, CFP or all) for your OS or error out if not available. By default it will install in the "exe" folder of the RMODFLOW package library (created silently if it doesn't exist). Users can specify thedir
argument if they want to install somewhere else. If a copy is already present in the directory, the console prompt will ask to overwrite (unlessprompt = FALSE
which was added if you want to install programatically without possible halting by a prompt).It differs from your branch in that it doesn't keep track of different versions in the same directory. If users want to have multiple versions of a MODFLOW code, they should change the
dir
argument. It also doesn't need thexml2
andrvest
dependencies since the URL's are hardcoded.rmf_run_modflow
is changed tormf_execute
. It is also no longer an S3 method: it can only be run through by specifying the path to the NAME file. So you should first write the model, then run it. For the executable, by default it will look in the "exe" folder in the RMODFLOW package directory for the code specified byversion
. If nothing is found, an error is thrown asking to either specifyexecutable
or try callingrmf_install
By default, a logical is returned specifying whether the model converged. This can be altered by setting
convergence = FALSE
. This was added to ensurermf_optimize
doesn't error out when the model does not converge during optimization.processx::run
is used for calling the terminal commandrmf_run_opt
is nowrmf_optimize
. It only uses the 'L-BFGS-B' method from theoptim
package. It can only be run on models having a PVL file and a HPR output file (see also Consistency with ModelMuse #11). Thetrans
argument was changed tologtrans
since log transformation was the only option available. Might need to be changed back.rmf_run_sen
is nowrmf_analyze
rmf_run_rsm
is removedrmf_find
is removed. Since users should either specify the executables directly or RMODFLOW will look by default in the "exe" folder in the package directory, this function seemed redundant. Please correct me if I'm wrong.Documentation is not build yet. Will do after the merge into develop together with all the functions there.
Dependencies changed: