Giter Club home page Giter Club logo

Comments (9)

miniufo avatar miniufo commented on July 28, 2024

Hi, of course yes. f0 is specified on beta plane. So if the forcing is defined on a lat/lon grid, then you don't need to provide f0, which is overlooked in lat/lon case. N2(k) should be defined as the same as forcing function in the vertical.

from xinvert.

miniufo avatar miniufo commented on July 28, 2024

The true f will be calculated automatically according to your latitude definitions wrapped in the forcing function.

from xinvert.

hs2112 avatar hs2112 commented on July 28, 2024

"N2(k) should be defined as the same as forcing function in the vertical." - Sounds good.

Since the equation is solving for the following,

$$\frac{1}{\partial x}\left(N^2\frac{\partial \omega}{\partial x}\right)+ \frac{1}{\partial y}\left(N^2\frac{\partial \omega}{\partial y}\right) + \frac{1}{\partial z}\left(f^2\frac{\partial \omega}{\partial z}\right)=F$$

and not,

$$\left(N^2 \nabla_p ^2 + f^2\frac{\partial ^2}{\partial p^2}\right)\omega = F$$

which is the desired omega equation, so I am planning to set $N^2$ as 1 and replace $f0$ with $f0/\sqrt(N^2)$ as a workaround even though it is not a perfect solution as $N^2$ gets differentiated in the vertical.

  1. Is there a reason for this change in the equation solved by invert_omega?
  2. Is it possible to solve the latter equation instead of the former?

from xinvert.

miniufo avatar miniufo commented on July 28, 2024

That depends on the case you choose. $f$ does not vary horizontally, so it can be inside or outside the vertical derivative. If you choose $N(z)$ to be a constant horizontally, the two forms are actually the same. Traditionally, there is no previous practice to allow $N$ to vary horizontally. Do you need to do this (which allows $N(x,y,z)$ ) right now?

from xinvert.

hs2112 avatar hs2112 commented on July 28, 2024

Yes, that makes sense. I had missed that you are using an array for the stability parameter in your example, so that solves my issue. Thank you.

Even though that wasn't my initial question, I would want to let $N^2$ vary with y.

from xinvert.

miniufo avatar miniufo commented on July 28, 2024

Yes, in your case of $N(y, z)$, one cannot derive the traditional form as your second equation above. The exact form when $N$ is a 3D variable is not as simple as one may expect. I guess the first one is not correct neither, except you can derive it from the very start (you may use $N(z)$ as a condition in the derivation). This is what I can recall right now.

But if you want a try with solving the first equation above, then $N$ can be varying both horizontally and vertically, which fits the solver of xinvert.

from xinvert.

hs2112 avatar hs2112 commented on July 28, 2024

Yes, I suspected that. Will see what resultant equation I get, deriving with $N^2(y,z)$.

from xinvert.

miniufo avatar miniufo commented on July 28, 2024

I have a notebook here and the derived Eq. (14) is:
1695222685858

So the $N^2$ (here it is $S$ ) is inside the Laplacian, which is slightly different from your first equation. To invert this, one may choose the general form rather than standard form. But I am also curious about how large the differences are when using your first equation above and the one shown here.

from xinvert.

miniufo avatar miniufo commented on July 28, 2024

Close this now and feel free to re-open it in any case.

from xinvert.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.