Comments (6)
In the numerics of speedy there is only surface pressure ever used, in order to get "pressure" on other layers the geopotential is computed on those (with the surface geopotential being the orography times gravity). Hence, yes we had called it at some point pres_surf
but realised it's a bit unnecessary as pres
without _surf
doesn't actually exist. Furthermore, for the ShallowWaterModel
pres
actually refers to the interface displacement which is often called eta. This is not to be confusing, but simply because we want to reuse that variable in that case -- and it has conceptually a very similar meaning.
To make things even more complicated it's actually the logarithm of surface pressure, so technically we should call it log_pres_surf
pres_surf_log
or whatever, as this seems to be just an overkill, we went for pres
as it has conceptually the same meaning and is (hopefully) stated clearly in many parts of the code as that. I tend to annotate the variable names in many function signatures over and over again to avoid confusion and be clear about these issues. In that sense I believe we can never have a realitively short name that accurately describes what it is without making some sacrifice anyway. Hence I went for a bit shorter but a hopefully more comments overall to avoid confusion.
from speedyweather.jl.
@white-alistair which logic did you follow in convection.jl
, is there something we should change?
from speedyweather.jl.
I think it would be worth discussing this a bit more so to maybe come up with some guidelines for developers. I appreciate your point but I still find the use of a variable named pres to mean a normalised surface pressure rather confusing. In column_variables.jl this is actually defined as surface pressure in hPa (i.e. not normalised)... Personally I would prefer to use more verbose variable names than contractions which lead to confusion and the code becoming unintelligible. If we could use those defined by the CF convention, the better. What is the reason for shortening variable names so much? I mean we are all using autocompletion so it's not like one has much to type. What's more In some sections of the code you already use fairly verbose variable names so it seems rather mixed.
from speedyweather.jl.
Note that we can do separate things in the dynamics vs the parameterizations. Why I'm hesitating in the dynamics is that pres
may have units of [log(Pa)] in the PrimitiveEquationModel
but [m] in the ShallowWaterModel
. So being more specific than pres
does not actually help because it creates even more confusion for the respectively other model. Happy to discuss this more, but for clarity in the parameterizations, where, I agree, clarification with units is more important, we could start by changing
https://github.com/milankl/SpeedyWeather.jl/blob/2da381d2eea75556b306d5e3a2fc954c921c0f49/src/column_variables.jl#L81-L83
meaning, you can add and change all pressure related variables as long as you pull D.surface.pres_grid[ij]
which is the logarithm of surface pressure in Pa from the dynamics. So feel free to rename the variable to C.log_surf_pres
in ColumnVariables
and add surf_pres
, norm_surf_pres
etc.
from speedyweather.jl.
Update @dmey, in the physics ColumnVariables
now has two fields
# (log) pressure per layer
const ln_pres::Vector{NF} # logarithm of pressure [log(hPa)]
const pres::Vector{NF} # pressure [hPa]
In the dynamics we still have pres
meaning the log of surface pressure [log(Pa)] in the PrimitiveEquation model or the layer height [m] in the shallow water model. Any strong feelings @white-alistair ? Now's the time probably as I'm addressing #255 anyway
from speedyweather.jl.
Hey, no strong feelings on my part. Your suggestion LGTM 👍
from speedyweather.jl.
Related Issues (20)
- [JOSS Review] questions + suggestions HOT 7
- [JOSS review] Zenodo archival HOT 5
- [JOSS Review] firstnames vs. initials in .bib file HOT 3
- Question about example in Docs/SpeedyTransforms/Geostrophy HOT 2
- Another simple radiation scheme HOT 14
- ☁️ Clouds? HOT 13
- Another not too simple radiation scheme
- Exoplanet context HOT 3
- Automatic performance testing HOT 9
- 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
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.