SpeedyWeather / SpeedyWeather.jl

Play atmospheric modelling like it's LEGO.
https://speedyweather.github.io/SpeedyWeather.jl/dev
MIT License
432 stars 27 forks source link

Exoplanet context #462

Open aditya-sengupta opened 7 months ago

aditya-sengupta commented 7 months ago

I'd be interested in applying SpeedyWeather.jl to exoplanet climate and adding in some commonly-used parameterizations of clouds and chemistry we use! I've yet to work out exactly what forms I want the latter part of this to take, but to start with, I think a lot of the aspects of the physics for Earth models are too precise for what we know about exoplanets. Is there a breakdown of the physics I can start with (the docs don't seem to have much about this) so I can try removing stuff I don't need + adding new components?

milankl commented 7 months ago

I love it! We're getting exoplanets 💚

There's a few things we'd need to figure out/discuss/implement/test regarding exoplanets that probably can be moved into their own issues but just to list them for now

I'd say easiest is if you start figuring out "exactly what forms" you'd like to simulate, and then we can work out what's needed and I can give some of these more internal issues a higher priority?

aditya-sengupta commented 7 months ago

Sounds like a plan!

milankl commented 7 months ago

One dry + one condensable and ideal gases should be plenty to start with, as long as we're not super locked in to those being specifically the same two as Earth - I'll have some discussions and figure out a relatively easy test case.

Can can create EarthAtmosphere() and also check ?EarthAtmosphere for the docstring. These are the current parameters that define the atmosphere of your planet. You can define an Earth-like planet by atmosphere = EarthAtmosphere(heat_capacity=500) and that should propagate this choice across other model components, e.g. the clausius clapeyron calculation. You'd use this in the model constructor like so

spectral_grid = SpectralGrid(trunc=31,nlev=8)    # life of every simulation starts by defining the resolution
almost_earth = EarthAtmosphere(heat_capacity=500)
model = PrimtiveWetModel(;spectral_grid, atmosphere=almost_earth)

You could, however, also define your own atmosphere

struct MarsAtmosphere <: SpeedyWeather.AbstractAtmosphere
    p1
    p2
    p3
end

with parameters p1, p2, p3 that define your atmosphere. You currently need to define most of the fields as in EarthAtmosphere (your atmosphere needs a heat capacity and a gas constant e.g.) but depending on whether you use the PrimitiveDryModel or the PrimitiveWetModel some of these aren't accessed.

Reminder to self to document this in the documentation 😉

I'm not sure there is such a thing as a calendar of an exoplanet (yet!) - I think we'd measure model time in Earth days/years but without reference to any particular starting point. If it wouldn't be too much of a rewrite, having a number for absolute time that can be converted either to "days/years since start" or DateTimes would be really nice, but of course you'd know more about what makes more sense for the overall project.

Yes, technically our time axis just counts up in seconds, however, for convenience that's pu into a DateTime object. One can therefore for example do simulation = initialize!(model, time=DateTime(2050,1,1) to let the model time start in January 2050 and e.g. the surface temperatures would be picked according to that date (it's a repeating seasonal cycle by default) and you'd know it's northern hemisphere winter. What I'm saying is that Jan 1 has no meaning on an exoplanets calendar (whether it exists or not) unless you somehow say at a given reference date earth and our exoplanet were in the same orbital position and since then the exoplanet kept spinning but with a different length of day and year.

Plenty of the higher-order details are a lot more specific than we even know about in exoplanets! I'd say it's important to get vertical and horizontal advection, condensation/evaporation, and some basic cloud formation down (my main project has to do with modeling specifically this part in a way that can be plugged into climate models, so that's a possible integration for the currently-distant future). Would we need more details than that on what forms I'm after?

We have advection, condensation and evaporation, regarding clouds we started to work on this in relation to radiation (see #460). I would love to hear your perspective here on what interaction between the different parameterizations would you envisage, e.g. how large-scale condensation determines clouds, their properties and what of that is important for a general radiation scheme.