Home Creators Posts Import Register Favorites Logout

Content

green

Files

Comments

ForbiddenOne42

I’d love to see the explanation for what happened with temperature and humidity variations here

Nikolai Lofving Hersfeldt

I'll dig through the data more when all runs are done, but it's mostly down to slower rotation causing weaker coriolis forces and thus allowing for a wider Hadley cell, thus more efficiently transporting heat from tropics to poles in the upper atmosphere and transporting moisture towards the tropics in the lower atmosphere. I suspect that this is also causing more cloud cover over the tropics, increasing the albedo and so both cooling the tropics locally and the planet as a whole.

SkyBandit

Speaking of long rotation times...what about long orbit times? Have you given thought on how to adapt your climate script for worlds with long years? I think worlds around high-mass stars (with corresponding long orbits) don't get enough love, so they are a focus of my simulations. How might the climate classification schema be adapted to a world with a 2-4 (or more) year orbit? If the planet has significant obliquity or eccentricity there would be "seasons" that lasted for years. I'm familiar with python so I'd be happy to try creating a long-orbit climate version of the script should you have any ideas.

Nikolai Lofving Hersfeldt

Year length is a single parameter in the input scripts, but of course it's not independent of other values like star temperature and stellar flux. After the experiments with day length (and maybe eccentricity if the exoplasim updates come soon) I've already queued up a set of models with Earth shifted to different points of the sun's habitable zone (though exoplasim isn't great for the outer hab zone with high CO2 levels) and a set with appropriate values for planets in a roughly equivalent spot in the inner habitable zone of m- to a-type stars.

Nikolai Lofving Hersfeldt

And as to climate classification, with the koppen scheme is based on dividing the year into months and it's something of an open question whether, for longer or shorter years, it would be better to always divide the year into 12 months even if that means significantly shorter or longer months or to divide the year into roughly 30-day months even if that means significantly fewer or more months. I may experiment with both and see how much of a difference it makes.

SkyBandit

Any tips on modding the kopenpasta script to utilize a novel classification scheme? I have familiarity with python, but there is a big learning curve when understanding the nuances of someone else's scripts. I'm working out some worlds that are quite exotic in earth terms, and the koppen script is outputting some results which don't quite seem to fit the circumstances. Namely, I need to account for situations that are normal for high obliquity or high eccentricity worlds (which are likely common in the universe) but that don't arise on earth: - months-years of total darkness at various temperatures from cold to hot - months-years of negligible precipitation followed by months-years of wetter conditions - Climates that are within earth-bounds most of the time, but that may have days/weeks/months of extreme conditions, most notably temperature (60-70c or more) The koppenpasta script will shoehorn a climate that has 1 earth-year long droughts with peak temperatures (not averaged, but max) of 70C, followed by earth-years of moderate rainfall and modest temperatures, and that also experiences 100s of earth-days of total darkness and total-daylight as some sort of continental climate, which doesn't fit at all. There is nothing remotely like that on earth to compare it to. It's an inferno for weeks, a paradise for years, and totally bonkers in other ways. I'm thinking that a new scheme that is earth-agnostic could be developed to handle this, that takes more into account sunlight level intensity/duration, as well as short-term but extreme temperatures, and duration of time between different states (wet/dry, bright/dim, cold/hot, etc).

Nikolai Lofving Hersfeldt

