Results 1 to 10 of 131

Thread: [WIP] Building a world from tectonics onward

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1

    Default

    Interestingly, the AzureWings result doesn't have the same extensive regions of mid-latitude Med climates and (too) high latitude hot deserts as the results reading directly from the EPS data; not entirely sure how the Pasta scripts use the EPS data but it's interesting to see that not reproduced here.
    The formal definitions for koppen zones sometimes involves data from all months rather than just jan/july, so that might contribute. The hot deserts thing may also be a definitions issue; some sources define the hot/cold boundary as an average temperature of 18 C, some as a coldest-month temperature of 0 C. The latter tends to result in more hot desert and is what my script defaults to, but that can be altered during configuration.

    In principle it should be possible to make a greyscale image file showing which areas you wanted hotter or colder and then alter the script to read that and adjust all the temperatures before determining climate zones (and the same for precipitation). With the current version of the koppenpasta script on the github, go to line 1058 (above print('Interpreting Data...')) and insert:

    adj_path = image.png #greyscale adjustment image, placed in the same directory as the script and preferably with smoothed colors
    min_adj = -20 #minimum adjustment of temperature in degrees C, i.e. scale of greatest cooling
    max_adj = 20 #maximum adjustment of temeprature in degrees C, i.e. scale of greatest heating
    zero_p = 128 #greyscale value (0-255) of image that corresponds to no adjustment
    zero_p *= 255
    adj, = Image.open(adj_path)
    adjm = adjm.convert('I;16')
    adjext = adjm.getextrema()
    adjm = adjm.resize((lonl,latl))
    adj = np.asarray(adjm)
    adj = adj - zero_p
    adj = np.where(adj > 0, adj * max_adj / (adjext[1] - zero_p), adj * min_adj / (adjext[0] - zero_p)
    adj = adj[np.newaxis,:,:]
    tas = tas + adj
    ts = ts + adj

    And make sure it's all indented to the same level as the print... line. For precipitation it could be basically the same but remove the last two lines and add pr = pr + adj (and it should work fine to have one after the other.)

    only a single year as the script doesn't like my averaged nc files
    Are you sure you're pointing it to the averaged file and not the one with data further averaged to annual averages? (or to a folder containing multiple .nc files)

  2. #2

    Default

    Oooh, this looks really useful. Thanks a bunch! I'm very much not a coder, but I'm familiar enough with to Python to implement this for precipitation, as well, though I imagine that wouldn't have seasonal variation. I'll mess around and see what happens

    Quote Originally Posted by worldbuilding pasta View Post
    Are you sure you're pointing it to the averaged file and not the one with data further averaged to annual averages? (or to a folder containing multiple .nc files)
    I've been attempting to use the averaged .nc file with all 12 months and the output I get looks like it partially works for some continents but then fails for others and just outputs climates with straight line divisions. This happens for different resolutions, outputs, etc, so it's not only a one-off. It could totally be user error on my end, so if it's helpful I can show you what I'm getting.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •