-
Notifications
You must be signed in to change notification settings - Fork 87
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
Inaccurate documentation for iqinit = 4? #504
Comments
You are correct that this is simply "perturbing" a state at rest but GeoClaw currently has no other way to initialize the sea-surface without additional code modifications so there really is no alternative anyway EXCEPT when an instantaneous earthquake is specified. In that case I think it really does perturb the surface like you were thinking although I am not entirely certain, it was not really designed to be used simultaneously like that. |
@piyueh: Yes, I think you're right that there are some inconsistencies in the documentation, and probably unintended behavior in the code in some cases. Thanks for pointing this out. This ability to read a qinit file dates from early versions of GeoClaw where we always assumed I think the lines you flagged in geoclaw/src/2d/shallow/qinit_module.f90 Lines 168 to 170 in 3431f65
should probably be replaced by something like:
Does that seem right? We should think a bit about what the desired behavior is on land. If |
Thanks for your replies! I was just trying to make sure I understand it correctly. Another thing is that I just realized the |
Yeah, trying to make things a bit more explicitly named. |
Looking at the earlier lines in geoclaw/src/2d/shallow/qinit_module.f90 Lines 164 to 170 in 3431f65
I see that for qinit_type < 4 (i.e. when specifying a perturbation to h, hu, or hv ) the perturbation is only apply to cells if the topo is below sea level, presumably meant to be only the wet cells. But now that var_eta_init is allowed this won't necessarily have the expected behavior. I think instead we could just check if q(1,i,j) > 0 , i.e. if qinit.f90 initialized the cell as wet.
For consistency we could also do the same thing for
And note that in this case any cell forced to be dry in |
Oops -- thinking more about this, I think that we actually wanted So the whole point of introducing So maybe the code is right and only the documentation needs tweaking. |
That makes sense to me given what we generally do here. The subroutine name is a bit misleading but I think it is probably still better just to clarify the documentation. |
On GeoClaw's website (https://www.clawpack.org/setrun_geoclaw.html#setrun-qinit), it says
Maybe I misunderstand this description, but it seems the source code is simply taking the values as the water surface level
eta
, rather than the perturbation toeta
. For example, inqinit_module.f90
:geoclaw/src/2d/shallow/qinit_module.f90
Lines 183 to 184 in 3431f65
And also from here:
geoclaw/src/2d/shallow/qinit_module.f90
Lines 168 to 170 in 3431f65
So I guess the documentation on GeoClaw's website is not accurate? (Actually, on another page here, the description of
iqinit=4
in the last paragraph matches the source code.)The text was updated successfully, but these errors were encountered: