Skip to content
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

Consider adding mnw1to2 back to distribution #29

Open
langevin-usgs opened this issue Feb 7, 2017 · 0 comments
Open

Consider adding mnw1to2 back to distribution #29

langevin-usgs opened this issue Feb 7, 2017 · 0 comments

Comments

@langevin-usgs
Copy link
Contributor

Here is an email exchange between Lenny and Arlen. If there is demand for this program, we could consider adding it back, perhaps using some of this information to improve the program.

Hi Arlen,

Well I finally figured out what was going on--by reading my own MNW2 documentation report--where note 4 on p. 48 explains that one can specify a negative value for any or all of the 3 parameters defined in data set 2c, and that this negative value is a flag to indicate that the actual value can vary by node and that the actual values are then specified in data set 2d. There doesn't seem to be any problem with your code, and the data written to 2d was actually done correctly in Brian's output file. So it was just his seeing the three "-1" values on line 2c that threw him off. And when he told me it was a problem, I had forgotten about note 4 and didn't realize what the mnw1to2 code was doing. So I told him just now that the files look correct and to run the model with the converted mnw2 file in the input and see what he gets. I suspect it will run. Anyway, thanks for your time and your help, and sorry I didn't figure it out faster.  
Let me know if you'd ever want to meet somewhere for lunch. I'm generally available most days, and I'd enjoy getting together with you.

Best regards,

Lenny

On Wed, Sep 28, 2016 at 3:05 PM, Harbaughs [email protected] wrote:
Lenny,

Apparently there has been a change to mnw1to2.f between what is distributed with the latest MODFLOW version and the version I had found when I sent you the supporting fortran files. The changes affect some of the subroutine arguments as you discovered. I cannot find the supporting subroutines that go with the currently distributed mnw1to2.f, but I do have the version of mnw1to2.f that goes with the supporting files I sent you. So I am attaching that version of mnw1to2.f . This was part of MF2005 version 1.8.

Although I do not have and Intel compiler, I do have Gnu Fortran, G95, and I have successfully compiled this version of mnw1to2 with G95 using the supporting files I sent previously. So you should be able to compile this with the debugger. I am thinking/hoping that this older version of mnw1to2 should work fine with Brian's dataset. I am speulating that mnw1to2 was changed only because of changes to the way MODFLOW's data structures were changed to support multiple grids. This should not have any impact on a single grid simulation.

Please let me know how this works.

--Arlen

On 9/22/2016 3:25 PM, Lenny Konikow wrote:
HI Arlen,

Thanks so much for sending the missing files. The code compiled fine, but once again it doesn't run to completion. I wonder if the mnw1to2.f file that comes with the distribution is the latest file. I see an incompatibility between its call on line 91 (     CALL GWF2BAS7AR(IN,CUNIT,24,31,32,12,HEADNG,26)    )  with 8 parameters and the receiving statement in "basbcflpf.f" with 6 parameters (    SUBROUTINE GWF2BAS7AR(INUNIT,CUNIT,IUDIS,IUZON,IUMLT,IUPVAL)   ). I think IUPVAL should get the value 26, but it's getting the value of 12. 
Any help, thoughts, or suggestions will be greatly appreciated. No rush, as I will be out of the office until at least next Thursday.

Best regards,

Lenny

On Wed, Sep 21, 2016 at 8:33 PM, Harbaughs [email protected] wrote:
Lenny,

I guess no users have ever tried compiling this code from the source code provided on the web because 3 additional source files are required as well as the usual openspec.inc file. I've attached the required files, and it should be a straight-forward compilation once you combine these files with mnw1to2.f . As you discovered some of the subroutines in the regular MF2005 code have the required names that mnw1to2 requires, but using the MF2005 versions won't work right. Please let me know whether or not this works OK. Sorry about this problem.

It's good to hear from you. I don't connect much with WRD anymore, but I've been keeping in touch with Tom Reilly and Jim LaBaugh. I'm glad to hear that you continue helping our project people. Say hello to Brian for me.

--Arlen

On 9/21/2016 11:46 AM, Lenny Konikow wrote:
Hi Arlen,

I hope this finds you doing well. I am writing to ask for your help with your mnw1to2 code. Brian Clark (MS WSC) used it and it gave some strange results, and he asked me to help figure it out. So I wanted to recompile your code in debug mode, but couldn't find any clear instructions on how to do that (do you have any?). The file "mnw1to2.f" that is distributed with the mf2005 documentation is only a part of the whole code. When I put that file together with the latest version of the mf2005 code, I can get it to compile, but when running the data files it stops/fails on line 77 (iout=100) of mnw1to2.f. I discussed with Chris Langevin, and we suspect that it's related to iout being a pointer and you may have modified the mf2005 code to preclude this error by allocating it before line 77 is reached. Would it be possible for you to send me a copy of the entire fortran code that underlies the mnw1to2 executable? Any other comments or suggestions would be greatly appreciated.

Best regards,

Lenny
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant