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

Convection #414

Merged
merged 28 commits into from
Nov 30, 2023
Merged

Convection #414

merged 28 commits into from
Nov 30, 2023

Conversation

milankl
Copy link
Member

@milankl milankl commented Nov 9, 2023

This enables the diagnose_convection! function, actually doing convection! is still commented.

One issue we had was that Fortran SPEEDY uses humidity in g/kg, we switched to kg/kg but I believe that still has some issues in various places, e.g. I just found (was top, now bottom)

#    "latent heat of condensation [J/g] for consistency with specific humidity [g/Kg], also called alhc"
#    latent_heat_condensation::Float64 = 2501
    "latent heat of condensation [J/kg] for consistency with specific humidity [kg/kg], also called alhc"
    latent_heat_condensation::Float64 = 2501e3

Value seems to be an approximation to (from wikipedia)

image

Cloud top (dark blue means way above the surface) indicates where convection is active

image

which is almost everywhere in the beginning and it also spreads across the domain within days. Not what I was hoping but I bet there's still tons of bugs everywhere. To be fixed!

@milankl milankl added parameterizations 🌧️ Parameterizations of unresolved physical processes vertical ⬆️ Affecting the vertical dimension humidity 💧 Affecting the hydrological cycle labels Nov 9, 2023
Copy link
Member

@white-alistair white-alistair left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, nothing to add really. I like the new approach and I find the code exceptionally readable 👏

Out of curiosity, how would we eventually go about verifying the correctness of this?

@milankl
Copy link
Member Author

milankl commented Nov 13, 2023

The last commit adds the calculation of the geopotential $\Phi$ to the physics (was previously just zero). This caused the dry static energy to be off (which is $c_p T + \Phi$) and so also the moist static energy, now with this fix, the convection is activated only in the tropics/sub-tropics reaching somewhat realistically into mid-latitudes I assume

image

@milankl
Copy link
Member Author

milankl commented Nov 13, 2023

Starting to diagnose convective precipitation, scaling should still be off (unit is wrong) but pattern-wise doesn't look to unrealistic

image

@milankl
Copy link
Member Author

milankl commented Nov 13, 2023

@white-alistair I also realised that the formula we use for saturation humidity is actually the Tetens equation

image

@milankl milankl mentioned this pull request Nov 13, 2023
22 tasks
@milankl
Copy link
Member Author

milankl commented Nov 30, 2023

Oh yeah @white-alistair that looks like some convection to me! T85 over 20 days. Looks good enough for me at this stage (it does qualitatively the right thing, is not absolutely off in terms of magnitude and is seemingly stable)

precip_conv.mp4

in comparison this is large-scale preicipitation

precip_cond.mp4

@milankl
Copy link
Member Author

milankl commented Nov 30, 2023

For reference this is IMERGE (but note that the unit here is mm/h)

image

@white-alistair
Copy link
Member

That looks amazing, congrats @milankl!

@milankl
Copy link
Member Author

milankl commented Nov 30, 2023

Applied some tweaks, convection rains now in the tropics (better!) but also over a too wide area (bad), and magnitudes are an order of magnitude off (bad). Anyway, it seems to run stable and the rest is tuning we can do when other parameterizations are in too. E.g. Does it rain less when the vertical diffusion doesn't diffuse humidity (what we currently have), how does convection occur when there's no radiation to heat the atmosphere from below? At the moment we're only heating with surface fluxes (temperature relaxation is switched off), so I'm not too worried about things being somewhat unrealistic for now. I feel all of these can have an effect similar to the discrepancy we see.

image

@milankl milankl merged commit 4474a60 into main Nov 30, 2023
3 checks passed
@milankl
Copy link
Member Author

milankl commented Nov 30, 2023

Created a comparison for a talk (based on a few commits above though)

image

@milankl
Copy link
Member Author

milankl commented Nov 30, 2023

@p-hss SpeedyWeather has a not too-unrealistic closed hydrological cycle now!

@milankl milankl deleted the mk/convection branch January 16, 2024 18:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
humidity 💧 Affecting the hydrological cycle parameterizations 🌧️ Parameterizations of unresolved physical processes vertical ⬆️ Affecting the vertical dimension
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants