Page 46 of 61 FirstFirst ... 3642434445464748495056 ... LastLast
Results 451 to 460 of 608

Thread: The Köppen–Geiger climate classification made simpler (I hope so)

  1. #451

    Default

    EDIT: ended up doing them manually, came out just fine that way so feel free to ignore the below post.

    So I could use some help here figuring out where I went wrong trying to run the script, because I'm pretty sure the output isn't supposed to look like this.

    Imperiana - biomes.jpg

    I didn't use anti-aliasing, and as far as I can tell all of my colors are correct. I'm using Photoshop CS6, and I had to run the script through the actions panel because the included instructions didn't work as far as I could tell (Window > Script doesn't exist in any of my menu options). Should I try installing gimp and seeing if the gimp script works, or did I screw something up? If I knew the specific codes for the colors the script is asking for I could check them better.
    Last edited by Eldresh; 10-25-2018 at 05:32 AM.

  2. #452
    Guild Member Guild Supporter nwisth's Avatar
    Join Date
    Aug 2018
    Location
    Oslo, Norway
    Posts
    62

    Default

    Yeah, that looks a lot like the first results I got as well. I finally got it to work after giving up using Photoshop, and installed GIMP ver 2.8 (not the latest 2.10, which didn't work) - which I used to run Charerg's 6-step script from further up the thread. I also had to redo all my precipitation maps because I had used brush tool instead of pencil tool - that removed the unsightly lines.

    Good luck!

    -Niels

    EDIT: I forgot about the updated 6-step script, which you want to use instead.
    Last edited by nwisth; 10-25-2018 at 03:30 AM. Reason: Forgot the update :/

  3. #453

    Default

    I ended up realizing I could just do them manually instead of with the script, and they came out just fine that way. Brush tool was probably my issue as well, but as part of doing stuff manually I went and adjusted some of my borders.

    Just needs some tweaking now. I don't know what exactly happened with the script, but I'm willing to chalk it up to my ability to somehow break anything and using brushes.

  4. #454
    Guild Novice Facebook Connected Daniel Gimenez's Avatar
    Join Date
    Dec 2018
    Location
    I live in the Basque Country, as a Cartographer, you should know where it is!
    Posts
    5

    Help Hi to everyone!

    Hi everyone!

    I have been mesmerized by all the great brains I see here! Clever people indeed I am so impressed and I feel so thick and slow!
    So I started to do my own Climate map, but when doing the rain I got soooo stuck, especially with the storm paths (if I did the other stuff correcly that is).

    I am new here so if at least I could have a little bit of your help from you guys to figure out all this that would be great, to earn this at least I could exchange some of my exppertise, for I am a 3D artist, so I know a thing or two about 3D graphics and imagery that I could share.

    Anyways, so here are the relevant images (They are square because I am using a 3D program, so textures have to be square, but I guess nobody will have any problems interpreting them):
    OceanCurrents and Landmasses:
    OceanCurrents.png

    Pressure and Winds January and July
    PressureWindsJanuary.png
    PressureWindsJuly.png

    RainWIP January&July
    PrecipitationsJanuary.png
    PrecipitationJuly.png

    And finally some bling!
    render.jpg


    If i have done something wrong I apologize I am new in any kind of forum...

    Thanks.

  5. #455

    Default

    The bling is very pretty!

    I have to confess I'm having a hard time trying to figure out the projection on your square map. That said, from what I can see the level of detail you have is rather impressive. Some of the 'cold' currents look to start just a little bit close to the equator, in my opinion - the ones that go from hot currents to mild/cold around 30-40 degrees latitude while near a coastline. Winds and precipitations are an area I tend to have some issues with myself so I'm not sure I have a lot to say there (and did I completely overlook storm paths being in the tutorial? ).

    -------------

    This is very (very) belated, but I'd also like to mention that some earlier problems some folks were having in using my command-line script for outputting the climates were likely due to the fact that the script's default precipitation input colors are the purple-to-black shading Charerg used for some precipitation maps earlier in the thread, not the categories in Azélor's main tutorial. I've added an alternative input precipitation profile ("altPrecProfile") to the script's Github repository that should match the precipitation categories in the tutorial; to use it instead of the script's default run the script with the flag
    --precprof="altPrecProfile" (assuming you're in the same directory as the Python script itself).

  6. #456
    Guild Artisan Charerg's Avatar
    Join Date
    Feb 2015
    Location
    Finland
    Posts
    525

    Default

    As a bit of an aside regarding the script and the formulas used to calculate the climates, there's apparently a sort of "official formula" that can be used for the aridity threshold if you want it to be gradual rather than using Köppen's original formulas. Using this paper as a source, a fellow named Patton originally published a modified formula in 1962 (using inches and fahrenheit as units). Converted into centimetres and degrees celsius (as used in some publications apparently), the formula looks like this:

    R(cm) = 2.3*T - 0.64*Pw + 41

    Where R is the aridity threshold, T is the mean annual temperature, and Pw is the percentage of rain that falls in the winter half-year. Note that this gives the threshold in cm, so for our purposes we'd want it converted into mm:

    R(mm) = 23*T - 6.4*Pw + 410



    Let's quickly compare the output of the formula with those of the standard criteria (I'm assuming mean annual temperature T is 20 °C in all examples):

    Scenario 1 (50 % of rainfall in winter):
    Standard Köppen: R(mm)=20*T + 140 = 540 mm
    Modified Köppen: R(mm)=23*T - 6.4*50 + 410 = 550 mm

    As can be noted, the formula has clearly been calibrated to produce essentially the exact same result as the original formulas in this situation.

    Scenario 2 (30 % of rainfall in winter):
    Standard Köppen: R(mm)=20*T + 280 = 680 mm
    Modified Köppen: R(mm)=23*T - 6.4*30 + 410 = 678 mm

    Again, the output close to the "1/3 boundary" is essentially the same. What about the extreme case then?

    Scenario 3 (0 % of rainfall in winter):
    Standard Köppen: R(mm)=20*T + 280 = 680 mm
    Modified Köppen: R(mm)=23*T - 6.4*0 + 410 = 870 mm

    Here we can see a notable difference: the modified formula produces a higher aridity threshold if all of the rainfall is concentrated in summer. What if most of the rain falls during winter?

    Scenario 4 (70 % of rainfall in winter):
    Standard Köppen: R(mm)=20*T = 400 mm
    Modified Köppen: R(mm)=23*T - 6.4*70 + 410 = 422 mm

    Again, the output around the "2/3 boundary" is very close to the threshold produced by the original formula.

    Scenario 5 (100 % of rainfall in winter):
    Standard Köppen: R(mm)=20*T = 400 mm
    Modified Köppen: R(mm)=23*T - 6.4*100 + 410 = 230 mm

    And the notable difference is again in the extreme case: as can be noted, the modified threshold produces a very low aridity threshold if all the rainfall comes in winter.


    I'm a bit on the fence about this, on the one hand, using a more gradual threshold does make sense, but a lot of places do actually receive close to 100% of their annual rainfall during the summer half-year, so they would become a bit more arid with this formula, though I'm not sure whether that is a good thing or not. Also, I do feel the threshold probably plunges too low when it comes to climates that receive all their precipiation in the winter half-year. I'm pretty sure any place with an annual mean temp of 20 °C and only ~250 mm of annual precipitation would have extremely limited vegetation, yet it would not be classified as arid.


    EDIT @ AzureWings:
    I think the biggest problem potential users have with using the script are the prerequisites of installing Python and Pillow, as well as maybe lack of experience with using the command line prompt. Also, from the replies in the thread some might have missed that it has to be run through the command window in the first place . So I think adding detailed instructions about how to actually activate/use the script might help people to run it (I guess I might give those instructions as well, if you're a bit busy).

    For example, the readme tells to use "python ./skcc.py ..." to run the script. But if you're using a more recent version of Python (3.3 or higher), that would actually be "py skcc.py ..." (assuming you're in the same directory as the script). Also, the source maps have to be in the same folder as the script itself, if I'm not mistaken (I don't think that was mentioned in the ReadMe).

    EDIT2:
    Ok, I tested out the modified aridity formula using the old source maps from this post. I modified the temp category averages slightly to match those used in my script. Here's the new output using the standard formulae (closely matches the one produced by the GIMP script, as expected):

    output_a.png

    And here's the output using the modified formula:

    output_b.png

    Needless to say, the results don't look exactly promising. Some places like Kazakhstan that receive more rain in winter end up being classified as humid, whereas tropical areas are classified as overly arid, especially in Africa.

    EDIT3:
    As an extra test, I also tested out the old 8-step precipitation maps in combination with the modified aridity threshold. In this case the 8-step maps produce a noticeably better result (though still not perfect):

    output_c.png
    Last edited by Charerg; 01-05-2019 at 02:02 PM.

  7. #457

    Default

    Quote Originally Posted by Charerg View Post
    As a bit of an aside regarding the script and the formulas used to calculate the climates, there's apparently a sort of "official formula" that can be used for the aridity threshold if you want it to be gradual rather than using Köppen's original formulas. Using this paper as a source, a fellow named Patton originally published a modified formula in 1962 (using inches and fahrenheit as units). Converted into centimetres and degrees celsius (as used in some publications apparently), the formula looks like this:

    R(cm) = 2.3*T - 0.64*Pw + 41

    Where R is the aridity threshold, T is the mean annual temperature, and Pw is the percentage of rain that falls in the winter half-year. Note that this gives the threshold in cm, so for our purposes we'd want it converted into mm:

    R(mm) = 23*T - 6.4*Pw + 410
    I like the idea of a more continuous-space model, but I agree that in practice it doesn't seem to work out quite so nicely. The tropical zones do seem to be make-or-break points for a lot of Köppen-Geiger climate modeling because they're high temperature and very high rainfall but often concentrate so much of that precipitation to one half of the year.

    Although being published lends it some notable weight of ethos I'm almost tempted to try out this formula but scaled to match its extremes with the extremes of the Köppen thresholds. The discontinuities always seemed to be the thing that concerned me a bit about the original aridity thresholds more than the values themselves that those thresholds arrived at.

    Quote Originally Posted by Charerg View Post
    I think the biggest problem potential users have with using the script are the prerequisites of installing Python and Pillow, as well as maybe lack of experience with using the command line prompt. Also, from the replies in the thread some might have missed that it has to be run through the command window in the first place . So I think adding detailed instructions about how to actually activate/use the script might help people to run it (I guess I might give those instructions as well, if you're a bit busy).

    For example, the readme tells to use "python ./skcc.py ..." to run the script. But if you're using a more recent version of Python (3.3 or higher), that would actually be "py skcc.py ..." (assuming you're in the same directory as the script). Also, the source maps have to be in the same folder as the script itself, if I'm not mistaken (I don't think that was mentioned in the ReadMe).
    The python invocation can depend somewhat on how your installation is set up - on mine for example I'm actually invoking with 'python3' because I have 2.x and 3.x versions of Python installed side-by-side and need to disambiguate, but I knew that wasn't going to be typical of most users. If the default is to invoke with 'py' now that just makes things more confusing and awkward, ugh.... The source maps don't need to be in the same folder as the script itself, but you need to provide the path to the source maps from the current working directory, not just the file names of the input maps (so if you're in the folder where the script is running and the input maps aren't, you need to provide either absolute paths or relative paths from the folder the script is in to the maps). This also means you can output to a folder other than where the script is, too; just provide a filepath to an output file location in some other folder.

    I'll pop a few more points into the readme's FAQ about python invocation and file paths. Noting any of your experience in the installation process might be helpful; I did it in a relatively ad-hoc way that's probably not a very good place to explain from for a lot of people.

  8. #458
    Guild Grand Master Azélor's Avatar
    Join Date
    Jul 2008
    Location
    Québec
    Posts
    3,363

    Default

    The main issue with the equator belt is that there is no actual winter/summer seasons but the formula used these seasons.
    Normally, the impact of precipitations on the aridity is different depending on when the rainy season is.
    But the seasonality of precipitations has no impact when temperatures are mostly constant.

    The current formula is not the best to find the aridity in these regions.

  9. #459
    Guild Artisan Charerg's Avatar
    Join Date
    Feb 2015
    Location
    Finland
    Posts
    525

    Default

    Quote Originally Posted by AzureWings View Post
    I like the idea of a more continuous-space model, but I agree that in practice it doesn't seem to work out quite so nicely. The tropical zones do seem to be make-or-break points for a lot of Köppen-Geiger climate modeling because they're high temperature and very high rainfall but often concentrate so much of that precipitation to one half of the year.

    Although being published lends it some notable weight of ethos I'm almost tempted to try out this formula but scaled to match its extremes with the extremes of the Köppen thresholds. The discontinuities always seemed to be the thing that concerned me a bit about the original aridity thresholds more than the values themselves that those thresholds arrived at.
    You probably have a point there: I think Köppen himself treated the values used in these formulas as convenient approximations, more than anything else. I tested out a few versions adapted to have less variance than the formula I cited previously (which had a variance of 640 mm in the threshold between 0% and 100% of precipitation in winter).


    First, a "mid-variance version" (scaled to match the result of standard Köppen at 15% and 85%). R is the aridity threshold, T is the mean annual temperature, and Pw is the percentage of rain that falls in the winter half-year.
    R(mm) = 20*T - 4.0*Pw + 340

    Here is the resulting map (I used the colour scheme in Kottek et al. (2006) this time around):
    Test__mid_variance.png


    Second, a "low-variance version" (scaled to have slightly less variance than standard Köppen, the "summer dries" are a bit drier).
    R(mm)= 20*T - 2.5*Pw + 300

    And the map:
    Test_low_variance.png

    Note that I used the 8-step precipitation maps in these tests (as I was a bit too lazy to switch back to the 6-step maps, though I'll test those too later).


    For purposes of comparison, here's the "high variance" version I tested out previously (including the climate key):
    Test_high_variance.png


    Overall, I think the "mid-variance" performed best out of these, though maybe that would not be the case if the "low variance" version was adjusted to match the "summer dry" extreme of Köppen (right now, assuming T=20 °C and 100% of rain in winter, the standard formula would give 400 mm as the threshold whereas the "low variance" formula here would give a slightly higher 450 mm).


    EDIT:
    I tested out an adjusted version of the "low-variance" formula, scaled to closely match the extremes of standard Köppen. Perhaps unsurprisingly, this produced the results that matched most closely with actual Köppen maps.

    R(mm)= 20*T - 3.0*Pw + 300

    Here is the resulting map (using the 6-step precipitation maps):
    Test_5_sixstep.png

    The good thing is that this seems to get rid of that annoying patch of Dsa in the middle of the steppe we had previously in Kazakhstan.
    Last edited by Charerg; 01-06-2019 at 07:37 AM.

  10. #460
    Guild Artisan Charerg's Avatar
    Join Date
    Feb 2015
    Location
    Finland
    Posts
    525

    Default Ad hoc guide for using AzureWings' script

    Quote Originally Posted by AzureWings View Post
    I'll pop a few more points into the readme's FAQ about python invocation and file paths. Noting any of your experience in the installation process might be helpful; I did it in a relatively ad-hoc way that's probably not a very good place to explain from for a lot of people.
    Since quite a few users seem to have some problems with using the script, I guess it might be worthwhile to attempt to give a precise step-by-step guideline. Here's my attempt at providing some detailed instructions (feel free to copy anything you find useful):


    A. Prerequisites

    To use the script, you need to first install two things: Python 3 and Pillow. Python is the programming language that the script uses. Assuming you're using Windows, the latest version can be downloaded from here.

    Pillow is essentially an add-on that adds image handling functionality to Python. Since the script uses these functions, you need to install it as well (note that you need to download and install Python before installing Pillow). Pillow can be dowloaded from here. You'll note that there are many different versions of Pillow available. You need to pick the version that matches your OS and the Python version you just installed. Assuming you're using Windows, the windows installers are located at the bottom of the list. In my case, since I installed Python 3.7, I picked Pillow-5.4.1.win-amd64-py3.7.exe (the most recent version as of Jan 2019).


    B. Using the script

    The script itself is activated through the command prompt. The simplest way to launch the command prompt is to press "Windows+R" to open the Run Window, then write "cmd" and press enter. Now that you have the command prompt open, you need to navigate into the folder where your script is located (I also recommend storing the source maps in the same folder to keep things simple). This page provides instructions on how to do that. As an example, here's my window after navigating into the right folder (this is just one way of doing this):

    Screen 1.PNG

    Now you can activate the script. There are several optional flags, such as telling the script to use an alternate colour profile for the climates or for the precipitation and/or temperature maps. All the relevant commands are detailed in the script itself (which you can easily read or modify with NotePad++), as well as in the ReadMe. As an example, here I've run the script without any optional commands:

    Screen 2.PNG


    Hope this was helpful to those who were struggling with Azure's script. Feel free to ask if something was left unclear.
    Last edited by Charerg; 01-07-2019 at 10:31 AM.

Page 46 of 61 FirstFirst ... 3642434445464748495056 ... LastLast

Tags for this Thread

Posting Permissions

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