The koppenpasta script was the first big python script I ever wrote so it's fairly messy, but here's a quick rundown of what happens with the current version on github: The end of the script, lines 1398 onwards, is the part that takes input; 1408-1463 handle specifying the netcdf file so you shouldn't have to touch anything, after that is the various configuration steps, with a somewhat thorny logic tree to handle various special cases and also allow the whole thing to loop when you want multiple outputs. It may be easier to just leave this all untouched and alter the main body of the script to do what you want. The main function starts on line 489. After some configuration, 571-637 handle pulling data from the netcdf files. 574-587 pull some basic values on the map resolution and appropriate number of months for half and a third of the year, then after that it pulls the climate data; it always pulls the data on 2-meter air temp (tas), precipitation (pr), the land/sea mask (lsm), and sea ice cover (sic), and by default also surface temperature (ts) but not in some special cases depending on how sea zones are configured (by default tas determines land climate zones, ts determines sea zones). In special cases it'll also pull ground elevation (grnz) and cosine of solar zenith angle (czen). If you want to pull more data, you should be able to follow basically the same format. 601-633 only come into play if you're averaging data from multiple netcdf files; if you only ever use one file, you can skip this, otherwise you should follow the format here with all the types of data you pull. 640-675 is a special routine for if you want to average together adjacent months, so you can, say, treat a 12-month dataset as if it had 6 months. If you never want to do this you can skip it, just note the bit at 676 where your arrays are renamed (so the next section can refer to them without having to figure out if this step has been run). 686-899 is a big section for interpolation of data to higher resolution. You can try and follow the progression here and add your data to match the format, or skip and go to 902 where the arrays are again just renamed. 918-1017 looks through the resulting data arrays and finds the critical values that will be needed for determining climate zones. Stuff like maximum, minimum, average, and total are pretty easy to find with a single numpy operation (just bear in mind the input units, e.g. temp is in kelvin, precipitation in meters/second; I convert them celsius and mm/month or mm/year, using Earth months and years), but at 937-955 is some numpy witchcraft to split the year into "summer" and "winter" halves by looking for which starting month of summer results in the highest average temperature (or optionally czen), and then find some critical values on summer and winter precipitation. Notes that this is effectively done independently for every point on the surface, so adjacent cells don't necessarily have summer and winter at the same time. 957-1015 is a less efficient approach to the same process that accounts for data with an odd number of months (so you can skip it if you don't intend to use that). 1017 just determines how long each cell spends above a critical temp, which feeds into some of the temperate and continental zone definitions. 1021-1364 uses this data to determine the climate zones for each point of the surface. The approach isn't terribly efficient but should be intuitive; it iterates over each point, and (at 1026-1058) finds all the critical climate indicators from the last section for that specific point. Then it's basically just the Koppen zone definitions implemented as an if/else tree, with slight complications from having to find the precipitation threshold for arid zones independently for each point (at 1117) and accounting for varying definitions of some zones based on the initial configuration. Once the zone is determined, the point is assigned an integer ID corresponding to that zone; these are all assigned to variables at 10-116 to make the script more readable. As is these are 8-bit signed integers and a later function relies on them being positive so they should stay in the range of (0,127), but if you need more you can just change the datatypes of the arrays at 915 and 916 (and if you get to ids over 255, increase the size of the array at 122). There is also variation depending on which set of climate zones you choose in configuration: 1062-1085 is just the main Koppen groups, 1087-1112 is with no seasons, just using average climate data, and 1114-1205 is the full Koppen set. This also runs if you choose one of the somewhat reduced sets of Koppen zones, then at 1207-1241 the ids are swapped to simplify it down. 1243-1312 is basically the same deal but for Holdridge zones instead. Whatever the resulting climate, at 1315 it's written to the corresponding point in the array for land climates. Then, 1317-1364 does the same thing for sea climate and saves it to a different array. Finally, 1367-1384 converts the resulting arrays of climate ids to either a single colored image or separate images for land and sea climates. It first calls on the function at 120-471, which creates an array that basically maps each climate id to an rgb color, currently set to choose from a few possible sets of colors based on the configuration. Then this map is passed to the function at 473-487, which reads the climate arrays and uses the map to create a new array with the appropriate rgb values for each point of the world, and this array is finally converted to an image and saved as a .png

SkyBandit

Wow. I was not expecting such a detailed write-up. This is beyond helpful! Thank you very much. Relatedly, would you be interested if I shot some climate-zone schema ideas your way by direct message? It would be great to get another brain on the matter. I've been doing some research and sketching out schema ideas and I think in a couple days I may be ready to get input. If not, no problem of course. Just if you're interested.

Nikolai Lofving Hersfeldt

Perhaps but I'm not sure I'd have much to say; schemes like Koppen or Holdridge zones aren't really derived from first principles, they're fitted to the observed correlations between climate variables and different varieties of flora on Earth. When you start looking at climates unseen on Earth, there's no vegetation data to work from (exoplasim's toy vegetation model shouldn't be trusted much in such cases), so how you choose to define climate zones becomes largely arbitrary.

SkyBandit

Fair enough. There is definitely guesswork...a lot of it...though I'm giving it some thought and I think I can define some non-arbitrary climate zone distinctions, based on a couple things, from extrapolation of principles established looking at earth-life, but also some reasoning from first-principles. The schema I'm thinking about has a lot to do with "hard" and "soft" tolerances as well as availability of utilizable resources (moisture, light, etc). Anyway, when I have time I hope to put the schema I develop into a modified script using your comments as a guide.

SkyBandit

A question... In the postprocessor output codes, what does "mint" and "maxt" refer to? Minimum and Maximum temperature of what? And figured how? For example, looking at the output of averaged data for a month (MOST.xxxxx.nc), does "mint" refer to the lowest temperature that occurred during any single runstep in the given month (i.e. lowest "instantaneous" temp)? Is it instead the lowest averaged daily temp in that month? Something else? And is this surface temperature (measured at ground) or something else? There's frustratingly little in the way of notes in the ExoPlaSim docs concerning postprocessor codes.

Nikolai Lofving Hersfeldt

I haven't found a clear explanation anywhere in the exoplasim or plasim docs, but my current theory based on some tests and trying to understand the fortran code is that it's sampled out of those intermediate periods set by the nstpw parameter; basically the model gathers up averaged data every few days and then at the end of the year those are averaged into months; in that first averaging step the maximum and minimum temperatures are taken out of that few-day period but then the final collating into months seems to just be an average of those values. The nstpw period is 5 days by default, though it may vary with the timestep; it can be altered directly (as shown on my tutorial post) but shouldn't be changed too much or it may cause the model to run out of memory and crash. So if you have earth-like days, it's a reasonable representation of the day and night temperature extremes, but that won't work for these much longer days; I've got a couple tests set up to run a couple years off the end of these results with nstpw locked to 5 days and outputs with 5-day months, such that I can then extract the appropriate min and max temperatures myself.

SkyBandit

Thanks! Super helpful. I'll do some investigating myself and see if I can help clarify the matter. Do you know what "lwe" stands for? for example: - lwe of soil moisture content - lwe of water evaporation - etc... I can make guesses, but I can't actually find a definition.

Nikolai Lofving Hersfeldt

I always just figured it was like "level" or something, but I'm not sure that makes total sense. In general it seems to be a rate like precipitation.

SkyBandit

I did some sleuthing, and I'm 98% sure "lwe" stands for "liquid water equivalent." That term pops up in some geological and climate science papers, and seems to fit perfectly. So "lwe of water evaporation" means how much liquid water evaporated. Also "lwe of soil moisture content" means how much liquid water is in the soil if you distilled that water out. Interestingly, I looked at the plasim code, and lwe of soil moisture content is capped at 0.5m, which represents totally saturated soil. All soil below glaciers is automatically set to 0.5m. Any precipitation or snow melt that would push the saturation beyond 0.5m instead becomes runoff. So this variable can be easily used to set a scale of 0-1 representing the functional aridity of soil in a climate.