Comments (5)
On this note, for the shallow water model, I've decided to use the interface displacement η as prognostic variable, so the instantaneous layer thickness h = η + H, whereby H is the thickness at rest and H = H₀ - orography and H₀ a global constant, something like 8-12km probably. Having said that, I don't want to redefine the variable names in PrognosticVariables
for the different models, so I'll be using pres
(or even pres_log
if we decide to redefine it) for η. This is probably an argument to keep this variable name quite generic (I vote for pres
, as this has a generic meaning, whether you think about logarithm of surface pressure or interface displacement).
from speedyweather.jl.
@milankl picking this up again. How about the following approach:
- Pre-allocate a new grid variable
pres_exp_grid
in theGridVariables
struct (the name is potentially misleading, but I think all of the options are suboptimal in their own way, so I'd be happy to go with your preference from the previous comment). - In
tendencies_parametrizations.jl
, dopres_exp_grid = exp.(pres_grid)
, i.e. before any of the parametrizations are calculated, since this quantity is used by several of them. I'm not 100% this is the most logical place to do this, but as far as I know we only use this in the parametrizations.
Let me know what you think!
from speedyweather.jl.
Is pres_grid
(i.e. the logarithm of surface pressure on the grid) even used for the tendencies? If not, we could just have pres_grid
which is first transformed from spectral pres
and then calculate the exponent in-place? Then pres
would always be the logarithm of surface pressure in spectral space and pres_grid
the surface pressure (hPa) in grid-point space.
from speedyweather.jl.
I agree that we should have one place where the exp is calculated as this is expensive (usually taking several times more cycles than +,-,*,/ etc) but maybe we don't have to allocate another array but can do it in-place like
for i in eachindex(pres_grid)
pres_grid[i] = exp(pres_grid[i])
end
from speedyweather.jl.
As far as I can see it's only used for the physics, so yeah I think this works. I'll just comment it clearly so newcomers aren't confused :)
from speedyweather.jl.
Related Issues (20)
- Precompilation Error HOT 2
- Add proper citations in Docs via DocumenterCitations.jl HOT 1
- JOSS review: text comments HOT 6
- Replace `PythonPlot` with a Julia-based plotting library in Docs HOT 2
- Verifying conserved quantities HOT 15
- Modified dynamics HOT 16
- PrimitiveDry and WetModel generation on Julia v1.9 hangs HOT 10
- The PrimitiveWetModel example fails HOT 10
- unbalanced initial condition for Galewsky Jet HOT 4
- ShallowWater dataset on PDEArena HOT 6
- Modularise netCDF output
- Time stepping of particle tracking HOT 1
- Virtual temperature as prognostic variable
- Spectral filtering instead of hyperdiffusion
- Lagrangian sampling of the model state HOT 1
- Instability develops over long integrations HOT 24
- set! initial conditions HOT 2
- Additional LowerTriangularArray functionality HOT 11
- arbitrary tracer support HOT 2
- RingGrids: Conflicting Broadcast Rules HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from speedyweather.jl.