Closed apaloczy closed 1 year ago
Sorry for slacking on this. I’m on holiday.
No worries at all! Take your time.
@apaloczy, I think it's good to go! Have a look at the docstrings additions I made and modify if needed.
I believe I gave you write rights so you can merge.
@apaloczy, I'm wondering whether there is a requirement that etax_nonperiodic
and etay_nonperiodic
are themselves periodic! I think they should! Otherwise, e.g., the Qx
term won't be periodic and then errors will be introduced via
right?
Giving this more thought, I doubt the non-periodic topo PV would work with anything but constant slope η = a x + b y
.
The equations themselves have to be periodic; otherwise the discontinuity at domain "edges" will cause simulations to blow up.
@apaloczy I suggest we change etax_nonperiodic
to topographic_pv_x_slope
and let that be a Float. Same for y. And clarify that users can prescribe large-scale topographic PV gradient in each direction.
What do you think?
I had a go at it. Have a look. :)
Sorry for the slowness here. I was offline for a couple of days myself. This all sounds great, I think having the large-scale topographic PV slopes as floats makes sense.
It also makes sense that Qx
and Qy
have to be periodic otherwise boundary errors will appear, and a planar slope is the only non-periodic topographic PV possible since it gives a periodic, constant PV gradient.
This closes #307 by adding options to specify a nonperiodic component of the topographic PV gradients (for example a planar slope) in the
MultiLayerQG
module. Also added one test.The gradients of the nonperiodic part of the topographic PV are now specified separately via
etax_nonperiodic
andetay_nonperiodic
inMultiLayerQG.Problem
, and are added to the gradients of the periodic part of the topographic PV (calculated via FFTs).