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

Add 1D version of GeoClaw solver #182

Open
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

ketch
Copy link
Member

@ketch ketch commented Dec 2, 2024

This is something I put together several years ago by straightforward modification of the 2D Geoclaw solver. I've been using it ever since but somehow never added it to the main repository.

I think @rjleveque has also been developing a 1D version of the Geoclaw solver that might be superior to this one but I don't know the status of that.

@mandli
Copy link
Member

mandli commented Dec 2, 2024

If this is updated to match the newest versions of the GeoClaw 2D solvers I would almost favor updating what's in geoclaw_riemann_utils.f as well. We have been meaning to update those and possibly update them to be faster but have not gotten around to it. This at least would make it in F90.

@rjleveque
Copy link
Member

The 1D solver I was working on has been incorporated into GeoClaw (as of v5.10.0), see https://www.clawpack.org/geoclaw1d.html for documentation. There's no AMR but mapped grids are supported, which is very useful to go from large cells offshore to small cells onshore for realistic topo.

Note that a Boussinesq version is also available, https://www.clawpack.org/bouss1d.html.

There are some examples using both codes in
$CLAW/geoclaw/examples/1d_classic, shown in the gallery here. More examples would be good at some point.

These use the Riemann solver in $CLAW/geoclaw/examples/1d_classic/rp1_geoclaw.f90 and I realize now I should have put this in the riemann repository. It uses riemann_aug_JCP from $CLAW/riemann/src/geoclaw_riemann_utils.f.

@ketch, I'll talk a look at how your version compares to what I've been using. I think one or the other (or some combination) should be put in the riemann repository, but let's take a closer look before merging this.

I agree with @mandli that at some point we need to clean up these solvers, and I've also been talking with @dlgeorge recently about this in relation to the D-Claw solvers, which are similar but were branched off from GeoClaw at some point and so some things aren't identical that should be.

@ketch
Copy link
Member Author

ketch commented Dec 2, 2024

I recall that I had to make some major structural changes in order to get f2py to produce something that could be called from Python. So it may be necessary to have two versions (we already do for the 2D solver I think). Unless somebody knows a better solution.

@mandli
Copy link
Member

mandli commented Dec 2, 2024

I only recall there being an issue with common blocks, was there something in addition to that?

@ketch
Copy link
Member Author

ketch commented Dec 2, 2024

We have common blocks in a lot of solvers and those work fine with f2py. But it's been 10 years since I looked at this stuff so I don't recall what the issues are.

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

Successfully merging this pull request may close these issues.

3 participants