Closed elbeejay closed 3 years ago
Yeah these are looking much cleaner so far. I do think now is a good time to add a verbose
flag like Nelson suggested.
We should probably also go ahead and add a seed_time
to the particle generator while we have this open.
Will look into the border stuff rn to see what might be happening there.
Yeah these are looking much cleaner so far. I do think now is a good time to add a
verbose
flag like Nelson suggested. We should probably also go ahead and add aseed_time
to the particle generator while we have this open.
Good idea, I added these to the PR
Sorry for leaving this open for so long, it escaped my mind. All of these changes look good to me and I don't really have anything to add. I didn't find anything off about the way we handle the border in unstruct2grid
or otherwise, so I think maybe the cell_type
raster was being overwritten locally or something. Regardless, it looks like those issues resolved themselves somewhat.
Going to merge this so I can update my local codes, might have some interesting developments on improving runtimes after some testing. Will let you know soon.
PR does 7 minor things
particle_track.py
from strings printed to the console to proper Pythonwarnings
, also augments existing tests to ensure these warnings are called and the text in the warning is what is expected.run_iteration
call which provides the number of particles in this category and their indices.exposure_time
as well so the printing is reduced to a single statement as opposed to one for each particle that do not leave the ROI.plot_exposure_time()
just add the if-statement to makesave_output
work as intendedseed_time
as an optional parameter to the particle generation function, if set to a value other than 0 a warning will be raised to remind the user to use caution when post-processing as some (or all) travel times have been shifted some amount. Some tests added and updated to check behavior of function and ensure type-checking works.routines.py
self.verbose
as an attribute ofmodelParams
that gets passed toParticles
, default is True meaning print statements and warnings are shown. Can be set to False and coreParticles
functions will not output anything to the console. Note, verbosity could also be modified on the fly by directly changing theParticles.verbose
value, so if you wanted to run 1 iteration and check the warnings/print statements you could set it to True, and then turn it off be setting it to False for subsequent iterations.