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

Exoplanet context #462

Open
aditya-sengupta opened this issue Feb 29, 2024 · 3 comments
Open

Exoplanet context #462

aditya-sengupta opened this issue Feb 29, 2024 · 3 comments
Labels
enhancement 🔍 New feature or request exoplanet 👽 SpeedyWeather leaving Earth

Comments

@aditya-sengupta
Copy link

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 milankl added the enhancement 🔍 New feature or request label Feb 29, 2024
@milankl
Copy link
Member

milankl commented Feb 29, 2024

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

  • We have atmosphere = EarthAtmosphere() with a bunch of thermodynamic constants for dry air and water vapour that one would need to adjust. However, a lot of the primitive equations i.e. the PrimitiveWetModel is build around the idea that there's one dry gas and one condensable gas (which can be zero as in the PrimitiveDryModel). Adding more gases to that mix is not impossible but certainly harder. Non-ideal gases are probably currently not a good idea because the ideal gas law is somewhat baked into the equations.
  • We have planet = Earth() with parameters like planet.axial_tilt, planet.gravity, planet.length_of_day, planet.length_of_year. Changing the axial tilt currently affects the zenith angle calculation and I don't see any problem there. However, when I implemented that I wanted length_of_day and length_of_year to be flexible, but then I realised that because we're also using DateTime in clock.time to keep track of the model time, this is a tad harder than I thought it would be. Essentially because some functions like getting time of day (for the solar hour angle) have with DateTime essentially the length of day hardcoded and we'd need to find an elegant way to use clock.time to keep track of time while translating into the calendar of that exoplanet.
  • The radius [m] is set with spectral_grid = SpectralGrid(radius=6371e3). All equations are scaled with the radius to have non-dimensional gradient operators. However, it might be that the current default choice for time step isn't stable when changin the radius by orders of magnitude. I haven't tested that.
  • Changing orography, land-sea mask, surface fluxes of temperature, humidity (Surface fluxes of heat, moisture and momentum: Land and ocean seasonal climatology #399, Soil moisture and vegetation #403) or momentum (Bulk Richardson number-based boundary layer drag #441) is all possible, but, sorry, it's not yet well documented though an easy interface exists.
  • Similar for our new BettsMiller convection scheme Convection too weak?! #436, Simplified BettsMiller convection #442 and the implicit condensation Condensation fireworks #445, ImplicitCondensation not immediate anymore #447

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?

@milankl milankl added the exoplanet 👽 SpeedyWeather leaving Earth label Feb 29, 2024
@aditya-sengupta
Copy link
Author

Sounds like a plan!

  • 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.
  • 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.
  • Starting with ~terrestrial-sized planets makes sense to me so that I can get results that deviate less strongly from what's already implemented, so this can probably wait.
  • 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?

@milankl
Copy link
Member

milankl commented Mar 2, 2024

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement 🔍 New feature or request exoplanet 👽 SpeedyWeather leaving Earth
Projects
None yet
Development

No branches or pull requests

2 participants