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

Progress towards primitive equations #192

Closed
22 tasks done
milankl opened this issue Nov 18, 2022 · 9 comments
Closed
22 tasks done

Progress towards primitive equations #192

milankl opened this issue Nov 18, 2022 · 9 comments
Labels
dynamics 〰️ Affects the dynamical core model 🎛️ Model constructors, types or equations parameterizations 🌧️ Parameterizations of unresolved physical processes

Comments

@milankl
Copy link
Member

milankl commented Nov 18, 2022

Quick overview where we are in terms of a primitive equation dynamical core and parameterizations

Dynamical core

Parameterizations

@maximilian-gelbrecht @white-alistair @dmey

@milankl milankl added this to the v0.5 milestone Nov 18, 2022
@milankl
Copy link
Member Author

milankl commented Nov 18, 2022

I hope I can tick off many of the dynamical core parts in the next two weeks, but some things seem to be trickier than I originally thought: For example our structure of the DiagnosticVariables split into layers makes absolute sense for many parts of the dynamical core, but not for the vertical advection (used for u,v,T,q), which is a bit annoying. I need to see what's the best to implement that (naive Fortran-SPEEDY copy vs a restructured version with some parallelisation in mind). I'm currently tending towards a naive copy.

@milankl milankl added parameterizations 🌧️ Parameterizations of unresolved physical processes model 🎛️ Model constructors, types or equations dynamics 〰️ Affects the dynamical core labels Nov 18, 2022
@white-alistair
Copy link
Member

Useful overview! How would you estimate the relative difficulty and/or time required for the remaining issues?

@milankl
Copy link
Member Author

milankl commented Nov 21, 2022

  • Virtual temperature: Easy $T_v = T(1+\mu q)$, but it's currently unclear to me whether this is needed in spectral or grid-point space or both or when to compute it to avoid a spectral transform of the fields.
  • Vertical advection: Medium, it's not that tricky, but the vertical advection operator acts across layers, and I don't know yet how to structure this given that we currently work mostly on layers with diagn.layers[k].grid_variables.var_name
  • pressure gradient terms: Medium, the gradients are already computed for surface pressure tendency and the geopotential too, but it still may require some thinking.
  • temperature equation: Medium, the implementation should be straight forward, but the maths will take me a bit to get my head around
  • add kinetic energy to geopotential: Easy, that's very similar to how it's done in the shallow water model
  • semi-implicit corrections: Harder, as the maths will be adapted to the scaling of our equations and if it's not implemented correctly then things will keep blowing up as the gravity waves aren't dampened.

about the physics: You or @dmey probably know better than me.

@maximilian-gelbrecht
Copy link
Member

  • Vertical advection: Medium, it's not that tricky, but the vertical advection operator acts across layers, and I don't know yet how to structure this given that we currently work mostly on layers with diagn.layers[k].grid_variables.var_name

Don't know how the vertical operators exactly look like, but I wrote those get_var functions for the PrognosticVariables with output / setting initial conditions in mind. For working with the layers like that, it might be worth it to write non-allocating versions that return views where needed.

@dmey
Copy link
Contributor

dmey commented Dec 6, 2022

Should be able to do surface fluxes, skin temperature and soil temperature around the end of the year. Note that these will depend on extra work like land data. I am not sure about sea/ocean stuff--sea ice I thought we can just use the climatology at least for starters, ocean mixed-layer I would need more info. Vertical diffusion after that but will depend on workload and priorities. @milankl do you have a date in mind?

@milankl
Copy link
Member Author

milankl commented Dec 6, 2022

No date, it's done when it's done. I'm just happy that everyone contributes, whenver that is. Happy for you to start on those you suggested. I don't mind being more involved with vertical diffusion and/or ocean mixed-layer, but I won't focus on them before the dynamical core is up and running reliably.

@milankl
Copy link
Member Author

milankl commented Mar 15, 2023

With #251 merged (that was painful!) technically the drycore is now complete 🥳 However, there are still some bugs/errors in the explicit terms: T63 8levels after ~12 days, vorticity in lowest layer, top: with semi-implicit time stepping and 3x the time step, bottom: without.

image

So the semi-implicit time stepping does its job, but the error occurs somewhere else.

@milankl milankl modified the milestones: v0.5, v0.6 May 13, 2023
@milankl
Copy link
Member Author

milankl commented May 13, 2023

Moving this to v0.6 milestone as what I had intended for v0.5 is basically completed. I believe there's still something wrong as outlined in #309 but that's not for now.

@milankl milankl modified the milestones: v0.6, v0.7 Aug 30, 2023
@milankl milankl removed this from the v0.7 milestone Mar 19, 2024
@milankl
Copy link
Member Author

milankl commented Mar 19, 2024

Although there are still bits and bobs missing, overall the primitive equation dynamical core is completed and so I'm closing this issue in favour of other more specific issues.

@milankl milankl closed this as completed Mar 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
dynamics 〰️ Affects the dynamical core model 🎛️ Model constructors, types or equations parameterizations 🌧️ Parameterizations of unresolved physical processes
Projects
None yet
Development

No branches or pull requests

4 participants