modflowpy / flopy

A Python package to create, run, and post-process MODFLOW-based models.
https://flopy.readthedocs.io
Other
517 stars 313 forks source link

Bugs in mtlkt.py #402

Closed gdefilippis closed 6 years ago

gdefilippis commented 6 years ago

1) Lines 167 - 174 should be replaced by:

self.coldlak = [Util2d(model, (nlkinit,), np.float32, coldlak,
                             name='coldlak', locat=self.unit_number[0],
                             array_free_format=False)]

This is because you would get an error at line 190, saying that the method append cannot be used if self.coldlak is an Util2d object instead of a list.

2) Line 227 should be replaced by:

for coldlak in self.coldlak:
    f_lkt.write(coldlak.get_file_entry())

This is because in the .lkt file you would get coldlak values for the first species only

3) Line 446 should be replaced by:

for icomp in range(1, ncomp): 
langevin-usgs commented 6 years ago

Thanks @gdefilippis, we are taking a look.

emorway-usgs commented 6 years ago

@gdefilippis thanks for bringing this to our attention. I'm going to work on putting together a multi-species test problem with LKT. If you have a small example already put together that builds the model from scratch, and wouldn't mind sharing, I will incorporate that instead.

Thanks, Eric

On Mon, Oct 1, 2018 at 11:15 AM gdefilippis notifications@github.com wrote:

  1. Lines 167 - 174 should be replaced by:

self.coldlak = [Util2d(model, (nlkinit,), np.float32, coldlak, name='coldlak', locat=self.unit_number[0], array_free_format=False)]

This is because you would get an error at line 190, saying that the method append cannot be used if self.coldlak is an Util2d object instead of a list.

  1. Line 227 should be replaced by:

for coldlak in self.coldlak: f_lkt.write(coldlak.get_file_entry())

This is because in the .lkt file you would get coldlak values for the first species only

  1. Line 446 should be replaced by:

for icomp in range(1, ncomp):

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/modflowpy/flopy/issues/402, or mute the thread https://github.com/notifications/unsubscribe-auth/ADFi4AvVR_vlmgEuFfL9ZaXI_Gedt8azks5uglu6gaJpZM4XCnN9 .

gdefilippis commented 6 years ago

I have a model I used to integrate the LKT package in the QGIS-based FREEWAT interface (www.freewat.eu), which uses flopy for writing codes input files. The flow model, including 3 lakes, is reasonable, meaning that it runs successfully and it is based on a real-world case study. The transport model has been set with totally unreasonable concentration values, because I used it just to test if the .lkt file was written correctly. I hope you can benefit from this anyway.

Thank you, Giovanna lkt_test.zip

emorway-usgs commented 6 years ago

@gdefilippis If you pull the latest changes on the develop branch, your problem should be working with the changes made under pull request #412 Thanks for your patience. Let us know if something doesn't look quite right.

jdhughes-usgs commented 6 years ago

@emorway-usgs should this issue be closed?

gdefilippis commented 5 years ago

Dear all, I am sorry for delay. I tested this new version and it works fine. Thank you, Giovanna