barbagroup / geoclaw

A fork of GeoClaw (http://www.clawpack.org/geoclaw) for hydrocarbon overland flow
BSD 3-Clause "New" or "Revised" License
3 stars 3 forks source link

Tracer of the removed fluid in hydro module will lose information in a restart simulation #15

Open piyueh opened 5 years ago

piyueh commented 5 years ago

If a simulation is a restart session, then the tracer will lose the information from the previous simulation. But given that land-spill simulations are usually very short, restarting does not required frequently. So this issue will not be addressed in the near future.

mandli commented 5 years ago

One thing of note, if the tracer value is stored in the q array then it will be available. The entirety of the alloc array, which stores the grid data, aux data, etc., all gets saved (hence the size of the restart files).

piyueh commented 5 years ago

Thank you @mandli. The reason I didn't use q array for the tracer is that only cells surrounding water bodies have values in the tracer. Using q array for this purpose will waste memory on cells that will never have non-zero values.

mandli commented 5 years ago

Ah, so you are storing things in a very small part of the domain yourself?

piyueh commented 5 years ago

Not really. The tracer is a fixed Cartesian mesh (or says, a raster in GIS terminology) covering the whole computational domain. But the data on this "tracer mesh" is not a dense array, unlike q or aux. The data is a sparse matrix in CSR format. And the locations of non-zero entries in this sparse matrix are the cells surrounding water bodies. So, no matter how many cells are in this tracer mesh in total, the memory consumed is only relevant to the number of cells surrounding water bodies.

mandli commented 5 years ago

Now I understand, this is not actually for the oil itself but the oil in the water.

piyueh commented 5 years ago

Yes, you're right!